quality: scheduled OSV advisory scan (pending private routing config) - #1788
Draft
simple-agent-manager[bot] wants to merge 7 commits into
Draft
quality: scheduled OSV advisory scan (pending private routing config)#1788simple-agent-manager[bot] wants to merge 7 commits into
simple-agent-manager[bot] wants to merge 7 commits into
Conversation
Contributor
|
30 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
5863929ace4e0670aecc767e640c068e35d6a959on PR quality: add deterministic runtime-boundary program #1784 so the broader quality program can merge independently.This PR must stay draft until the
SAM_OSV_WEBHOOK_URLandSAM_OSV_WEBHOOK_TOKENrepository secrets exist, the SAM-side private webhook intake exists, and routing has been tested end to end. It was extracted from PR #1784 specifically so that PR's quality program can merge independently.Staging verification is intentionally not applicable: this scheduled workflow cannot be exercised without the private routing configuration, which is exactly why the work is parked as draft. No staging deployment or mutation was performed.
This PR will need a rebase after PR #1784 merges. Small conflicts are expected in
.github/workflows/ci.yml,package.json, andscripts/quality/README.md.Validation
pnpm lintpnpm typecheckpnpm test— the full run reached 6,799 API tests and had three unrelated timeout-only failures; all affected files passed immediately in isolation (3 files, 125 tests)pnpm buildpnpm quality:scripts:test— 22 files, 237 testspnpm quality:osv-policygit diff --checkStaging Verification (REQUIRED for all code changes — merge-blocking)
Staging Verification Evidence
Intentionally not applicable by Raphaël's explicit instruction. The scheduled workflow cannot complete without the two repository secrets and SAM-side private intake, so staging would not provide valid end-to-end evidence. No staging workflow was triggered and no staging state was mutated.
UI Compliance Checklist (Required for UI changes)
End-to-End Verification (Required for multi-component changes)
Data Flow Trace
.github/workflows/osv-scan.ymlstarts only from the default-branch schedule, rejects forks, derives the dual-secret routing gate, and invokespnpm quality:osv-policy.scripts/quality/check-osv-policy.ts:validateOsvPolicyrejects scheduled execution when private routing is absent and validates every ignore's reason and future expiry..github/workflows/osv-scan.ymldownloads OSV-Scanner 2.5.0, verifiesosv-scanner_SHA256SUMS, and passes the verified binary path topnpm quality:osv-advisory.scripts/quality/run-osv-advisory.ts:runinvokes the scanner, parses its private temporary report, counts validated findings, and deletes the report infinally.scripts/quality/run-osv-advisory.ts:createPrivateFollowUpRequestbuilds an authenticated, idempotent summary payload;routePrivateFollowUprejects redirects and non-2xx responses.scripts/quality/run-osv-advisory.integration.test.tsexercises scanner success, scanner failure, private-intake rejection, privacy minimization, and cleanup with realistic process/HTTP boundary mocks.Untested Gaps
The actual SAM private webhook intake and repository secrets do not yet exist, so real end-to-end routing is intentionally untested. That is the activation prerequisite keeping this PR in draft; it must be completed before readiness or merge.
Post-Mortem (Required for bug fix PRs)
N/A: this is a source extraction of parked advisory infrastructure, not a bug fix.
Specialist Review Evidence (Required for agent-authored PRs)
needs-human-reviewlabel added and merge deferred to human — N/A: every reviewer completedExceptions (If any)
Agent Preflight (Required)
Classification
External References
N/A: the task required a faithful extraction from repository commit
5863929ace4e0670aecc767e640c068e35d6a959and PR #1784; no third-party API contract was changed.Codebase Impact Analysis
.github/workflows/gains the schedule-only advisory workflow and the blocking PR ignore-policy step.scripts/quality/gains the policy, advisory runner, contributor documentation, unit contracts, and scanner-to-webhook vertical slice.package.jsonexposes the two quality commands;osv-scanner.tomlowns expiring ignore policy.apps/,packages/, database, API, UI, VM, or deployment runtime path changes.Documentation & Specs
Added
scripts/quality/README.mdfor contributor-facing OSV policy, routing, privacy, and draft activation prerequisites. Public product/self-hosting docs remain intentionally unchanged until the private intake exists.Constitution & Risk Check
Reviewed Principles XI and XII. The webhook destination/token are configured repository secrets; the scanner version, schedule, workflow timeout, and protocol metadata are deliberate repository/protocol constants. The source-parity 16 MiB child-process buffer and missing self-host private-intake setup documentation remain readiness items, explicitly acceptable only while this PR is parked as draft. Primary risks are premature activation without private routing, public disclosure of advisory detail, and supply-chain compromise; schedule/fork/permission/checksum/privacy/fail-closed tests cover the extraction contract.