container-scan
Skill9 starsChanged 6 days agoApache-2.0View on GitHub
Dockerfile / Containerfile / compose analysis plus optional Trivy / Grype / Syft composition when those binaries are present. Use when reviewing a Dockerfile PR, gating `docker build`, building an image SBOM, evaluating base-image risk, or auditing a registry image for CVEs.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dashboardSkill
- dependency-choiceSkill
- dep-resolveSkill
- detection-rulesSkill
- eol-checkSkill
- exploit-testSkill
- fixSkill
- iac-scanSkill
- license-checkSkill
- repo-impactSkill
- sast-scanSkill
- sbom-generateSkill
- secret-scanSkill
- secure-code-writeSkill
- typosquat-checkSkill
- verify-fixSkill
- vex-publishSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Read .vulnetix/capabilities.yaml.
- Very specific: line 83
Write .vulnetix/containers/<timestamp>.summary.yaml with finding counts by severity.
≈ “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.
Files
Vulnetix Container Scan Skill
Use when
- Pre-build: scan a Dockerfile for misconfigurations and base-image CVEs.
- PR review: detect EOL base images, missing USER, root processes, exposed secrets.
--image registry/img:tag: scan a built image for installed-package CVEs via Trivy/Grype if available.- Compose with Syft to produce a container SBOM (CycloneDX JSON).
- Hardening checklist: USER directive present, healthcheck defined, pinned versions, layer minimisation.
Don't use for
- Source-code SAST — use
sast-scan. - Cloud-config (Terraform / k8s manifests) — use
iac-scan. - Vulnetix CLI itself does not pull images; for
--imageyou needbinaries.dockerorbinaries.podman.
Conventions
Follows skills/_lib/contract.md. In short: use the vulnetix_* MCP tools when the agent has them and the CLI otherwise — both shape their own output, so there is no jq step any more. Independent calls go out as concurrent Bash tool calls in one message. One trailing suggestion, not a playbook. See the contract for surface selection, output style and memory writes.
Step 1: Load capabilities
Read .vulnetix/capabilities.yaml. Note: binaries.{docker,podman,trivy,grype,syft}, repo.{dockerfile,containerfile,compose,docker_compose}. If no container artifacts found AND no --image argument, abort with a one-liner.
Step 2: Run Vulnetix container analysis
vulnetix containers --paths "$DOCKERFILE_PATHS" -o json > .vulnetix/containers.${TIMESTAMP}.jsonOr:
vulnetix scan --enable-containers --paths "$DOCKERFILE_PATHS" -o jsonCaptures: base-image risk, EOL bases, exposed secrets, missing USER, root processes, missing healthchecks, vulnerable system packages.
Step 3: Compose with installed scanners (conditional)
For each available binary:
binaries.trivy: true→trivy config "$DOCKERFILE_PATH" --format json > .vulnetix/containers/trivy.config.json trivy image "$IMAGE" --format json > .vulnetix/containers/trivy.image.json # if --imagebinaries.grype: trueAND--image→grype "$IMAGE" -o json > .vulnetix/containers/grype.jsonbinaries.syft: trueAND--image→syft "$IMAGE" -o cyclonedx-json > .vulnetix/containers/${IMAGE//[\/:]/_}.cdx.json
Merge findings into a unified table; de-dup by CVE+package.
Step 4: Render
| Severity | Source | Issue | File / Layer | Fix |
| Critical | trivy | CVE-... in libxml2 2.9.10 | layer 3 | bump base to alpine:3.19 |Plus a "Hardening checklist" section: USER directive, healthcheck, pinned versions, reduced layers.
Memory update
Write .vulnetix/containers/<timestamp>.summary.yaml with finding counts by severity.
Edge cases & gotchas
- Trivy/Grype/Syft are optional. If absent, the skill runs Vulnetix-only checks (Dockerfile lint + base-image known-CVE list).
- Compose files (docker-compose.yml) are scanned per-service; results are split per service-name.
--imagerequires the image to be pullable (registry auth viadocker login/podman loginfirst).- Trivy DB updates can take 30s on first run; subsequent invocations are cached.
- EOL base-image detection uses
vulnetix vdb product— same eol-status aseol-check. - Layer reordering recommendations are heuristic; if your build has a legitimate reason for the current order, the recommendation may be incorrect.
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
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.

