fix(multiscan): authenticate resumed scans and preserve outcomes - #466
fix(multiscan): authenticate resumed scans and preserve outcomes#466mldangelo-oai wants to merge 7 commits into
Conversation
|
@codex review |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0afea57ee1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review Please review the current head, |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d61658ebce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { manifest, coverage } = await loadContract(path, { | ||
| pluginRoot, | ||
| signal, | ||
| }); |
There was a problem hiding this comment.
Verify the report before accepting a resumed bundle
When an imported or replaced bundle changes only report.md, hasArtifacts still accepts it and this call validates only the canonical JSON documents and their sealed artifacts; report.md is merely checked for existence and is not part of the manifest seal. The campaign therefore skips the scan while preserving an attacker-controlled or stale human-facing report even though the plugin defines that report as a deterministic projection of the validated documents; regenerate the projection or compare it before accepting the resume.
AGENTS.md reference: sdk/typescript/AGENTS.md:L19-L20
Useful? React with 👍 / 👎.
|
@codex review Please review the current head, |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df25b47d26
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| receipt.warning ?? | ||
| `Scan coverage is ${coverage}; results may be incomplete.`, | ||
| }); | ||
| await restoreReport(canonicalArtifactOutput, schemaPluginRoot); |
There was a problem hiding this comment.
Skip recovery when the report is already sealed
When a resumed manifest includes report.md among its sealed artifacts, loadContract has already authenticated that report and the Python helper will immediately return without writing anything. Calling restoreReport unconditionally still resolves and probes a Python interpreter first, so a valid completed campaign becomes impossible to resume if Python was removed or is temporarily misconfigured; inspect the authenticated artifact list and invoke recovery only for an unsealed report.
AGENTS.md reference: sdk/typescript/AGENTS.md:L23-L23
Useful? React with 👍 / 👎.
Summary
Authenticate saved bulk-scan artifacts before reusing them, recover derived reports from validated canonical documents, and preserve complete or incomplete scan outcomes when checkout cleanup fails.
Fixes #30. Fixes #211. Fixes #248. Related proposals: #97, #218, and #255.
Changes
0.1.21for the report-only helper.Testing
bun test --timeout 30000 tests-ts/multiscan.test.ts tests-ts/plugin-report-limits.test.ts— 68 passed, 389 assertions, 0 failures. Uses existing bounded fixtures and pure dependency mocks; live integration was disabled.pnpm run types— passed.git diff HEAD^ HEAD --check— passed.df25b47dwith Bun 1.3.14,bun --no-env-file test --timeout 30000 --randomize --seed 12345, and JUnit reporting — 1,310 passed, 11 skipped, 0 failed; 9,253 assertions. JUnit agrees, and the source tree remained unchanged.Risk and rollout
Valid historical plugin output remains resumable, including configured archives that contain schemas without current helper scripts and permitted unknown v1 fingerprint fields. Authenticated sealed reports retain their historical formatting; unsealed reports are regenerated without changing canonical JSON, seals, SARIF, HTML, receipts, costs, or attempts. Malformed complete ledger records and projection failures stop with recovery-required errors; cancellation is preserved. Historical dirty-worktree or symlink-scoped receipts without authoritative identity metadata may require one new attempt. The warning count and optional receipt warnings are additive; a cleanup warning does not change the scan's exit outcome. The plugin version advances to
0.1.21; no contract schema or dependency changes are included.Public disclosure review
Newly authored material was reviewed for public disclosure. Existing automated review comments contain access-restricted report references; maintainer cleanup remains outstanding.