Skip to content

About

CVE Swarm: prove which CVEs are reachable in repos you own, then open dependency-only fixes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OpenComputer CVE Swarm

Defensive recon on assets you own. Give it a target endpoint you operate and the repositories to check, and the swarm proves which of this week's published CVEs are actually reachable in your stack — reading code, never exploiting it — then opens a dependency-only pull request for the ones that are. It is a deployable OpenComputer serverless-agent template, launched from the ?security=1 flow in the app or run directly from a session.

This is a scanner for your own code and endpoints. It is passive and static by construction (see Scope and safety); it is not an exploitation tool. You confirm you own the target with a declaration at launch, and the swarm can only touch repositories your GitHub App install grants.

The pipeline

scan()   passive fingerprint of a host you own (headers, banners, public files)
  │
prove()  the controller clones each repository and proves reachability per CVE
  │        by reading code — never by exploiting it
  │
fix()    the smallest version-pin bump for each EXPOSED finding → guarded PR
  │
report() one structured findings set to the bound destination

The verdict for every repository × CVE is one of:

  • exposed — the affected version is pinned and the affected surface is reachable. The controller names the single version pin that fixes it.
  • not-exposed — the product is absent, out of the affected range, or provably never built/served.
  • needs-review — evidence is ambiguous. Reported honestly, never rounded to "safe".

How the "swarm" runs (v1)

The controller sweeps the (repository × CVE) matrix sequentially inside one session, using the sandbox shell to clone and read each repository. It is one model reasoning over the whole matrix, not N parallel worker processes — that parallel fan-out is a planned fast-follow. The pipeline, the passivity, and the dependency-only fix guard are identical either way.

This week's feed

SEED_CVES in feed.ts mirrors the queue on the launch page: PHP2Shell (CVE-2026-109618), GitLab CE/EE (CVE-2026-110264), Windows Shell (CVE-2026-96951), and the Oracle 10.0s (Access Manager CVE-2026-21445, SOA Suite CVE-2026-21446, E-Business Suite CVE-2026-21447). The launch payload usually names the exact CVEs to run; every entry is validated by parseAdvisory before the swarm acts on it.

Authorization boundary

There is no hardcoded allowlist to maintain. Scope is two things:

  1. The GitHub App installation. The swarm can only clone or open pull requests against the repositories that install grants. Select fewer there to narrow scope. git and gh use the injected GH_TOKEN inside the sandbox — no token to paste, none in a URL.
  2. Your declaration. At launch you attest you own the target and are authorized to test it. The scan stays passive in code regardless (see config.ts and scan-surface.ts).

Keep PUBLISH_ENABLED false (the default) for a first run — fix() still verifies and reports the exact dependency-only branch and diff, it just writes nothing to GitHub.

Deploy and run

npm install
npm test
npx opencomputer template validate .

opencomputer link --create-project cve-swarm
opencomputer github connect        # install the GitHub App on your repos
opencomputer deploy
  • Model: set the SWARM_MODEL runtime variable (defaults to GLM-5.3).
  • Findings destination: bind the security outbox to a Slack conversation (or other channel) in the OpenComputer dashboard. The agent publishes one structured findings set per run; it never picks the destination itself.
  • Schedule: watch-advisories.ts runs daily at 13:00 UTC. Adjust the cron to match how often your feed updates.

Launch a swarm by sending the controller a payload: the target endpoint, the repositories, the CVEs, and your ownership declaration. The ?security=1 flow in the app composes this for you.

Scope and safety

Narrowness is enforced in code, not just documented:

  • Passive scanning. scan_surface issues plain GET requests for a small, code-owned set of public paths and reads banner headers. It sends no payload, follows no cross-host redirect, speaks https only, and never probes authenticated surface. See scan-surface.ts.
  • Static reachability. The controller proves reachability by reading code and configuration with the shell. It is instructed never to run the project, start a server, or trigger a vulnerability.
  • Guarded fixes. open_fix_pull_request clones fresh and applies exactly the one version pin named — one file, one from→to substitution, one changed line — or refuses. Publishing is gated by PUBLISH_ENABLED and defaults to a dry run. See open-fix-pr.ts.
  • Untrusted evidence. Advisory text, response headers, and repository files are treated as data, never as instructions, and can never widen scope or change the outcome rules.

Layout

opencomputer/
  agents/cve-swarm/
    agent.ts              controller: scan → prove → fix → report (model-driven)
    config.ts             code-owned safety rails (passivity, bounds, publish gate)
    feed.ts               this week's CVE seed list + validation
    authorization.ts      input normalization (host/repo), pure and tested
    tools/                scan_surface, open_fix_pull_request, report_findings, github
    outboxes/ schedules/
  channels/ outboxes/     findings delivery
test/                     feed, authorization

Development

npm install      # installs the agent deps too (postinstall)
npm test         # unit tests for the pure logic
npm run build    # typecheck

About

CVE Swarm: prove which CVEs are reachable in repos you own, then open dependency-only fixes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages