Skip to content
Specialist context agent · Code

Security Audit

A dependency vulnerability audit agent for Claude Code, Codex and Cursor

Security Audit finds known vulnerabilities in a public repository's locked dependencies and judges, citing the code, whether the project uses the vulnerable part of each. It works from the context ContextStream picks for the job.

Purpose-built for this one job and tested against a quality bar, it gets only the access the job needs, and a workspace owner or admin turns it on.

Or run it in the ContextStream web app, signed in with your ContextStream account. Version 0.1.0 · Updated

What does Security Audit do?

Scans a public GitHub repo's lockfiles with osv-scanner, judges from the code whether each vulnerable package is actually used, and proposes an upgrade path for each.

What it declines

It does one job. A task like one of these is declined with a reason:

  • Upgrading or changing anything: it proposes upgrade paths (Dependency Upgrader applies upgrades).
  • Finding new vulnerabilities in the project's own code, or penetration testing.
  • Private repositories, or anything that needs credentials.
  • Fixing failing tests (CI Fixer does that).

What can Security Audit access, and is it safe to turn on?

Security Audit gets a short-lived token for one workspace that lets it do only this: call models through ContextStream's model proxy, within a cap set for the run; and read the lessons, preferences and decisions ContextStream picks for its job. It works in one project, only for that run, and declines any task outside its job. Security Audit is read-only: it changes nothing in your workspace. It runs code only in its own isolated sandbox, which holds no credentials and reaches only 6 allowed hosts. A workspace owner or admin turns it on.

Model agent with a sandbox. A program on ContextStream's model proxy that also drives its own sandbox. The sandbox holds no credentials. Its sandbox reaches github.com, codeload.github.com, objects.githubusercontent.com, release-assets.githubusercontent.com, api.osv.dev, api.deps.dev. It is stopped after 15 min.

ScopeWhat it lets a run do
model.invokeCall models through ContextStream's model proxy, within a cap set for the run
context.readRead the lessons, preferences and decisions ContextStream picks for its job

How is Security Audit tested?

Security Audit is checked on 9 cases, each with a known right answer: fixture repositories with known vulnerabilities in their lockfiles, inputs it must refuse with a clear error, and requests outside its job it must decline. A case passes only if the run ends the way the case expects, declining what is not its job, and every check holds: every vulnerability gets the expected verdict and fixed version, no finding is invented, every line it cites is a real line of the repository, and every vulnerability it calls reachable cites the code that reaches it. The scanner's output, the repositories and the model's replies are fixed test data, so the cases check how every claim is held to the code, not the live model's own judgement. Version 0.1.0 passes all 9.

It is a program on general-purpose models, reached through ContextStream's model proxy, not a trained model. Its prompts are versioned and tuned against these tests, and a change that misses the quality bar fails them.

What does a real run of Security Audit look like?

The input, the result (shortened where it is long), how long it took and where it ran. Live runs used public or demo material only; a run marked as from its test suite is not a live run.

Live run on ContextStream

Advisories in OWASP NodeGoat's lockfile, judged for reachability

Version
0.1.0
Outcome
succeeded
Ran
2026-10-28 00:12 UTC
Took
49.7 s

ContextStream's Demos workspace, on the public repository github.com/OWASP/NodeGoat (a deliberately vulnerable app for teaching web security) at c5cb68a7. The checkout and osv-scanner ran in an E2B sandbox, started for this run and removed after it.

Input
{
  "repo_url": "https://github.com/OWASP/NodeGoat",
  "ref": "c5cb68a7084e4ae7dcc60e6a98768720a81841e8",
  "focus": "the Express routes and session handling"
}

Result

203 known vulnerabilities in 69 packages: 0 reachable, 7 uncertain, 18 not reachable, 178 not judged. Start with GHSA-v8w9-2789-6hhr in bson (critical): Upgrade mongodb-core to a release that depends on bson 1.1.4 or later, or override bson to 1.1.4.

Findings

