feat(package): read advisory files and check the lock against them #452
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/451-advisory-files"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #451
Step 1 of #309: the advisory file format and
torb audit --advisories <directory>.What
compiler/src/package/advisory.trb:AdvisoryRecord,AdvisorySeverity, a static reader (settingsOf, nothing evaluated; unknown words, doubled words, labels, a foreignpackage/advisoryline, bad severity/range/time refused),advisoriesOf(the files of<directory>/<owner>/<name>/, ordered by id with the number counted as a number) andadvisoriesCovering.torb audit --advisories <directory>: every advisory covering a pinned registry version is a findingacme/http 1.2.4 is affected by TORB-2026-0001 (high): <summary>, after the index findings of the package and ordered by id, counted in the closing line, exit 1. Missing directory, unreadable/foreign/refused file: exit 2, message names the file. Without the flag nothing changes. Only the directories of locked packages are opened.torb-audit.md,the-torb-command.md, usage text;skills/regenerated.Seed impact: none (TorbScript in
compiler/src/packageandcompiler/src/clionly).Test
compiler/tests/advisory.test.trb(20 tests): covered pin, pin outside the range, second range, pre-release pin, advisory for an unpinned package (ignored),path:package skipped, two advisories for one package, each refusal.torb check,torb format --check,torb docs source,torb docs check docs,torb docs skill docs skills, andtorb test compiler/tests/advisory.test.trbin the VM: 20 passed (installed torb 0.1.0). Gates: forge CI (tools/gates.sh a).torb audit --advisories <directory>(step 1 of #309) #451torb audit --advisories <directory>(step 1 of #309) #451Checklist (head
ae1d73f):advisory.test.trbcover every case of #451 (covered/uncovered pin, second range, pre-release, unpinned package ignored,path:skipped, two advisories ordered by id, each refusal). CI green on this head.--advisoriesflag; no publishing, endpoint or default source.torb-audit.md,the-torb-command.md, usage text,skills/regenerated; pdisc green.compiler/src/package, no new boundary.Non-blocking:
--advisorieswithout a directory (packageOptionsOf) has no test of its own.