agentleFS
NVIDIAKnown publisherNVIDIA/NVSentinel/skills/openvex/triage-image-vulnerabilities/SKILL.md

triage-image-vulnerabilities

Skill452 starsChanged 3 months agoApache-2.0View on GitHub

Triage the critical and high vulnerabilities that the image scan reports in the NVSentinel container images. Finds the findings that .openvex.json does not cover, collects evidence for each one, decides whether the image is affected, and adds OpenVEX statements for those that are not. Use this when the weekly or release image scan reports new critical or high alerts.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 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.

  • 2

    Very specific

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

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

    Use this skill when the image scan reports critical or high vulnerabilities that .openvex.json does not cover, for example after the weekly …

    line 15
  2. Very specific:

    Check that the advisory matches the package.

    line 38
  3. Distinctive:

    Run step 1 again on the same images.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Triage Image Vulnerabilities

When to use

Use this skill when the image scan reports critical or high vulnerabilities that .openvex.json does not cover, for example after the weekly scan, after a release scan, or after a new advisory.

SECURITY.md is the source of truth: Handle a Reported Vulnerability says which findings need a statement, and Add a Statement describes each field.

A statement records that the vulnerability does not affect the image. Write one only when the evidence shows that. When the vulnerable code runs and an attacker can reach it, the fix is an update of the dependency or the base image, not a statement.

Inputs

  • The images to triage, for example ghcr.io/nvidia/nvsentinel/gpu-reset:main-6e388be. The weekly scan scans the latest publish from main, tagged main-<short commit>.
  • Docker, jq and yq. The images can be several GB. On a slow connection, run the scan on a CI runner instead.

Steps

  1. Find the findings that the document does not cover:

    scripts/openvex/scan.sh IMAGE...

    For each image, the script prints the critical and high counts without and with .openvex.json, and one line for each finding left: vulnerability ID, package type, name, version, PURL and location. It counts like the weekly scan: the Grype version of .versions.yaml, only findings with a fix, and the severity from the CVSS score. Grype's own severity label can differ, so do not use it.

  2. Read each advisory. Find what the vulnerable code is (a function, a module, a program) and what an attacker needs to reach it. Use the source of the advisory: the Ubuntu or Debian security tracker for deb packages, the Go vulnerability database (https://vuln.go.dev/ID/<ID>.json) for Go modules, GitHub advisories for GHSA- IDs.

    Check that the advisory matches the package. Scanners sometimes map an advisory to the wrong package, for example an advisory about a JavaScript package reported against zlib. Then the justification is vulnerable_code_not_present.

  3. Find what the image runs: its ENTRYPOINT, its chart (distros/kubernetes/), and its source. Note each program it starts, and how: directly, through a shell, or with exec.
  4. Collect the evidence for the kind of package:

    PackageEvidence
    Python package, or a library that a Python program can loadscripts/openvex/trace.sh IMAGE [DOCKER-RUN-OPTION...] -- [COMMAND...] runs the program and lists the Python distributions and OS packages its processes load. Run each mode of the program, as far as it gets without a GPU or a cluster.
    Library of a native binaryldd BINARY in the image. Add the paths to a file and pass it to trace.sh -l to map them to packages. ldd lists only the libraries that the binary links. It does not list the libraries that a program opens at run time with dlopen, for example libibverbs, which NCCL opens. Find those in the source or the documentation of the program.
    A loaded library, where only some functions are vulnerableFrom the advisory or the source of the library, find how the vulnerable code is reached. Then run readelf -W --dyn-syms on each binary and library that the processes load, in an image that has binutils, to list the functions each one imports from the vulnerable library. Imports show only direct calls, so they support the decision but do not prove it. Conclude that the vulnerable code does not run only when the advisory or the source shows that it is reached only through functions that nothing in the image imports, looks up by name, or calls internally, for example from an initializer of a loaded library.
    Go module in a binary that NVSentinel does not build, for example kubectlgovulncheck -mode=binary -show traces BINARY, with the govulncheck version of .versions.yaml, lists potential matches: vulnerable functions that it finds in the binary, or, when it cannot read the symbols, those of the module. A listed function may run. A missing result does not show that the code cannot run, for example when the database does not have the advisory yet, or govulncheck cannot assess the module. Decide from the advisory and from how the image uses the binary.
    Program, for example perl, apt or curlThe programs that step 3 found, and the scripts they run.
  5. Decide for each finding. A finding in a dependency that the repository sets, in a go.mod or poetry.lock file, needs an update, not a statement, as Handle a Reported Vulnerability says.

    EvidenceStatusJustification
    No process of the image loads or runs the vulnerable packagenot_affectedvulnerable_code_not_in_execute_path
    The package is loaded, but the vulnerable functions are not callednot_affectedvulnerable_code_not_in_execute_path
    The vulnerable code is not in the image, or the advisory is about another packagenot_affectedvulnerable_code_not_present
    The vulnerable code runs, but only input that an attacker cannot control reaches itnot_affectedvulnerable_code_cannot_be_controlled_by_adversary
    The vulnerable code runs, and an attacker can reach itno statementStop. Report the finding, the evidence and the fixed version, and ask the maintainer whether to update the dependency or the base image.

    For the third and fourth rows, write down why, because they rely on judgement. For example, the environment of a container comes from its pod spec, which only a user who can already run code in the container can change.

    A statement applies to every tag of the image. When several tags have the package at the same version, for example the DCGM 3.x and DCGM 4.x tags of gpu-health-monitor, collect the evidence for each of them. A statement has no tag, so it also hides the finding on the tags that you did not check: if the evidence does not cover every tag that has the package at that version, add no statement for that image and PURL.

    Evidence that covers only some code paths does not show that a package is never loaded. A trace without a GPU, for example, does not see the code that runs only on a GPU. Write a statement only when other evidence covers the paths that the trace did not reach, for example ldd of the libraries that those paths load. Otherwise keep the finding open. Name the paths and the evidence for them in the pull request.

  6. Write one row for each finding to a TSV file, with five tab-separated fields: vulnerability ID, image, PURL, justification and impact statement. Copy the ID and the PURL from the output of step 1. Keep the impact statement to the reason, in one or two sentences, for example libxml2 is a library of the base image that no NVSentinel process loads. Use the same sentence for findings that have the same reason.

    python3 scripts/openvex/statements.py add rows.tsv
    make openvex-lint

    The script merges the rows into .openvex.json: one statement for each vulnerability and justification, with one product for each image. It formats the document and sets its version to one more than on origin/main.

  7. Run step 1 again on the same images. Each image shows 0 critical and 0 high with the document, except the findings that step 5 stopped on.
  8. Open a pull request with .openvex.json. A maintainer reviews each statement, so its description holds the evidence: for each reason, the findings it covers and how step 4 showed it, and the code paths that the evidence did not cover. Include the counts of step 1 and step 7 for each image.

Output

Report:

  • for each image, the critical and high counts without and with the document
  • the statements added, grouped by reason
  • the findings that need an update instead, with the evidence and the fixed version

Next skill to run

  • prune-openvex-statements, when a base image or a dependency changed since the last statements were written

References

TopicReference
Policy and fields (source of truth)SECURITY.md
OpenVEX justificationsOpenVEX specification
Scriptsscripts/openvex/
Image list of a publishscripts/published-images.sh

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.