agentleFS
notquenotque/vexjoy-agent/skills/infrastructure/cve-source-check/SKILL.md

cve-source-check

Skill448 starsChanged 5 days agoMITView on GitHub

Audit CVE/vulnerability source coverage for a technology stack. Maps each component (container, library, base image, runtime) to authoritative CVE feeds, flags gaps, and produces audit-ready reports. Generic: works for any service or stack.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If --current-sources provided, read URLs and normalize for case-insensitive comparison.

    line 84
  2. Very specific:

    Look up each component name (and aliases) in the registry.

    line 90
  3. Very specific:

    If current sources loaded, mark each source monitored: true when its normalized URL appears.

    line 92
  4. Very specific:

    If --check-urls: HEAD-check each unique URL.

    line 93
  5. Very specific:

    Gate: every component has status.

    line 95
  6. Very specific:

    Write JSON report with per-component status and per-source monitored/reachable fields.

    line 100
  7. Distinctive:

    Write Markdown report: summary table, components table (markers), gaps section (when gaps exist), unmapped section (when unmapped exist).

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CVE Source Check

Audit CVE/vulnerability source coverage for a technology stack. Maps components to authoritative CVE feeds via a versioned registry, flags gaps, and produces audit-ready reports (JSON + Markdown).

In scope: component-to-feed mapping, coverage/gap reporting, optional URL reachability checks. Out of scope: running scanners (Trivy/Snyk), fetching CVE content, private vuln databases.

Quick Start

# Inline, offline
python3 scripts/check-cve-sources.py \
  --inline "go@1.22,alpine@3.19,postgres@16,redis@7,nginx@1.25" \
  --service my-service

# Inventory + monitored feeds + link verification
python3 scripts/check-cve-sources.py \
  --inventory examples/inventory.example.json \
  --current-sources examples/current-sources.example.txt \
  --service my-service --check-urls

Inputs

FlagPurpose
--inventory <file>JSON: [{name, version?, type?}, ...] or {components: [...]}.
--inline "name@ver,..."Comma-separated list. Mutually exclusive with --inventory.
--current-sources <file>One URL per line. # comments and blank lines skipped.
--service <name>Name for report header and filenames.
--check-urlsHEAD-check every source URL (5s timeout, graceful degradation).
--registry <path>Override default tech-source-registry.json.
--out-dir <path>Output directory (default: cwd).

JSON only. YAML not supported (no stdlib parser).

Outputs

Files: cve-source-report-{service}-{YYYYMMDD}.{md,json} in --out-dir.

ExitMeaning
0Full coverage.
1Gaps (unmapped components or unmonitored sources).
2Unreachable source URL (only with --check-urls).
3Input error (missing/malformed registry or inventory).

Workflow

Phase 1: LOAD

  1. Locate tech-source-registry.json (next to SKILL.md by default, or --registry).
  2. Build inventory from --inventory (JSON list or {components: [...]}) or --inline (comma-split name@version).
  3. If --current-sources provided, read URLs and normalize for case-insensitive comparison.

Gate: at least one component present. Empty inventory -> exit 3.

Phase 2: MAP & VERIFY

  1. Look up each component name (and aliases) in the registry.
    • Found -> mapped, attach source list. Missing -> unmapped, sources [].
  2. If current sources loaded, mark each source monitored: true when its normalized URL appears.
  3. If --check-urls: HEAD-check each unique URL. Treat 200/301/302/403/405 as reachable. 4xx (except 403/405) and 5xx -> reachable: false. Timeout/DNS/TLS failure -> reachable: null (WARN, does not affect exit code). 5s timeout per URL, cached per run.

Gate: every component has status; every source has monitored and reachable fields.

Phase 3: REPORT

  1. Compute summary: components, mapped/unmapped, monitored, coverage %, gaps, unreachable.
  2. Write JSON report with per-component status and per-source monitored/reachable fields.
  3. Write Markdown report: summary table, components table (markers), gaps section (when gaps exist), unmapped section (when unmapped exist).
  4. Print one-screen summary to stdout. Set exit code per table above.

Gate: both files written, summary printed.

Registry Schema

tech-source-registry.json shape:

{
  "$schema_version": "1.0",
  "kinds": ["advisory-list", "github-security", "mailing-list", "distro-tracker", "vendor-page", "mitre"],
  "priorities": ["primary", "secondary"],
  "technologies": [
    {"name": "postgres", "aliases": ["postgresql","pg"], "type": "container",
     "sources": [{"url": "https://...", "kind": "advisory-list", "priority": "primary"}]}
  ]
}

Each technology: name (lowercase, unique), aliases (list), type (runtime/base-image/container/library), sources (1-3, at least one primary).

To add a technology: pick canonical name, list aliases, add 1-3 sources (lead with vendor advisory page), re-run against a sample inventory.

Error Handling

ErrorCauseFix
Failed to load registryMissing or malformed JSONValidate with python3 -m json.tool
Failed to load inventoryMissing, malformed, or wrong shapeValidate JSON; must be list or {components: [...]}
Inventory emptyNo usable componentsEach entry needs name. Inline needs non-empty tokens.
Coverage stuck at 0%--current-sources URLs don't match registryCopy URLs from registry. Scheme/host case and trailing slash are normalized; rest must match.
Many [--] entries with --check-urlsNetwork issuesRe-run without --check-urls. Network errors don't affect gap exit code.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.