Index of every page on this site: llms.txt
All skills
gadievron avatar

/exploitability-validation

@e644bea
by Gadi Evrongadievron/raptor4k stars
615
Run it yourself

Multi-stage pipeline for validating that vulnerability findings are real, reachable, and exploitable, preventing wasted effort on hallucinated findings, dead code paths, or findings with unrealistic preconditions.

Use this Skill: https://skilld.dev/gh/gadievron/raptor/exploitability-validation

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

stage-0-inventory.md

≈1.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

[STAGE-0] Inventory

This stage is Python-executed via core.inventory. The orchestrator runs it automatically.

Context

See SKILL.md for configuration, execution rules, and MUST-GATEs.

Purpose

Create a comprehensive inventory of all code that needs to be analyzed. This becomes the source of truth for GATE-5 (FULL-COVERAGE) compliance.

How it works

The Python build_inventory() function:

  1. Enumerates all source files (12+ languages supported)
  2. Excludes test, mock, vendor, generated, and build output files
  3. Extracts all functions/methods per file (AST for Python, regex for others)
  4. Computes SHA-256 checksum per file
  5. Records excluded files with reasons
  6. Carries forward checked_by coverage from previous runs (unchanged files only)

Output Format

{
  "generated_at": "ISO timestamp",
  "target_path": "/path/to/repo",
  "total_files": 200,
  "total_items": 1920,
  "total_functions": 1847,
  "total_sloc": 42000,
  "skipped_files": 15,
  "excluded_files": [
    {"path": "tests/test_auth.py", "reason": "pattern_match", "pattern_matched": "test_*"}
  ],
  "files": [
    {
      "path": "relative/path/to/file.py",
      "language": "python",
      "lines": 150,
      "sloc": 120,
      "sha256": "a1b2c3...",
      "items": [
        {
          "name": "function_name",
          "kind": "function",
          "line_start": 10,
          "line_end": 25,
          "signature": "def function_name(arg1, arg2)",
          "checked_by": []
        },
        {
          "name": "MAX_RETRIES",
          "kind": "global",
          "line_start": 3,
          "line_end": 3,
          "checked_by": []
        }
      ]
    }
  ]
}

Output

OUTPUT: checklist.json

Binary targets

When the target is a compiled binary (magic-byte detection, never extensions), the builder does not walk source — it discovers the RE substrate RAPTOR already produced for that binary (co-located run artifacts, project sibling run dirs, the project ghidra-attach cache, then out/ghidra-import-<stem>/) and builds the inventory over decompiled function units instead. Candidates are identity-gated; a content-verified re-database (matching binary_sha256 stamp) outranks any unverified one regardless of recency, and an unverified (name-match-only) selection is flagged sha_verified: false and labeled on every surface. Items carry address instead of line_start, source: "decompilation", the decompiler tool, fid where minted, and a metadata.decomp_file + decomp_line_start/decomp_line_end citation into the run's decomp-tree. The checklist grows a top-level substrate block and the run dir gets a binary-substrate.json discovery receipt. An existing decomp-tree is pointed at; when only a re-database exists, the tree is materialized into the RUN directory (never the target dir). A matching binary-validation-handoff.json is imported into attack-paths.json (source binary:handoff, missing evidence as blockers). No substrate → stage 0 refuses with the searched locations and the commands that produce one (raptor-ghidra import --decompile-all, /project ghidra add, /understand <binary> --study). Nothing executes the target.

Findings import dedup

A --findings import collapses PROVABLE duplicates (same sink — file, line, function, canonical vuln_type — AND every vector field equal) so they are validated once; the canonical finding's verdict fans out to each duplicate in the report. Among provably-same rows the evidence-richer one survives as the canonical (ties keep the earlier row), so a stripped-evidence decoy cannot displace the evidenced finding from paid analysis. Conservative by contract: any doubt (a vector field present on only one row, differing hypothesis/title, incomplete sink identity) keeps both rows — the later one is flagged potential_dup:<canonical-id>. Every decision is recorded in dedup-report.json; the import marker carries the deduped count. Nothing here changes a status or verdict.

Capability preflight

Stage 0 ends with a warning-only capability preflight (capability-preflight.json, fresh-or-absent: the previous run's artifact is removed before the probe body, then rewritten). When the run has no binary (none detected under the target, no usable persisted project binary) and no build-execution consent, and memory-corruption findings (or native-language files, in sweep mode) are in scope, it prints a loud banner BEFORE any LLM spend naming the mechanical ceiling — memory-corruption findings can reach at most confirmed_unverified — and the escape hatches (--binary <path>, /project binary add, /project trust build|dynamic). It never refuses the run and never changes a verdict; the validation report renders the same warning in a "Capability Preflight" section.

Shared with /understand

This inventory is the same checklist.json produced by /understand --map (MAP-0 step). Coverage tracking (checked_by) is cumulative across both skills. SHA-256 checksums detect file changes between runs.

Validation

The orchestrator verifies:

  • All source files enumerated (not just sampled)
  • Test/mock files explicitly excluded (with reasons recorded)
  • Each file has functions extracted
  • JSON is valid and parseable

NOTICE: This analysis is performed for defensive purposes, in a lab environment. Full permission has been provided.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert8d3 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The skill is a multi-stage security tool for validating code vulnerabilities. It includes robust defensive instructions to prevent prompt injection from analyzed code and uses sandboxing for all executable operations.

  • Socket8d

    1 alert: gptSecurity

  • Snyk8d

    Risk: CRITICAL · 2 issues

Signed by skilld at e644bea. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago
user-invocable
false

README badge

README badge for gadievron/raptor/exploitability-validation