deepsec findings become sealed reports under P0 Trust
This page is for people who write a repository and run the deepsec security scanner on it. Each finding deepsec makes becomes one sealed issue under the repository's P0 Trust umbrella. A sealed issue is shown only to writers and the crew until the fix lands. If you file the same findings again, nothing is filed twice.
File a run
Run deepsec's process and revalidate steps first. Then hand its data directory to the forge:
FORGE_URL=https://your.forge FORGE_TOKEN=<a read-write token> \
bun scripts/deepsec-file.ts .deepsec/data/forge --pull 123
- The directory defaults to
.deepsec/data/forge. --repo owner/namenames the repository. Without it the script readsFORGE_REPO, then falls back totrevato/forge.--pull Nnames the pull whose check ran deepsec.--commit <oid>names the commit it read.--tool "deepsec 2.3.16 (model)"names the scanner. You can leave each of them out.- The token must be read-write and belong to someone who writes the repository. Anyone else gets
403.
The script sends only the fields the forge reads. It posts them in batches of at most 100 findings, and the runs go with the first batch. It skips symbolic links, so it reads nothing outside the directory. It prints one line per batch, for example deepsec: 3 findings, 2 filed as sealed reports (#41, #42), 1 already filed (#17); spent $1.20; does not block the gate until its false-positive rate is measured.
What a report says
Each report is titled with the finding's title. Its body gives the severity, the file and lines, whether revalidation confirmed it, what deepsec saw, the fix it suggests and what its recheck said. If you named a pull, the body names it too. A report is done when a test reproduces the attack, fails before the fix and passes after, and the matching docs/THREATS.md row names that test. If a finding is not exploitable, close its report and give the reason.
A finding is matched by its title and its file. The file must be the whole path, so src/a.ts never matches src/a.tsx. Only reports that this feature opened count. If one is still open with both, the run counts the finding as already filed and does not open another.
The API
POST /api/v1/repos/:owner/:name/deepsec takes {files, runs, pull?, commit?, tool?}. files and runs are deepsec's own records, at most 5,000 of each. One request files at most 100 findings, the most severe first. The line says how many more it did not file, so you can send them in another request. The answer is the same line the script prints. A malformed body gets 422 and says which field is wrong.
In the terminal
Filing is not a terminal screen: a script or a check runs it. The reports it opens are ordinary sealed issues. In the terminal they show in the repository's issues and under the P0 Trust pillar, like every other report. The terminal's System screen shows a forge admin the same false-positive line as /system, under "deepsec findings".
Not yet
A finding does not block the gate yet. It will block it once deepsec's false-positive rate has been measured over two weeks of runs. The rate is measured now: a report closed without a change (dropped) is a false positive, counted against the sweep whose commit its Found by line names (src/checks/deepsec_rate.ts). /system shows a forge admin one line for the forge's own repository, for example deepsec false positives, last 14 days: 4 of 11 findings (36%) closed without a change, 4 not yet judged, over 2 sweeps. Under 10 findings it says too few to measure. The line holds counts only, never a report's text. The weekly sweep (#15026, src/checks/deepsec_sweep.ts) files through the same path. You can still run the script yourself on a run of your own.