Dependency CVE audit
Audit locked npm dependencies against OSV advisories and emit exact-version CVE evidence.
Overview
In the manual
Runner
default
Declared by its execution profile. Read the profile
SKILL.md
What this skill does
This skill audits a Node.js project's committed package-lock.json for known
vulnerabilities in npm dependencies. It extracts exact installed package
versions, queries the OSV API for each exact { ecosystem, package, version }
tuple, and emits a machine-checkable evidence packet plus a concise Markdown
report.
The skill is read-only. It does not install dependencies, execute target code, modify repositories, open issues, submit advisories, or claim that a package is safe when OSV returns no matching record. A zero-finding result means only that OSV did not return advisories for the exact versions scanned under the selected scope.
When to use this skill
Use this skill when an agent needs a reproducible dependency vulnerability snapshot for a public Node.js project, release candidate, benchmark fixture, or security review packet. It is appropriate when the lockfile is public or has been explicitly cleared for disclosure to OSV, and when the review needs exact installed-version evidence rather than semver range guesses.
The skill is especially useful before triage, upgrade planning, advisory drafting, or reviewer handoff because it preserves the lockfile SHA-256, the scan policy, the OSV query tuple for every finding, and references for each advisory.
When not to use this skill
Do not use this skill for private lockfiles unless the package names, versions, and lockfile URL/path are approved for disclosure to the advisory source. Do not use it as a full application security review, source-code audit, exploitability assessment, SBOM generator, package installer, or automated remediation tool.
Do not use the output as proof that a project is vulnerability-free. The result depends on OSV coverage at run time, the selected dependency scope, and the contents of the supplied lockfile.
Procedure
- Read
package_lock_pathorpackage_lock_url. - Record byte length and SHA-256 for the lockfile input.
- Extract exact installed package versions from the lockfile.
- Limit the scan to the declared
scan_scopeandinclude_devpolicy. - Query OSV only with exact npm package names and exact installed versions.
- Keep only vulnerabilities returned by OSV for that exact version query.
- Emit
dependency.cve.audit.result.v1with findings, query evidence, and validation. - Write
evidence.jsonandreport.mdwhenoutput_diris provided.
Edge cases and stop conditions
Return needs_input when neither package_lock_path nor package_lock_url is
provided. Return needs_more_evidence when the target repository or immutable
reference is missing and the audit is intended for publication. Return
refused when the caller asks the skill to install packages, execute target
code, read private repository contents without an explicit grant, publish an
advisory, or mutate the target repository.
Stop with an error when the lockfile cannot be read, when the URL is not HTTPS,
when the lockfile is not valid JSON, or when it does not contain a packages
object.
For local paths and output paths, the resolved path must stay inside the skill directory. This prevents the runner from reading or writing unrelated workspace files.
If an OSV request fails, stop instead of returning a partial success packet. If
scan_scope is direct, skip direct dependencies whose installed package entry
is missing from packages; do not invent versions from semver declarations.
The output is evidence for dependency triage, not an authorization to publish a security advisory or mutate a repository. Any later issue filing, advisory publication, or remediation PR needs its own authority gate and receipt.
Output schema
The primary output is dependency_cve_audit_result, with schema
dependency.cve.audit.result.v1:
{
"schema": "dependency.cve.audit.result.v1",
"data": {
"target": {
"name": "string | null",
"repo": "string | null",
"ref": "string | null"
},
"source": {
"kind": "file | url",
"ref": "string",
"bytes": 0,
"sha256": "hex"
},
"scanner": {
"name": "dependency-cve-audit",
"version": "0.1.1",
"advisory_source": "OSV.dev v1 query API",
"advisory_endpoint": "https://api.osv.dev/v1/query"
},
"policy": {
"ecosystem": "npm",
"scan_scope": "direct | all",
"include_dev": false,
"target_code_executed": false,
"target_packages_installed": false,
"finding_rule": "string"
},
"summary": {
"dependencies_scanned": 0,
"packages_with_findings": 0,
"findings": 0
},
"dependencies": [],
"findings": [],
"validation": {
"valid": true,
"every_finding_has_exact_version": true,
"every_finding_has_reference": true,
"every_finding_has_advisory_id": true,
"zero_false_hit_control": "string"
}
}
}When output_dir is provided, the runner also writes evidence.json and
report.md inside that directory and returns their relative paths in
data.artifacts.
Worked example
The harness scans OWASP NodeGoat at commit
c5cb68a7084e4ae7dcc60e6a98768720a81841e8 using the committed
package-lock.json:
runx skill "$PWD" \
--input target_name="OWASP NodeGoat" \
--input target_repo=https://github.com/OWASP/NodeGoat \
--input target_ref=c5cb68a7084e4ae7dcc60e6a98768720a81841e8 \
--input package_lock_url=https://raw.githubusercontent.com/OWASP/NodeGoat/c5cb68a7084e4ae7dcc60e6a98768720a81841e8/package-lock.json \
--input scan_scope=direct \
--input include_dev=false \
--input output_dir=artifacts/nodegoat \
--jsonExpected evidence shape:
source.sha256records the fetched lockfile hash.summary.dependencies_scannedis the number of direct production npm dependencies found in the lockfile.- Each finding contains the exact installed version, OSV advisory id, aliases, fixed versions when listed, affected ranges, and references.
validation.validis true only when every finding includes an exact version, advisory id, and at least one reference.
Inputs
target_name: human-readable project name.target_repo: source repository URL.target_ref: immutable commit or release reference.package_lock_path: local path to apackage-lock.json.package_lock_url: public URL for apackage-lock.json.scan_scope:directorall; defaults todirect.include_dev: include dev dependencies when true; defaults to false.output_dir: optional directory forevidence.jsonandreport.md.
Outputs
dependency_cve_audit_result: complete packet.evidence_json: same evidence as machine-checkable JSON.report_md: concise report with exact version findings and references.
Source
Published execution profile
The execution profile published with sha-3fb60ae8f91a, shown as its exact bytes.
| Runner |
|
|---|---|
| Profile digest | sha256:2aefa50c0955ef98762515126686d57ced7b7f232ea1668bd3acd7c939afd944 |
skill: dependency-cve-audit
version: 0.2.1
catalog:
kind: skill
audience: public
visibility: public
role: canonical
category: security
runners:
default:
default: true
inputs:
target_name:
type: string
required: true
description: Human-readable project name.
target_repo:
type: string
required: true
description: Public source repository URL.
target_ref:
type: string
required: false
description: Immutable commit, tag, or release reference.
package_lock_path:
type: string
required: false
description: Local package-lock.json path inside the skill directory.
package_lock_url:
type: string
required: false
description: Public package-lock.json URL.
scan_scope:
type: string
required: false
default: direct
description: direct or all dependencies.
include_dev:
type: boolean
required: false
default: false
description: Include development dependencies.
output_dir:
type: string
required: false
description: Directory inside the skill directory where artifacts should be written.
steps:
- id: default
tool:
command: node
args:
- run.mjs
inputs:
target_name: $input.target_name
target_repo: $input.target_repo
target_ref: $input.target_ref
package_lock_path: $input.package_lock_path
package_lock_url: $input.package_lock_url
scan_scope: $input.scan_scope
include_dev: $input.include_dev
output_dir: $input.output_dir
outputs:
dependency_cve_audit_result:
required: false
evidence_json:
required: false
report_md:
required: false
data:
required: false
schema:
required: false
scopes:
- dependencies.read
- advisories.osv.query
harness:
cases:
- name: nodegoat-cve-audit
inputs:
target_name: OWASP NodeGoat
target_repo: https://github.com/OWASP/NodeGoat
target_ref: c5cb68a7084e4ae7dcc60e6a98768720a81841e8
package_lock_url: https://raw.githubusercontent.com/OWASP/NodeGoat/c5cb68a7084e4ae7dcc60e6a98768720a81841e8/package-lock.json
scan_scope: direct
include_dev: false
expect:
status: sealed
operator_journeys:
- mode: standalone
confusors:
- cve-audit
- sbom-maker
request: Audit these dependencies for known CVEs.
expected_outcome: Return a reproducible audit of advisories against the exact dependency versions.
- mode: composed
request: Continue this dependency-cve-audit work from evidence already gathered upstream.
expected_outcome: Return a reproducible audit of advisories against the exact dependency versions.
prior_evidence:
- The dependency manifest already supplied.
must_not_repeat:
- Do not upgrade or patch dependencies.
- name: missing-lockfile
inputs:
target_name: Empty Project
target_repo: https://github.com/example/empty
expect:
status: failure
Published package and test evidence.
This exact version passed its recorded harness run: 2 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | sha-3fb60ae8f91a |
| Recorded result | 2 checks passed · 0 failed |
| Result source | Reported by the publisher (runx_registry_publish) |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 2 |
| Test record | Open the recorded run |
Inspect receipt references
sha256:a80e4a3fe4f00de6a444140eaf8d192c32d500f820fbcc7053548a76f0474161sha256:eeb3d13934447170d864dbb49088c250822d17b506115bf65aba7ab942964afdPackage identity
| Published revision | sha-3fb60ae8f91a |
|---|---|
| Content digest | sha256:3fb60ae8f91a07454e8554b969fb9a04d687270f673c2456af320796336a69f3 |
| SKILL.md digest | sha256:a032afe7324d230267bb0c093d04078aee24080967d575e5a375d4ad302e5e9b |
| Execution profile digest | sha256:2aefa50c0955ef98762515126686d57ced7b7f232ea1668bd3acd7c939afd944 |
| Publisher identity | Unverified publisher · codeboost-tr |
| Trust tier | CommunityPublished through the registry without publisher verification. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
sha-3fb60ae8f91aViewingContent digest sha256:3fb60ae8f91a07454e8554b969fb9a04d687270f673c2456af320796336a69f3sha-31767360404fContent digest sha256:31767360404ffb852606a4b28f42a869b951c35490c87c7910dd759675b2c506sha-c034623e7fbfContent digest sha256:c034623e7fbfa9b6f2a1b8ebe4a64d3e9579e1417ae236566f1ec822fd865de8sha-a6b962f88e9aContent digest sha256:a6b962f88e9a5f1b1391b8458a25e14fddb410cea08c356513b54c5f5c84793e