program-analysis

A set of code-search and analysis tools for checking whether suspected paths from user input to dangerous operations can actually be reached. It supports JavaScript, TypeScript, Python, Go, and Java.

In plain words
What is it for?
It helps find input sources and dangerous sinks, locate matching function calls using code structure, and check suspected source-to-sink paths.
Why use it?
It helps separate possible security issues from issues that code cannot really reach, reducing manual tracing and unsupported conclusions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/deonmenezes/mantishack/program-analysis
Any agent
npx skills add deonmenezes/mantishack --skill program-analysis
Clone the repo
git clone --depth 1 https://github.com/deonmenezes/mantishack

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 489 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.00489
Opus 5 $0.00019 $0.00244
Sonnet 5 $0.00008 $0.00098
Haiku 4.5 $0.00004 $0.00049

Measured 2d ago against content hash e7f7af79a3eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

program-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/program-analysis/SKILL.md · 15 lines

What it actually says

The mantis_program_analysis MCP server is the program-analysis substrate (PRD FR-3.1/3.2/3.3): it doesn't find vulnerabilities by itself, it gives you the primitives to prove or disprove reachability for candidates surfaced elsewhere (semgrep, CodeQL, manual reading).

Three tools, three different jobs:

  • source_sink_scan: fast, dependency-free regex proxy for attacker-controlled-input sources (req.query, request.args, os.Args, ...) and dangerous sinks (eval, exec, innerHTML, pickle.loads, ...) across JS/TS, Python, Go, and Java. This is a recall tool, not proof -- it will surface sources and sinks in the same file or project without knowing if they're actually connected. Use it to cheaply widen your candidate list early in Recon/Detect, then manually trace whether a specific source really flows to a specific sink.
  • ast_grep_scan: precise structural search when you need to find every call site of a specific pattern (e.g. exec($CMD, $CB)) with real AST semantics instead of regex guessing. Use this to enumerate all call sites of a sink once you've picked a vulnerability class to chase, or to confirm a source-sink pair you suspect from source_sink_scan actually appears in the same statement/scope.
  • smt_check_reachability: once you've traced a concrete path from source to sink and can express the path condition (e.g. "sink fires when cmd is attacker-controlled and no allowlist check occurred on that branch") as SMT-LIB2 constraints, hand it to z3. sat means an attacker-controlled assignment exists that reaches the sink -- move the candidate to Validate. unsat means the path is provably unreachable under those constraints -- reject it and cite the unsat result as the roadblock. unknown proves nothing either way; don't treat it as a pass.

None of these three tools replace attacker-simulation validation -- they narrow candidates and prove/disprove reachability so validation time is spent on things that can actually matter.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 15 lines · 38 tokens per session scan A e7f7af79a3eb

Subscribe to this mod's changes

program-analysis is a skill published in the GitHub repository deonmenezes/mantishack (493 stars, last pushed 21d ago), licensed Apache-2.0. It adds 38 tokens to every session and 489 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

compare-harnesses

Diff two scaffolded harnesses (ADR-031). Reports manifest meta drift + host list + per-file fingerprint changes (added/removed/changed). Exits 0 IDENTICAL, 1 DRIFT, 2 missing manifest. Use --bundle for the ADR-031 schema-1 JSON envelope.

ruvnet/metaharness · 66 tokens

create-harness

Scaffold your own focused AI agent harness — pick host (Claude Code, Codex, pi.dev, Hermes), template, agents, skills, and ship a npm-publishable harness with its own npx CLI. Use when a user asks to "create my own agent harness", "scaffold a harness", "make a custom Claude Code plugin like ruflo", or "build a…

ruvnet/metaharness · 89 tokens

diag-harness

Kernel-version skew check (ADR-027). Reports manifest surface + manifest kernel + installed kernel + verdict (match/patch-diff/minor-diff/major-diff). Exits 1 on minor/major skew with a copy-pasteable npm install @metaharness/[email protected] next step. Exits 2 if no .harness/manifest.json at path.

ruvnet/metaharness · 85 tokens

example-harness

Scaffold a ready-made AI agent harness in one command from the 19 published @metaharness/ example packages — 9 host integrations (Claude Code, Codex, Hermes, pi.dev, OpenClaw, RVM, Copilot, OpenCode, GitHub Actions) + 10 vertical pods (devops, research, trading, support, legal, coding, education, sales, gaming…

ruvnet/metaharness · 90 tokens

oia-manifest

Emit .harness/oia-manifest.json declaring layer alignment with the OIA v0.1 9-layer reference architecture. Self-describes the harness's MCP wiring, witness signing, audit log, identity posture (always 'none' at v0.1). --check verifies an existing manifest, --dry-run prints without writing, --json emits to stdout.

ruvnet/metaharness · 79 tokens

repo-genome

7-section readiness scorecard for a LOCAL repo. Reports repo type + agent topology + MCP risk + test confidence + release readiness + recommended harness plan + scorecard. Exit 0 ready, 1 needs-work, 2 blocked. --json for the 6-field scorecard, --bundle for the ADR-031 schema-1 envelope.

ruvnet/metaharness · 73 tokens