AdvisoryPackageSeverityUsed by the code?WhyUpgrade
GHSA-4g88-fppr-53ppset-value 0.4.3criticalnot reachable[email protected] is only a transitive dependency of cache-base/union-value; no project code imports it and nothing in the evidence shows the vulnerable set() function being called on untrusted input.Upgrade cache-base, union-value to a release that depends on set-value 2.0.1 or later, or override set-value to 2.0.1.
GHSA-4g88-fppr-53ppset-value 2.0.0criticalnot reachable[email protected] is only a transitive dependency of cache-base/union-value; no project code imports it and nothing in the evidence shows the vulnerable set() function being called on untrusted input.Upgrade cache-base, union-value to a release that depends on set-value 2.0.1 or later, or override set-value to 2.0.1.
GHSA-896r-f27r-55mwjson-schema 0.2.3criticalnot reachablejson-schema is pulled in transitively through jsprim, which is used by request's HTTP-signature support; the project does not import json-schema and no evidence shows its validation code being used.Upgrade jsprim to a release that depends on json-schema 0.4.0 or later, or override json-schema to 0.4.0.
GHSA-8r6j-v8pm-fqw3fsevents 1.2.9criticalnot reachablefsevents is an optional macOS file-watching dependency of chokidar, used only by development/build tooling; the project does not import it and it is not part of the runtime application code.Upgrade chokidar to a release that depends on fsevents 1.2.11 or later, or override fsevents to 1.2.11.
GHSA-957j-59c2-j692getobject 0.1.0criticalnot reachablegetobject is pulled in only by grunt-legacy-util, a build-tool dependency; the project does not import it and no application code uses it.Upgrade grunt-legacy-util to a release that depends on getobject 1.0.0 or later, or override getobject to 1.0.0.
GHSA-cf4h-3jhx-xvhqunderscore 1.8.3criticalnot reachableThe only evidence is the require of underscore in config/config.js; no line uses the vulnerable template/templateSettings functions, so the advisory's arbitrary-code-execution path is not shown to be used.Upgrade underscore from 1.8.3 to 1.12.1 or later.
GHSA-cf4h-3jhx-xvhqunderscore 1.9.1criticalnot reachableThe only evidence is the require of underscore in config/config.js; no line uses the vulnerable template/templateSettings functions, so the advisory's arbitrary-code-execution path is not shown to be used.Upgrade underscore from 1.9.1 to 1.12.1 or later.
GHSA-fhjf-83wg-r2j9mixin-deep 1.3.1criticalnot reachablemixin-deep is a transitive dependency of base, a build-tooling library; the project does not import it and no evidence shows mixinDeep being called with untrusted input.Upgrade base to a release that depends on mixin-deep 1.3.2 or later, or override mixin-deep to 1.3.2.
GHSA-qh2h-chj9-jffqgrowl 1.9.2criticalnot reachablegrowl is pulled in only by mocha, which is test tooling; the project does not import growl and its command-injection path is not used by application code.Upgrade mocha to a release that depends on growl 1.10.0 or later, or override growl to 1.10.0.
GHSA-v8w9-2789-6hhrbson 1.0.9criticaluncertainbson is a transitive dependency of mongodb-core; the project does not import bson directly, and the evidence does not show whether the application deserializes untrusted BSON with an attacker-controlled _bsontype.Upgrade mongodb-core to a release that depends on bson 1.1.4 or later, or override bson to 1.1.4.
GHSA-xvch-5gv4-984hminimist 0.0.10criticalnot reachable[email protected] is pulled in only by tooling (coveralls, cypress, detect-indent, meow, mkdirp); the project does not import it and its setKey prototype-pollution path is not used by application code.Upgrade coveralls, cypress, detect-indent to a release that depends on minimist 0.2.4 or later, or override minimist to 0.2.4.
GHSA-xvch-5gv4-984hminimist 0.0.8criticalnot reachable[email protected] is pulled in only by tooling (coveralls, cypress, detect-indent, meow, mkdirp); the project does not import it and its setKey prototype-pollution path is not used by application code.Upgrade coveralls, cypress, detect-indent to a release that depends on minimist 0.2.4 or later, or override minimist to 0.2.4.
GHSA-xvch-5gv4-984hminimist 1.2.0criticalnot reachable[email protected] is pulled in only by tooling (coveralls, cypress, detect-indent, meow, mkdirp); the project does not import it and its setKey prototype-pollution path is not used by application code.Upgrade coveralls, cypress, detect-indent to a release that depends on minimist 1.2.6 or later, or override minimist to 1.2.6.
GHSA-xvch-5gv4-984hminimist 1.2.5criticalnot reachable[email protected] is pulled in only by tooling (coveralls, cypress, detect-indent, meow, mkdirp); the project does not import it and its setKey prototype-pollution path is not used by application code.Upgrade coveralls, cypress, detect-indent to a release that depends on minimist 1.2.6 or later, or override minimist to 1.2.6.
GHSA-fjxv-7rqg-78g4form-data 0.1.4criticaluncertainform-data is a transitive dependency of request; the project does not import form-data directly, and the evidence does not show whether the application sends multipart/form-data requests with attacker-influenced fields that would expose the predictable boundary.Upgrade request to a release that depends on form-data 2.5.4 or later, or override form-data to 2.5.4.
GHSA-fjxv-7rqg-78g4form-data 1.0.1criticaluncertainform-data is a transitive dependency of request; the project does not import form-data directly, and the evidence does not show whether the application sends multipart/form-data requests with attacker-influenced fields that would expose the predictable boundary.Upgrade request to a release that depends on form-data 2.5.4 or later, or override form-data to 2.5.4.
GHSA-fjxv-7rqg-78g4form-data 2.1.4criticaluncertainform-data is a transitive dependency of request; the project does not import form-data directly, and the evidence does not show whether the application sends multipart/form-data requests with attacker-influenced fields that would expose the predictable boundary.Upgrade request to a release that depends on form-data 2.5.4 or later, or override form-data to 2.5.4.
GHSA-fjxv-7rqg-78g4form-data 2.3.3criticaluncertainform-data is a transitive dependency of request; the project does not import form-data directly, and the evidence does not show whether the application sends multipart/form-data requests with attacker-influenced fields that would expose the predictable boundary.Upgrade request to a release that depends on form-data 2.5.4 or later, or override form-data to 2.5.4.
GHSA-xv26-6w52-cph6websocket-driver 0.7.0criticaluncertainwebsocket-driver is a transitive dependency of faye-websocket; the project does not import it directly, and the evidence does not show whether the application runs a WebSocket server that parses untrusted frames with the vulnerable length-header handling.Upgrade faye-websocket to a release that depends on websocket-driver 0.7.5 or later, or override websocket-driver to 0.7.5.
GHSA-jf85-cpcp-j695lodash 2.4.2criticalnot reachable[email protected] is pulled in transitively by async/babel tooling; the project does not import lodash and no evidence shows the vulnerable defaultsDeep function being called.Upgrade async, babel-generator, babel-template to a release that depends on lodash 4.17.12 or later, or override lodash to 4.17.12.
GHSA-jf85-cpcp-j695lodash 4.17.11criticalnot reachable[email protected] is pulled in transitively by async/babel tooling; the project does not import lodash and no evidence shows the vulnerable defaultsDeep function being called.Upgrade async, babel-generator, babel-template to a release that depends on lodash 4.17.12 or later, or override lodash to 4.17.12.
GHSA-jqcg-44mw-7w3hproxy-addr 2.0.4criticaluncertainproxy-addr is a transitive dependency of express and is used for req.ip/req.ips, but the advisory requires a specific malformed trust-proxy subnet; the evidence does not show the project's trust proxy configuration or whether routes rely on req.ip for access control.Upgrade express to a release that depends on proxy-addr 2.0.8 or later, or override proxy-addr to 2.0.8.
GHSA-jp4x-w63m-7wgmhoek 0.9.1highnot reachable[email protected] is pulled in transitively by boom/hawk/sntp, which are used by request's HTTP-signature support; the project does not import hoek and no evidence shows merge/applyToDefaults being called with untrusted JSON.Upgrade boom, hawk, sntp to a release that depends on hoek 4.2.1 or later, or override hoek to 4.2.1.
GHSA-jp4x-w63m-7wgmhoek 2.16.3highnot reachable[email protected] is pulled in transitively by boom/hawk/sntp, which are used by request's HTTP-signature support; the project does not import hoek and no evidence shows merge/applyToDefaults being called with untrusted JSON.Upgrade boom, hawk, sntp to a release that depends on hoek 4.2.1 or later, or override hoek to 4.2.1.
GHSA-3ppc-4f35-3m26minimatch 0.3.0highnot reachableminimatch is pulled in only by build/file-watching tooling (forever-monitor, fstream-ignore, glob); the project does not import it and no evidence shows minimatch being called with attacker-controlled glob patterns.Upgrade forever-monitor, fstream-ignore, glob to a release that depends on minimatch 3.1.3 or later, or override minimatch to 3.1.3.

