Public: anyone can read this; the crew can change it.
Security against 24/7 agent swarms: OSV dependency scans with auto-fix pulls, secret scanning at push, code scanning in review, an exposure map with rate limits, a scheduled red team #6012
This pull covers only the data layer for the dependency scan (step 1 of #6004). The rest of the issue is not built. bun test test/security-osv.test.ts passes and tsc --noEmit is clean.
stopped parked by the crew deploy 76e6dd5
4 earlier comments
This pull covers only the data layer for the dependency scan (step 1 of #6004). The rest of the issue is not built. bun test test/security-osv.test.ts passes and tsc --noEmit is clean. I did not run bun test across the whole suite, and I have not seen the forge's check result yet.
What changed
GET /api/v1/repos/:owner/:name/security[?ref=]reads the repo'sbun.lockandpackage-lock.jsonfiles (nested ones included) at a ref and returns packages, lockfiles and findings. It uses the same read access as the contents API, and an unknown or unreadable repo answers 404.src/security/holds three small modules:lockfile.tsparses the two lockfile formats.osv.tsloads OSV advisories and matches pinned versions against them. Each finding names the advisory, its severity and the smallest fixed version. Findings are sorted most severe first.scan.tsreads the lockfiles from git and runs the match.
- The advisories are
*.jsonfiles in OSV format under$FORGE_APP_DATA/osv/. A missing directory counts as an empty mirror. - No new dependency.
test/security-osv.test.tscovers the lockfile parsing, the version matching, and the route end to end. The README has a short section on it.
Left out
- Hourly refresh of the mirror from OSV.dev.
- Scanning on push and nightly.
- Automatic fix pulls.
- A security tab or forge-wide page. Nothing in the web UI or the MCP calls the route yet, so under the issue's "done means reachable" bar this is not done until those exist.
uv.lock, other ecosystems, and version ordering for non-semver schemes.- Steps 2–6 of the issue: secrets, code scanning, the exposure map and rate limits, the scheduled red team, and the posture page.
Try it
Drop an OSV JSON advisory in $FORGE_APP_DATA/osv/, commit a bun.lock that pins an affected version, then request /api/v1/repos/<owner>/<repo>/security.
The only new message on #6004 is an automatic triage note: no pillar is named, so the issue waits behind the Later gate. Naming a pillar is a planning decision for a person, so I changed nothing and pushed nothing. The branch still holds the one slice I pushed earlier.
What the pull contains
GET /api/v1/repos/:owner/:name/security[?ref=]is the data layer for the OSV dependency scan (step 1 of #6004).- The route reads
bun.lockandpackage-lock.jsonat a ref and matches the pinned versions against OSV advisories. Each finding names the advisory, its severity and the smallest fixed version, and findings are sorted most severe first. - The advisories come from
*.jsonfiles under$FORGE_APP_DATA/osv/. A missing directory counts as an empty mirror. - The route uses the same read access as the contents API. An unknown or unreadable repo answers 404.
- No dependency was added. The code is in
src/security/, the tests are intest/security-osv.test.ts, and the README has a short section. bun test test/security-osv.test.tspasses andtsc --noEmitis clean. I have not seen the forge's check result.
Left out
- Hourly refresh of the mirror from OSV.dev.
- Scanning on push and nightly.
- Automatic fix pulls.
- The per-repo security tab and the forge-wide page.
uv.lockand other ecosystems.- Steps 2–6 of the issue: secret scanning, code scanning, the exposure map and rate limits, the red-team lane, and the posture page.
Under the issue's "done means reachable" rule, nothing in the web UI or the MCP calls the route yet, so this slice is not done.
To try it
Put an OSV JSON advisory in $FORGE_APP_DATA/osv/, commit a bun.lock that pins an affected version, then request /api/v1/repos/<owner>/<repo>/security.
To move the issue Someone needs to name a pillar on #6004. The remaining steps are each too big for one run and should be split into linked child issues.
I merged main into the branch and pushed it. The merge should now apply cleanly. I haven't seen the forge's check result on the new push.
- Conflict: it was only in
README.md, wheremainand this branch had each added a section at the end. I kept both and moved "Dependency scan (OSV)" to the end of the file so it doesn't sit undermain's "Child quota" heading.src/http/api.tsmerged without conflict. - Checks run:
tsc --noEmitis clean andtest/security-osv.test.tspasses (6 tests). I didn't run the fullbun testsuite. - Scope: the pull is unchanged: the
GET /api/v1/repos/:owner/:name/securityroute and thesrc/security/modules from before. Everything left out in the earlier description is still left out.
I merged main into this branch and pushed it. The only conflict was in README.md, where I kept both sides: the "Dependency scan (OSV)" section from this branch and the "Seeing the direction a vision pull will write" section from main. src/http/api.ts merged on its own.
I did not see a full bun test run finish. The run took longer than the command timeout and went to the background, and I pushed without waiting for it. These suites passed (12 tests, 0 failures):
test/security-osv.test.tstest/mcp-vision.test.tstest/security-floor-routes.test.ts
The type check (bun x tsc --noEmit) was in the same backgrounded command. Its output was empty when I last looked, so I never saw it finish either. The forge's check on this push will give the full verdict.
Parked by the crew: the check stayed red through 2 automatic tries
This pull covers only the data layer for the dependency scan (step 1 of #6004). The rest of the issue is not built.
bun test test/security-osv.test.tspasses andtsc --noEmitis clean. I did not runbun testacross the whole suite, and I have not seen the forge's check result yet.What changed
GET /api/v1/repos/:owner/:name/security[?ref=]reads the repo'sbun.lockandpackage-lock.jsonfiles (nested ones included) at a ref and returns packages, lockfiles and findings. It uses the same read access as the contents API, and an unknown or unreadable repo answers 404.src/security/holds three small modules:lockfile.tsparses the two lockfile formats.osv.tsloads OSV advisories and matches pinned versions against them. Each finding names the advisory, its severity and the smallest fixed version. Findings are sorted most severe first.scan.tsreads the lockfiles from git and runs the match.*.jsonfiles in OSV format under$FORGE_APP_DATA/osv/. A missing directory counts as an empty mirror.test/security-osv.test.tscovers the lockfile parsing, the version matching, and the route end to end. The README has a short section on it.Left out
uv.lock, other ecosystems, and version ordering for non-semver schemes.Try it Drop an OSV JSON advisory in
$FORGE_APP_DATA/osv/, commit abun.lockthat pins an affected version, then request/api/v1/repos/<owner>/<repo>/security.Closes #6004