agentleFS
nurmdrafinurmdrafi/pi-native/skills/security-audit/SKILL.md

security-audit

Skill4 starsChanged 23 days agoMITView on GitHub

Triages and remediates container image and dependency CVEs from scanner output (Docker Scout, Wiz, Grype, Twistlock) against real runtime exposure: separates OS-layer packages, embedded toolchain binaries and npm transitives, picks the correct fix class per finding, proves the residual unreachable instead of asserting it, and produces ticket-ready before/after evidence. Use when a ticket names CVE ids, an image scan, a base image advisory, an SLA'd vulnerability remediation, or asks whether an affected package is reachable. NOT for application code review (→ ponytail review) or unused dependency/file cleanup (→ fallow-audit).

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-stories, propagate-design-change and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • lilangMaxSkill

    create-stories

    Break a single epic into implementable story files. Reads the epic, its GDD, governing ADRs, and control manifest. Each story embeds its GDD requirement TR-ID, ADR guidance, acceptance criteria, story type, and test evidence path. Run after /create-epics for each epic.

    Also in 14 projects that use this

  • lilangMaxSkill

    propagate-design-change

    When a GDD is revised, scans all ADRs and the traceability index to identify which architectural decisions are now potentially stale. Produces a change impact report and guides the user through resolution.

    Also in 13 projects that use this

  • nicepkgSkill

    community-led-growth

    Expert in community-led growth (CLG) - leveraging user communities to drive acquisition, retention, and expansion. Covers building developer communities, user groups, ambassador programs, and turning customers into advocates. Knows the difference between community as a feature vs community as a growth engine, and how to measure community ROI. Use when "community-led, CLG, ambassador program, champion program, user community, developer community, word of mouth, user group, " mentioned.

    Also in 5 projects that use this

  • nicepkgSkill

    ph-community-outreach

    Engage Reddit, Indie Hackers, Hacker News and other communities for Product Hunt launches. Use this skill to identify relevant communities, craft appropriate posts, and drive cross-platform engagement without appearing spammy.

    Also in 5 projects that use this

  • adybaSkill

    team-coordination

    Agent Teams orchestration patterns for multi-agent SAFe workflows. Use when spawning agent teams, coordinating teammates, enforcing quality gates via task dependencies, or orchestrating the 11-agent SAFe pipeline. Covers team creation, messaging, shared task lists, and SAFe gate enforcement. Do NOT use for single-agent or simple subagent workflows.

    Also in 5 projects that use this

  • +5 more from lilangMax
  • +2 more from nicepkg

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a CVE stays open by design, the ticket needs evidence that the vulnerable path is unreachable, per direction of data flow.

    line 56
  2. Distinctive:

    Do not adopt a scanner's recommended base tag or package version without checking it exists and installs.

    line 75
  3. Distinctive:

    Do not exclude a package from the trace because nothing imports it in source: frameworks import packages dynamically.

    line 76
  4. Distinctive:

    Keep the accepted-risk list short and each entry reasoned.

    line 78

“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “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

Container image CVE remediation

A scanner finding says a package is present in an image. It does not say the vulnerable code path can be reached. Both halves decide the ticket answer, and the second half is the one clients ask about.

1 — Read the finding before the score

For each finding record: package, installed version, fixed version, which layer it lives in (base OS package, npm transitive, binary embedded inside another package).

  • Fix class follows the layer, not the severity (step 3).
  • An asset ID that cannot be matched to a running system is its own status line ("unidentified, input requested"), never folded into a host's remediation.
  • A component compiled into a runtime binary (e.g. an HTTP server, a decoder) is not a removable dependency — only a version bump or an unreachability proof applies.

2 — Baseline

docker scout cves <image>:<tag> --only-severity critical,high                    # triage subset
docker scout cves <image>:<tag> --format json > /tmp/scan-before.ndjson          # full inventory
docker scout sbom <image>:<tag> --format json > /tmp/sbom-before.json

Record counts per severity plus the package names, and keep the files: the after-scan diff is the deliverable.

3 — Fix by class

Finding classFixVerification
Base OS packagesNewer base image tagConfirm the tag exists and stays on the same distro line; rebuild and rescan
Transitive npm packageLockfile override (pnpm.overrides / overrides), or a direct dep at the fixed versionCheck the resolved version in the lockfile, not the manifest; a caret in the manifest proves nothing
Direct dependencyUpgradeRun the project's test + typecheck commands
Toolchain binary embedded in a build-only packageExclude it from the build trace (e.g. Next outputFileTracingExcludes)Boot the built server and exercise a request path that imports it
Fix exists but breaks the appRevert; document accepted riskEntry needs CVE, CVSS, why the path is unreachable, and what would change that

An exclusion or override can pass build and tests while breaking the server at boot or on first use: a framework that eagerly requires a package then fails with MODULE_NOT_FOUND / a config-load TypeError. Boot the image and hit a real route before calling it fixed. If a fix breaks the app, record the failing signature in a code comment beside the exclusion so the next reviewer does not re-attempt it.

For dependency-audit runs under any package manager (npm, pnpm, Yarn, bun), the manager mechanics behind the transitive and direct rows — audit/override surfaces, quarantine units, peer-dep traps, meta-to-granular swaps, reify husks, lockstep pins, and a verification ladder — live in references/dependency-audit-fixes.md.

4 — Verify the remediation

  1. Rebuild (use --no-cache once to prove the result does not depend on layer cache; static generation may OOM on constrained hosts — a retry is a legitimate second attempt).
  2. Boot the container, check the health route and the main page returns 200.
  3. Rescan and diff:
docker scout cves <image>:<tag> --format json > /tmp/scan-after.ndjson
  1. Confirm the removed package is absent from the shipped image, not just from the manifest: SBOM dump plus an in-container listing (ls node_modules/.pnpm | rg <pkg>, dpkg -l | rg <pkg>).

5 — Prove the residual, do not assert it

When a CVE stays open by design, the ticket needs evidence that the vulnerable path is unreachable, per direction of data flow. For a decoder or parser:

  • Inbound: send a malformed payload with the relevant Content-* header and show it is not decoded (status, body untouched, no crash).
  • Outbound: show what the app advertises upstream (accept-encoding, content types) — an upstream cannot send what was never accepted.
  • Responses: show which encodings the app emits and what it does when the client asks for the vulnerable format only.
  • Presence: show the library is absent from the image, or present only inside a binary that no request path reaches.

Record the exact probes and their outputs in the report; "not exploitable" without a probe is the finding that comes back next quarter.

6 — Ticket artifacts

  • Answer the ticket's required actions in its own numbering, one section per action.
  • Per-resource table for every listed resource: owner, status, action, target date. Distinguish what this team can execute (vendor access) from what the client must run.
  • Host-tier items: SUSE/RHEL-style vendors backport fixes, so the upstream version number stays old and the release suffix carries the patch — check the vendor tracker for the advisory instead of comparing upstream versions.
  • Interim control when no vendor fix exists: block the format/service that reaches the vulnerable path, and say which service that is.
  • Neutralize client identifiers in committed docs per the repo's portability rules (<project-a>, <org>, <vendor>); keep dates and CVE ids.

Guard rails

  • Do not adopt a scanner's recommended base tag or package version without checking it exists and installs.
  • Do not exclude a package from the trace because nothing imports it in source: frameworks import packages dynamically. Grep the framework's own loader, then boot-test.
  • A green local typecheck is not the image build's type gate — next build inside the image type-checks again and catches what a stale local run missed.
  • Keep the accepted-risk list short and each entry reasoned; a long list means a fix was skipped, not assessed.

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.