audit.md

# Security audit of https://github.com/OWASP/NodeGoat

osv-scanner 2.7.0 over 1 lockfile(s).

| Vulnerability | Package | Severity | Verdict | Upgrade |
| --- | --- | --- | --- | --- |
| GHSA-4g88-fppr-53pp | [email protected] (transitive) | critical | not_reachable | Upgrade cache-base, union-value to a release that depends on set-value 2.0.1 or later, or override set-value to 2.0.1. |
| GHSA-4g88-fppr-53pp | [email protected] (transitive) | critical | not_reachable | Upgrade cache-base, union-value to a release that depends on set-value 2.0.1 or later, or override set-value to 2.0.1. |
| GHSA-896r-f27r-55mw | [email protected] (transitive) | critical | not_reachable | Upgrade jsprim to a release that depends on json-schema 0.4.0 or later, or override json-schema to 0.4.0. |
| GHSA-8r6j-v8pm-fqw3 | [email protected] (transitive) | critical | not_reachable | Upgrade chokidar to a release that depends on fsevents 1.2.11 or later, or override fsevents to 1.2.11. |
| GHSA-957j-59c2-j692 | [email protected] (transitive) | critical | not_reachable | Upgrade grunt-legacy-util to a release that depends on getobject 1.0.0 or later, or override getobject to 1.0.0. |
| GHSA-cf4h-3jhx-xvhq | [email protected] (direct) | critical | not_reachable | Upgrade underscore from 1.8.3 to 1.12.1 or later. |
| GHSA-cf4h-3jhx-xvhq | [email protected] (direct) | critical | not_reachable | Upgrade underscore from 1.9.1 to 1.12.1 or later. |
| GHSA-fhjf-83wg-r2j9 | [email protected] (transitive) | critical | not_reachable | Upgrade base to a release that depends on mixin-deep 1.3.2 or later, or override mixin-deep to 1.3.2. |
| GHSA-qh2h-chj9-jffq | [email protected] (transitive) | critical | not_reachable | Upgrade mocha to a release that depends on growl 1.10.0 or later, or override growl to 1.10.0. |
|
…
Checks: 3 of 3 passed
  • clone: Cloned https://github.com/OWASP/NodeGoat at c5cb68a7084e4ae7dcc60e6a98768720a81841e8.
  • scan: osv-scanner 2.7.0 found 203 known vulnerabilities.
  • workspace_context: 0 context items from ContextStream for this job, about 105 tokens.
