image-scan

A command for checking container images—packaged files used to run applications—for known security problems and unsafe settings. It can also create an SBOM, a list of the software inside an image.

In plain words
What is it for?
Use it to scan an image reference, Docker image archive, registry path, or existing Trivy, Grype, or Snyk report. It supports vulnerability checks, SBOM creation, base-image review, and registry audits.
Why use it?
It helps find vulnerable packages and document what an image contains before deployment or during an audit.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/hermeticormus/libresecops-claude-code/image-scan
Clone the repo
git clone --depth 1 https://github.com/HermeticOrmus/LibreSecOps-Claude-Code
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 830 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00830
Opus 5 $0.00000 $0.00415
Sonnet 5 $0.00000 $0.00166
Haiku 4.5 $0.00000 $0.00083

Measured 2d ago against content hash d508ebceb656, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

image-scan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/container-security/commands/image-scan.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/image-scan

Scan container images for vulnerabilities and misconfigurations.

Trigger

Use when you need to:

  • Check a container image for known CVEs before deployment
  • Generate an SBOM (Software Bill of Materials) for a container image
  • Evaluate the security posture of a base image before adoption
  • Audit images in a registry for vulnerabilities
  • Meet compliance requirements for container image scanning

Input

One of:

  • Image reference: image:tag or image@sha256:digest
  • Image tarball: docker save output (.tar)
  • Registry path: Full registry URL for remote scanning
  • Scan output: Existing Trivy, Grype, or Snyk report to analyze

Process

Phase 1: Image Analysis

  1. Image identification

    • Pull or reference the image
    • Identify the base image (from layer history or manifest)
    • Determine the OS and version
    • Note the image creation date and layer count
  2. SBOM generation

    # Generate SBOM with Syft
    syft IMAGE:TAG -o cyclonedx-json > sbom.json
    
    # Or with Trivy
    trivy image --format cyclonedx IMAGE:TAG > sbom.json
    

Phase 2: Vulnerability Scanning

  1. OS package vulnerabilities

    # Trivy (comprehensive, fast, offline database)
    trivy image --severity CRITICAL,HIGH IMAGE:TAG
    
    # Grype (pairs with Syft SBOM)
    grype IMAGE:TAG --only-fixed
    
    # Docker Scout
    docker scout cves IMAGE:TAG
    
  2. Application dependency vulnerabilities

    # Trivy scans language-specific deps automatically
    trivy image --vuln-type library IMAGE:TAG
    
    # Grype also scans application deps
    grype sbom:sbom.json
    
  3. Secret scanning

    # Trivy secret scanning
    trivy image --scanners secret IMAGE:TAG
    

Phase 3: Misconfiguration Check

  1. Image configuration
    # Dockle -- CIS Benchmark for images
    dockle IMAGE:TAG
    
    # Trivy misconfiguration scanning
    trivy image --scanners misconfig IMAGE:TAG
    

Phase 4: Prioritization

Read the full file on GitHub · 132 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 132 lines · 0 tokens per session scan A d508ebceb656

Subscribe to this mod's changes

image-scan is a command published in the GitHub repository HermeticOrmus/LibreSecOps-Claude-Code (4 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 830 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.