Fernando Ramos← All skills08 of 09
← All skills

/red-team

Prove · Vulnerability reachability and local reproduction

Runs osv-scanner on lockfiles, traces reachability with rg and ast-grep, optionally enriches via gh, and records every advisory across five explicit triage states.

npx skills@latest add luci-efe/skills -s red-team

  • ProveStage
  • 03 Evidence of doneMethod
  • .ramos/red-team/report.md · .ramos/red-team/osv.jsonProduced artifact / output

Use when

Dependencies or lockfiles changed, an advisory or CVE landed, or before a release.

Support & adapters

  • Instructions usable across harnesses

Decision tree

  1. 01

    1. Lockfile scan (osv-scanner)

    Run osv-scanner scan source -r --format json --output-file .ramos/red-team/osv.json . (exit 0 clean, exit 1 vulns, exit 128/other = unknown)

    → .ramos/red-team/osv.json
  2. 02

    2. Triage reachability (rg + ast-grep)

    Check resolved lockfile version, then trace imports/calls with rg -n and ast-grep run -p; optionally enrich via gh api

    → not affected (version) | not found within stated coverage | suspected
  3. 03

    3–4. Local reproduction & minimal fix

    Write a failing test in the repo suite against a local checkout to confirm exploit, then bump via osv-scanner fix and hand to /proof

    → .ramos/red-team/report.md

Prerequisites & install recipes

  • osv-scannerrequired · scan & github-enrich branchesosv-scanner
    brew install osv-scanner
  • rgrequired · scan branchrg
    brew install ripgrep
  • ast-greprequired · scan branchast-grep
    brew install ast-grep
  • ghoptional · github-enrich branchgh
    brew install ghOptional read-only Dependabot alert enrichment

Completion criteria

  • Lists every advisory in .ramos/red-team/report.md as confirmed | suspected | not affected (version) | not found within stated coverage | unknown.
  • Treats missing lockfiles (exit 128) or scanner errors as unknown, never as a clean bill.
  • Reproduces exploits only against a local checkout or owned test environment inside the repo test suite.

Example

A read-only OSV scan of a public project with Bun lockfiles and a Python requirements file, followed by a check of whether each noisy package is actually reachable from the code.

What was run

mkdir -p $RAMOS_STATE_DIR/red-team
osv-scanner scan source -r --format json --output-file $RAMOS_STATE_DIR/red-team/osv.json .    # osv-scanner 2.7.0
echo $?                                                                                        # 1 = vulnerabilities found
bun pm why undici                                                                              # direct or transitive?
rg -n -w <pkg> ...; ast-grep run -p 'import $$$ from "undici"' -l ts .                         # is it reachable?

Output (excerpt)

3 manifests scanned (bun.lock 215 packages, apps/docs/bun.lock 830, requirements-dev.txt 5), 120 advisory rows

package                 advisories  direct?                           finding
undici (two versions)   21 each     transitive, via build tooling     not found within stated coverage
starlette               14          transitive, test-only pin         suspected (hosting question)
brace-expansion         6           transitive                        not found within stated coverage
anyio                   4           transitive                        not found within stated coverage
js-yaml                 4           transitive                        not found within stated coverage

What it found. All findings sit in transitive, dev-only or test-only dependencies, and none of the top five packages is imported by repo code. Zero rows are marked confirmed because no reproducing test was written. The one real item for a human is the starlette hosting question.

Caveat. "Not found within stated coverage" is grep and AST based; it cannot see dynamic loading. Exit 1 from the scan means advisories were found, and exit 128 would mean nothing scannable, never clean.

View skill source on GitHub

Want something like this built for your company?

Book a callMessage me on LinkedInSee Agentic Engineering
← All skills