Task
620aa5be-d30f-4640-8830-0040798fed45
From its test suite, not a live run

Four advisories in a lockfile, one reachable (test case)

Version
0.1.0
Outcome
succeeded
Ran
2026-10-27 17:17 UTC
Took
Not timed (test data)

The agent's offline test suite: its real program, with osv-scanner's output, the model and the repository as fixtures, with no network. Not a live run.

What it ran on

  • Its test suite, in the agents' source repository
Input
{
  "repo_url": "https://github.com/eval/webapp",
  "focus": "the template rendering"
}

Result

4 known vulnerabilities in 3 packages: 1 reachable, 1 uncertain, 2 not reachable. Start with GHSA-35jh-r3h4-6jhm in lodash (high): Upgrade lodash from 4.17.15 to 4.17.21 or later.

Findings

AdvisoryPackageSeverityUsed by the code?WhyUpgrade
GHSA-xvch-5gv4-984hminimist 1.2.5criticaluncertainminimist comes in through mkdirp and json5; whether either passes it untrusted arguments is not visible from the project's code.Upgrade json5, mkdirp to a release that depends on minimist 1.2.6 or later, or override minimist to 1.2.6.
GHSA-35jh-r3h4-6jhmlodash 4.17.15highreachablerenderPage compiles the template a site owner saves with _.template, and the server renders it on every request.Upgrade lodash from 4.17.15 to 4.17.21 or later.
GHSA-9c47-m6qq-7p4hjson5 1.0.1highnot reachablejson5 is a dev dependency used only by the build script, on the repository's own config file.Upgrade the dev dependency json5 from 1.0.1 to 1.0.2 or later.
GHSA-29mw-wpgm-hmr9lodash 4.17.15mediumnot reachableThe project calls only _.template and _.get; it never calls toNumber, trim or trimEnd.Upgrade lodash from 4.17.15 to 4.17.21 or later.

audit.md

# Security audit of https://github.com/eval/webapp

osv-scanner 2.7.0 over 1 lockfile(s).

| Vulnerability | Package | Severity | Verdict | Upgrade |
| --- | --- | --- | --- | --- |
| GHSA-xvch-5gv4-984h | [email protected] (transitive) | critical | uncertain | Upgrade json5, mkdirp to a release that depends on minimist 1.2.6 or later, or override minimist to 1.2.6. |
| GHSA-35jh-r3h4-6jhm | [email protected] (direct) | high | reachable | Upgrade lodash from 4.17.15 to 4.17.21 or later. |
| GHSA-9c47-m6qq-7p4h | [email protected] (dev) | high | not_reachable | Upgrade the dev dependency json5 from 1.0.1 to 1.0.2 or later. |
| GHSA-29mw-wpgm-hmr9 | [email protected] (direct) | medium | not_reachable | Upgrade lodash from 4.17.15 to 4.17.21 or later. |

## GHSA-xvch-5gv4-984h: [email protected]

Prototype Pollution in minimist

**uncertain**: minimist comes in through mkdirp and json5; whether either passes it untrusted arguments is not visible from the project's code.

## GHSA-35jh-r3h4-6jhm: [email protected]

Command Injection in lodash

**reachable**: renderPage compiles the template a site owner saves with _.template, and the server renders it on every request.
- `src/render.js:5`: `const compiled = _.template(templateSource);`

## GHSA-9c47-m6qq-7p4h: [email protected]

Prototype Pollution in JSON5 via Parse Method

**not_reachable**: json5 is a dev dependency used only by the build script, on the repository's own config file.
- `scripts/build-config.js:4`: `const config = JSON5.parse(readFileSync('config.json5', 'utf8'));`

## GHSA-29mw-wpgm-hmr9: [email protected]

Regular Expression Denial of Service (ReDoS) in lodash

**not_reachable**: The project calls only _.template and _.get; it never calls toNumber, trim or trimEnd.
- `src/render.js:1`: `import _ from 'lodash';`
Checks: 3 of 3 passed
  • clone: Cloned https://github.com/eval/webapp.
  • scan: osv-scanner 2.7.0 found 4 known vulnerabilities.
  • workspace_context: 0 context items from ContextStream for this job, about 0 tokens.
Test case
webapp-mixed, in its test suite
Depot run
0zb9r381xr

Which tools does Security Audit work with?

Claude Code, Codex, Cursor and other MCP clients: ContextStream's MCP gives them an agents tool that finds, runs and follows Security Audit. It also runs from a terminal or an agent's shell with csa run audit, and from the ContextStream web app.

  • Claude Code, Codex, Cursor and other MCP clients: connect ContextStream's MCP once (setup for each editor), then ask your agent to hand the job to Security Audit.
  • A terminal or an agent's shell: csa run audit, installed with ContextStream's command line.
  • The web app: the workspace's agent library.

How do I turn Security Audit on?

An owner or admin of your ContextStream workspace turns Security Audit on in the web app's agent library. Agents are opening workspace by workspace; if yours is not open yet, the library says so.

  1. Sign in to ContextStream: the button below opens the agent library on Security Audit.
  2. An owner or admin switches Security Audit on for the workspace.
  3. Pick the project it works in, and run it from the library, from your coding agent or with csa run.

How do I call Security Audit from Claude Code or Codex?

Ask your coding agent to hand the job to Security Audit, or call it yourself: csa run audit in a terminal, or agents(action="run", agent="audit", input={...}) over MCP.

Connect ContextStream's MCP (it also writes each editor's connection):

curl -fsSL https://contextstream.io/scripts/mcp.sh | bash

Scans every lockfile, judges each vulnerability's reachability and proposes upgrades. Over MCP:

agents(action="run", agent="audit", input={"repo_url":"https://github.com/acme/api"})

In a terminal (curl -fsSL https://contextstream.io/cs/install.sh | sh installs csa):

csa run audit repo_url=https://github.com/acme/api

Input

FieldTypeWhat it is
repo_urlstring, required
refstring
subdirstring
focusstringWhat to look at hardest, for example "the HTTP server" or a package name.

What does Security Audit cost?

Security Audit costs 2,500 ContextStream credits a run, charged only when the run succeeds; a declined, failed, cancelled or timed-out run costs nothing. Credits come with every plan: Starter is free with 10,000 a month (4 runs of Security Audit, if spent on nothing else), and Pro is $19 a month with 25,000.

A run starts only once its price is accepted. Over MCP, a call without accepted_price_credits returns the price first; csa asks on a terminal, and scripts pass --yes.

Code

CI Fixer

failing test fix agent

CI Fixer reproduces a failing test command in a public repository and returns the smallest change to the project's code that makes it pass, with the passing output.

Checked on 13 test cases with known answers: all 13 passv0.1.0
Code

Dependency Upgrader

dependency upgrade agent

Dependency Upgrader upgrades a public GitHub repository within its semver ranges, fixes the project's code when that breaks its tests, and returns the diff and the results.

Checked on 10 test cases with known answers: all 10 passv1.0.0
Code

Code Oracle

code search agent

Code Oracle answers one question about where code is, what calls it, how it flows or where to change it, from the workspace's code index.

Tested on 212 real code questions, replaying recorded live runs: 202 passv0.2.0

Every ContextStream agent