Repository navigation
security: bind reusable SAST and security scans to the exact pull-request head #1222
Description
Problem
Organization-required reusable security workflows currently produce synthetic-merge evidence for pull requests instead of scanning the exact submitted head.
Fresh reproduction on ContextualWisdomLab/g7#1 on 2026-08-22:
- exact PR head:
4a1773f604b3971478f486557dac137d4202086c - GitHub synthetic merge:
8fb41406de757dd2c8edf7a7006c8bd4c68bb29f Security Scanrun32558956134checked out the synthetic merge ref;SAST Semgreprun32558956167checked out the same synthetic merge ref;- the current central
sast-semgrep.ymlcheckout has no explicit PR-headref; - the current central
security-scan.ymlTrivy/dependency-review checkout paths likewise do not bind the scan to the submitted head.
This violates the organization merge-evidence contract: synthetic merge, predecessor-head, queued, skipped-required, or otherwise non-exact evidence must never be promoted to exact-current-head proof.
The g7 canary also shows why the distinction matters operationally: the reusable scans currently fail on broad repository/base findings (Trivy dependency findings and 234 Semgrep warning/error findings), so the leaf readiness PR must not absorb unrelated remediation simply to manufacture a passing gate.
Responsibility boundary
Fix this in the organization-central reusable workflow layer. Do not duplicate or weaken the gate in downstream repositories and do not change leaf application code to compensate for checkout semantics.
Required design
For pull-request runs, resolve and verify the immutable target repository plus pull_request.head.sha before scanning. Preserve the repository's normal default ref for protected-branch pushes and other explicitly supported events. Where a scanner legitimately compares base and head, materialize both immutable revisions and make the evidence labels unambiguous rather than treating a synthetic merge ref as the submitted head.
SARIF attribution, job summaries, logs, artifacts, and any machine-readable evidence should record the target repository, exact submitted head SHA, base SHA where relevant, and the actual checked-out commit. Fail closed if those identities disagree.
Acceptance criteria
- SAST Semgrep pull-request jobs scan
github.event.pull_request.head.shafrom the correct target/head repository, notrefs/pull/*/merge. - Trivy filesystem and other head-oriented Security Scan jobs scan the exact submitted PR head.
- Base/head comparison jobs materialize and label both immutable revisions without conflating either with the synthetic merge commit.
- A focused workflow contract test rejects a PR checkout without an exact-head ref.
- A downstream canary proves
git rev-parse HEAD == pull_request.head.shain SAST and Security Scan evidence. - SARIF/check evidence remains associated with the intended pull request without weakening severity thresholds or suppressing valid findings.
- Existing least-privilege permissions, immutable action/container pins, cancellation behavior, and fail-closed security gates remain intact.
- No manual success status, stale evidence, or branch-protection bypass is introduced.
Downstream dependency
g7#1 must remain unmerged while its exact-current-head CI/security/review/protection contract is incomplete. Its broad pre-existing dependency/SAST baseline should be handled as separate security-owner work rather than mixed into the bounded readiness change.
Activity
seonghobae commentedon Aug 22, 2026
Second independent downstream canary reproduces this defect on a buyer-critical ScopeWeave lane.
ContextualWisdomLab/scopeweave#523develop@2c328875e00e86537df3e965170be80532571cad9e72573a9f61f440bd63eaa47ab972711a7e8c524b919e609ae8fc0869e0f7ed5cf99070858c51f5Exact evidence:
32538200939, job96942943379:actions/checkoutfetched+4b919e6...:refs/remotes/pull/523/merge, checked outrefs/remotes/pull/523/merge, and loggedHEAD is now at 4b919e6 Merge 9e72573... into 2c328875...before Semgrep ran.32538200920, Trivy job96942943227: the checkout fetched that same synthetic ref and loggedHEAD is now at 4b919e6 ...; Trivy then scannedscan-ref: .and returned 0 CRITICAL/HIGH/MEDIUM findings on the merge tree.Both runs are terminal-success but are non-authoritative for ScopeWeave's exact-current-head acceptance because the scanned tree is synthetic. This is not a leaf-product defect and ScopeWeave should not mutate product code to compensate.
Use this unchanged ScopeWeave head as an additional post-repair canary: SAST and every head-oriented Security Scan job must log
git rev-parse HEAD == 9e72573a9f61f440bd63eaa47ab972711a7e8c52(or the then-current unchanged successor head), with the target repository/head identity bound into machine-readable/SARIF evidence. Preserve severity thresholds, immutable pins, least privilege, and fail-closed findings semantics.seonghobae commentedon Aug 22, 2026
Fresh ScopeWeave contrast evidence narrows this to the central reusable security-workflow boundary rather than a leaf checkout limitation.
On unchanged
ContextualWisdomLab/scopeweave#523head9e72573a9f61f440bd63eaa47ab972711a7e8c52against live protecteddevelop@2c328875e00e86537df3e965170be80532571cad, repository-owned Dependency Review run32538200940, job96942943190now proves the intended contract end-to-end:actions/checkoutusesref: 9e72573...,git rev-parse HEADis checked againstEXPECTED_CHECKOUT_SHA,git ls-remote origin refs/heads/developindependently resolves the live base to2c328875..., ancestry is fail-closed, anddependency-review-actionreceives explicit immutablebase-ref: 2c328875.../head-ref: 9e72573....The same exact ScopeWeave head's centrally required SAST run
32538200939/ job96942943379and Security Scan run32538200920/ Trivy job96942943227still checked out synthetic merge4b919e609ae8fc0869e0f7ed5cf99070858c51f5. That working-path comparison rules out a GitHub platform inability to bind PR evidence to the contributor head.Repair-first acceptance for this owner lane: add a central workflow-contract RED that fails whenever head-oriented SAST/Security checkout omits the exact submitted PR head; implement the smallest reusable-workflow identity binding with explicit target repository/head and runtime
git rev-parse HEADattestation; keep base/head comparison jobs explicitly dual-revision; preserve severity, immutable pins and least privilege; then rerun this unchanged ScopeWeave canary and require SAST plus every head-oriented Security job to attest9e72573...before their success can count as exact-head evidence.seonghobae commentedon Aug 22, 2026
Fresh owner-path escalation: there is still no open repair PR matching #1222. Keep this as a repair-first control-plane lane, not a blocker-reporting lane. Current ScopeWeave canaries remain suitable without leaf churn: #523 exact contributor
9e72573a9f61f440bd63eaa47ab972711a7e8c52versus synthetic merge4b919e609ae8fc0869e0f7ed5cf99070858c51f5, and #552 exact contributord153ec943ca9e9cdca07a2c7e49e2e80b5a66ee4where centrally-owned SAST/Security likewise materialized the PR merge ref. The repository-owned Dependency Review working path on #523 already demonstrates the intended pattern: explicit exact-head checkout, runtime SHA attestation, independently resolved live base, ancestry validation, and explicit base/head inputs. Required next action remains: add a central RED workflow-contract regression for PR-head identity, bind SAST/Security checkout and scanner input topull_request.head.sha(protected-push fallbackgithub.sha), fail closed on mismatch, then rerun an unchanged downstream ScopeWeave canary and preserve actual checkout-SHA evidence. Do not weaken severity, permissions, immutability, or existing gates.seonghobae commentedon Aug 22, 2026
Fresh current-head canary confirms #1222 remains live on the latest ScopeWeave root lane; no leaf mutation is correct.
ContextualWisdomLab/scopeweave#523develop@2c328875e00e86537df3e965170be80532571cada73e8be6d25b422b69acdeacf3b3b161f6f4ff7da45d5fddf0bd951c1f66f3ca92513db616d21f21Current exact evidence:
32594482805, job97083198497, completedsuccess, butactions/checkoutfetched+a45d5fdd...:refs/remotes/pull/523/merge; runtime log reportsHEAD is now at a45d5fd Merge a73e8be6... into 2c328875...before Semgrep scans. The 0-finding result therefore describes the synthetic merge tree, not the submitted head.32594482813, Trivy filesystem job97083198646, completedsuccess, but its checkout likewise fetched+a45d5fdd...:refs/remotes/pull/523/merge, checked out that merge, and reported runtimeHEAD=a45d5fdd...; Trivy then scannedscan-ref: .and reported 0 CRITICAL/HIGH/MEDIUM findings on the synthetic tree.32594482787is already exact-head-aware: bothunit-and-apiandcloud-e2epassed an explicitVerify exact checkoutstep on the current contributor head. This continues to rule out a platform inability to bind PR work to the immutable submitted head.These green central scans remain NON-PASSING exact-head evidence. Drive the existing owner lane test-first: add a deterministic RED workflow-contract fixture that rejects head-oriented PR checkout without the exact submitted repository/head; bind SAST and head-oriented Security Scan jobs to
pull_request.head.sha; attestgit rev-parse HEADagainst the expected SHA before scanning; keep genuine base/head comparison jobs explicitly dual-revision; fail closed on identity mismatch; preserve current severities, least privilege, immutable pins, cancellation and SARIF semantics. GREEN acceptance is an unchanged/then-current ScopeWeave #523 canary whose SAST and head-oriented Security jobs record actual checkout SHA equal to the exact contributor head.seonghobae commentedon Aug 22, 2026
Fresh downstream reproduction from ScopeWeave confirms this is still live and required-workflow-owned, not a leaf-repository defect.
Current exact evidence (2026-08-23 KST)
Target:
ContextualWisdomLab/scopeweave#523develop@2c328875e00e86537df3e965170be80532571cada73e8be6d25b422b69acdeacf3b3b161f6f4ff7da45d5fddf0bd951c1f66f3ca92513db616d21f21SAST Semgreprun:32594482805, job97083198497head_sha=a73e8be..., butworkflow_urlisactions/required_workflows/312345790, proving the owning boundary is the organization required workflow rather than ScopeWeave source.ref; its log fetches+a45d5fdd...:refs/remotes/pull/523/merge, checks outrefs/remotes/pull/523/merge, and scans that synthetic merge. It then reports0 findingsand uploads SARIF. Under the exact-head evidence contract this success is non-passing evidence fora73e8be....Working-path comparison on the same ScopeWeave head proves the leaf repository can bind exact evidence correctly:
Server Testsrun32594482787: immutable checkout pin, explicitref: a73e8be..., detached exact checkout, explicitgit rev-parse HEAD == EXPECTED_CHECKOUT_SHA; 100% owned production statement/branch/function/line coverage and 154 browser tests pass.Fuzzrun32594482887, job97083198541: exacta73e8be...checkout + explicit SHA verification, 20,000-run budget, 14/14 fuzz/property targets pass.OSV Scannerrun32594482954, job97083198820: independently resolves protecteddevelopto2c328875..., separately checks out and verifies exacta73e8be..., compares base/head findings fail-closed, reports no issues, and preserves exact-head SARIF.Dependency Reviewrun32594482970: resolves current protected base2c328875..., verifies compare/dependency endpoints before the hard gate, then evaluates exact heada73e8be....First failing boundary / root cause hypothesis
The central required
sast-semgrep.ymlstill relies on defaultactions/checkoutpull-request behavior. Forpull_request, that resolves the syntheticrefs/pull/<n>/mergecommit even though run metadata exposes the contributor head. The scanner therefore attests the merge-test tree, not the submitted head.RED acceptance test
Add/retain a central workflow-contract fixture for a PR event with deliberately different
pull_request.head.shaand synthetic merge SHA. It must fail while the SAST checkout lacks an explicit immutable contributor-headref, and must reject any evidence wheregit rev-parse HEAD != github.event.pull_request.head.sha(with correct head-repository handling for forks).Smallest causal remedy
For PR runs, bind SAST checkout to the immutable submitted head SHA and correct head repository, immediately verify the actual checkout SHA, and bind SARIF/check metadata to that verified identity. Preserve protected-branch behavior for non-PR events, immutable action/container pins, current severity threshold, least privilege, code-scanning upload, and fail-closed engine behavior. Do not synthesize success for the leaf repository.
Apply the same exact-head identity contract to head-oriented Security Scan jobs; comparison jobs should materialize base and head separately and label both immutable revisions.
Required GREEN consumer evidence
After the central fix reaches protected
.githubmain, rerun the required workflows on the then-current unchanged ScopeWeave #523 head (or its fresh successor) and require logs to provegit rev-parse HEAD == pull_request.head.shain SAST and every head-oriented Security Scan job before those checks are accepted as exact-head evidence. ScopeWeave must regenerate all current-head security evidence after that integration; the present synthetic SAST success must not be grandfathered.seonghobae commentedon Aug 23, 2026
Fresh current-head evidence from
ContextualWisdomLab/scopeweave#552confirms the central checkout defect still reproduces after that contributor branch moved; no ScopeWeave source mutation is an appropriate workaround.develop@2c328875e00e86537df3e965170be80532571cadba2aab41d037b5f0e7334b1b70b7732fe976d2c99be76f8f94e2d8298fc65e52f1e3035eff58850fExact current evidence:
32603898670, job97106048262, completedsuccess.actions/checkoutfetched+9be76f8...:refs/remotes/pull/552/merge, checked outrefs/remotes/pull/552/merge, and loggedHEAD is now at 9be76f8 Merge ba2aab41... into 2c328875...before Semgrep scanned the workspace and reported 0 findings.32603898651, Trivy filesystem job97106048360, completedsuccess. Its checkout independently fetched the samepull/552/mergeref and logged runtimeHEAD=9be76f8f94e2d8298fc65e52f1e3035eff58850f; Trivy then scannedscan-ref: .and reported 0 CRITICAL/HIGH/MEDIUM findings on that synthetic merge tree.This is a fresh successor-head reproduction, not transferred predecessor evidence. The first failing boundary remains the centrally reusable head-oriented SAST/Security checkout contract: green scanner conclusions are bound to the PR merge ref instead of the immutable submitted contributor head.
Repair-first acceptance remains unchanged: add a deterministic central RED contract that fails when a PR head-oriented scan does not materialize the submitted repository/head SHA; bind SAST and head-oriented Security jobs to the exact
pull_request.head.sha; assertgit rev-parse HEAD == expected_head_shabefore scanning; keep genuine base/head comparison jobs explicitly dual-revision; preserve current severity thresholds, immutable action/image pins, SARIF behavior, cancellation and least-privilege permissions; then rerun an unchanged/then-current ScopeWeave canary and require machine-readable actual-checkout evidence equal to the contributor head before those green scans count as exact-head evidence.seonghobae commentedon Aug 23, 2026
Fresh ScopeWeave canary after a same-invocation branch repair confirms the central exact-head defect is still live and also shows why terminal-success must remain non-authoritative.
ContextualWisdomLab/scopeweave#586develop@2c328875e00e86537df3e965170be80532571cadba0e9b7669a00554b6a201d857a02646c83a795588626d13912b2b92b2aa171053c539294a9de893Current-head evidence:
32611406693, job97124990038, terminalsuccess: checkout fetched+88626d1...:refs/remotes/pull/586/merge, checked out that ref, and loggedHEAD is now at 88626d1 Merge ba0e9b7... into 2c328875...before Semgrep scanned 64 tracked files and reported 0 findings.32611406714, Trivy job97124990200, terminalsuccess: checkout fetched and checked out the same synthetic merge88626d1...;trivy fs .then scanned that merge tree and reported 0 CRITICAL/HIGH/MEDIUM findings.32611406700,unit-and-apijob97124990243, also checked out88626d1...; this leaf-side behavior is separately repairable by ScopeWeave fix(opencode): App 전용 review identity 계약을 통합 게이트와 일치 #523 and does not change ownership of the centrally reusable SAST/Security defect.This canary is especially useful because #586's actual current diff is only two
modulepreloaddeclarations inindex.html, so no leaf security mutation is a correct substitute for immutable scan identity. Keep #1222 repair-first: add/retain the RED workflow-contract test for PR-head identity, bind every head-oriented SAST/Security checkout and scanner input to the submitted immutable head, attestgit rev-parse HEAD, preserve dual-revision base/head jobs where semantically needed, and rerun an unchanged ScopeWeave canary before promoting a terminal success to exact-head evidence. Preserve severity thresholds, least privilege, immutable pins, SARIF attribution, and fail-closed mismatch handling.seonghobae commentedon Aug 23, 2026
Central source repair for exact-head security evidence is now split across the existing canonical owners rather than a competing PR:
9ac7cef1fc611d010429955d7b1fbd62002929c8; Security workflow + contract tests; full local central suite1382 passed, 1 skipped, 16 subtests passed.476ff5c8b1356b17b2a5801b693644cf03c5e90a; SAST workflow + contract tests; full local central suite1381 passed, 1 skipped, 16 subtests passed.Both branches are now mergeable against protected
main@23a776ed37027d8ab8ab2aefcf81fac586352e2f, use explicit immutable repository/SHA checkout, attest actualHEAD, fail closed on mismatch, and preserve existing pins, permissions, severities, and gates. Hosted exact-head checks are still queued/in progress, so this is source/test progress only—not acceptance. Keep #1222 open until reviewed protected-main integration and a fresh ScopeWeave #523 canary prove SAST and head-oriented Security jobs actually scanned the then-current contributor head.114 remaining items
seonghobae commentedon Aug 28, 2026
Protected-main SAST integration now has fresh downstream exact-head GREEN evidence (2026-08-28); this closes the SAST half of #1222 acceptance but not the Security/Trivy half.
.github/main@7dd8a22bdd0ce9aa4a636eb410715134129f5c4d;ContextualWisdomLab/scopeweave#523, protected basedevelop@2c328875e00e86537df3e965170be80532571cad, exact submitted head135117e0594939240e787a161574b6fb4e10f155;success.Exact operational evidence:
repository: ContextualWisdomLab/scopeweaveandref: 135117e0594939240e787a161574b6fb4e10f155;HEAD is now at 135117e...;SAST_CHECKOUT ... expected_sha=135117e... actual_sha=135117e...;sha: 135117e0594939240e787a161574b6fb4e10f155.The predecessor synthetic merge
7f133dc301c9a2f86bd3a0f0c273ef676bf18e6ais no longer the SAST scanner workspace. Preserve this job as the exact-head SAST consumer canary.Keep #1222 open: the current Security/Trivy head-oriented path remains owned by open PR #897 and still requires protected-main integration plus a fresh unchanged/current consumer run proving its workspace SHA equals the submitted head. Do not transfer SAST success to Trivy, predecessor runs, or aggregate status-only evidence.
seonghobae commentedon Aug 28, 2026
Fresh ScopeWeave canary on the current contributor head keeps this owner defect actionable.
ContextualWisdomLab/scopeweave#523develop@2c328875e00e86537df3e965170be80532571cad135117e0594939240e787a161574b6fb4e10f15533148083441(attempt 2), job9879149521233148083432The SAST owner path now demonstrates the correct exact-head pattern: the job has explicit
Checkout exact submitted revisionandVerify exact submitted revisionsteps, both GREEN before Semgrep. Preserve that behavior.The current central
security-scan.ymlstill leaves head-orienteddependency-review,trivy-fs, andscorecardon defaultactions/checkoutwith no explicit target repository/ref and no runtimegit rev-parse HEAD == pull_request.head.shaattestation. On apull_requestrequired-workflow run that remains non-authoritative exact-head evidence even though the run metadata reportshead_sha=135117e...; the checkout contract itself is still merge-ref-dependent. OSV is the working contrast because it explicitly materializesbase.shaandhead.sha.Repair-first next action at this owner boundary: add/keep a workflow-contract RED that rejects head-oriented Security Scan checkout lacking
repository: ${{ github.event.pull_request.head.repo.full_name }}+ref: ${{ github.event.pull_request.head.sha }}and post-checkout SHA attestation; apply the smallest reusable-workflow fix to dependency-review/Trivy/Scorecard head scans (while retaining OSV's explicit dual-revision semantics), then rerun this unchanged ScopeWeave canary and require the actual checked-out SHA in evidence. Preserve severity thresholds, immutable pins, least privilege, cancellation, SARIF attribution and fail-closed behavior. Do not compensate in ScopeWeave leaf product code.seonghobae commentedon Aug 28, 2026
Fresh Inkspan post-integration canary narrows #1222: the SAST exact-head lane is now GREEN on protected central truth, while the Security Scan half of this issue remains independently open.
Consumer:
ContextualWisdomLab/inkspan#389main@128a239f8b71ca16add4b9e15e21752d1ad63ff022a17e48d471bde37a3b6672a4775c02db86597a7dd8a22bdd0ce9aa4a636eb410715134129f5c4d; a fresh compare proves that merge commit is an ancestor of current protected.github/main@cdde0d82602d9568128fd0c1e985ea40b229271033153865336/98791931828The exact same-head SAST job reports
head_sha=22a17e48...;Checkout exact submitted revisionsucceeded;Verify exact submitted revisionsucceeded; the pinned-manifest verification and Semgrep scan then completed successfully. This is materially different from the earlier synthetic-merge canaries and is acceptable downstream proof for the SAST PR-head identity slice.Do not close #1222 yet. The same Inkspan head's required
Security Scanstill contains a non-passing dependency-review path (run33153865309, job98791932194): its support probe succeeds, the actualDependency reviewaction step isskipped, and the job still concludes success. Treat the SAST acceptance criterion as revalidated after #941, but keep the Security Scan/exact dependency path routed to its existing owner (#810/#897). No Inkspan-local scanner workaround is correct.seonghobae commentedon Aug 28, 2026
Fresh central exact-head reproduction on 2026-08-28:
3fce14ea991cf5d239ca141d6c24e0d4fe14953fe5e0d3652a19d12db29e687924dbaf978cd78912effefbe7b18e82382d4c73792bb57dfdffb20983Despite GitHub-success:
trivy-fsjob98878388066checked outrefs/remotes/pull/1158/mergeand recorded runtime HEADeffefbe7b….dependency-reviewjob98878388133did the same.This independently reproduces #1222 inside the central repository after the SAST repair. The results remain non-passing exact-head evidence even though GitHub marks both jobs successful. No consumer workaround or severity/gate change is appropriate; the owning Security workflow still needs explicit head repository/SHA checkout and pre-scan
git rev-parse HEADattestation.seonghobae commentedon Aug 28, 2026
Fresh downstream canary narrows the remaining owner defect to the reusable Security Scan half after the SAST repair shipped.
ContextualWisdomLab/scopeweave#505is unchanged at exact contributor head51418c09e261b7d1b4dd694c42ceee63d22513f4against protecteddevelop@2c328875e00e86537df3e965170be80532571cad; GitHub's synthetic merge for this state is10287e9e386e93a0660e9280c89542eff69a4d57.Working path: SAST Semgrep run
33165298520, job98829150661, now has explicitCheckout exact submitted revision+Verify exact submitted revisionsteps and completed successfully, so the central SAST repair is effective on this current ScopeWeave head.Remaining failure: Security Scan run
33165298499, Trivy job98829150651, still fetched+10287e9e386e93a0660e9280c89542eff69a4d57:refs/remotes/pull/505/merge, checked outrefs/remotes/pull/505/merge, loggedHEAD is now at 10287e9 Merge 51418c09... into 2c328875..., then scannedscan-ref: .and reported success. That green result is therefore synthetic-merge evidence, not exact-head evidence for51418c09....Please keep the existing #897/security owner lane repair-first: add/retain the RED contract for Trivy/head-oriented security checkout identity, bind the checkout/scanner input to the immutable submitted head, attest
git rev-parse HEAD == 51418c09e261b7d1b4dd694c42ceee63d22513f4(or the unchanged then-current canary head), preserve the separately labeled base/head OSV comparison path, severity thresholds, least privilege, immutable pins, and fail-closed behavior, then regenerate this downstream canary. No ScopeWeave product mutation is appropriate for this defect.seonghobae commentedon Aug 28, 2026
Correction to the fresh Noema downstream canary: the attempted
source.pathtightening onContextualWisdomLab/noema#495was falsified by the full Noema contract and has been non-destructively reverted. Do NOT use that discarded hypothesis as owner acceptance evidence.Exact Noema evidence:
main@2c83355529447248c246805d1954f268e027d2ab1341098aa058c262334e135bda3e0409fcb9420e; CI run33183287037/ job98889711198failed only because the new assertions expected../package-lock.jsonand/tmp/package-lock.jsonto be rejected5dbb8d7a779281c7e8e4ea0a9546e74e46bcd666then produced the decisive full-suite contradiction: CI run33183797692/ job98891453867failed 4 tests. Existing generator contracts intentionally accept canonical custom absolute input paths so retainedsource.pathhonestly identifies the file actually read; the candidate guard intercepted parent-symlink/output-path and malformed-lockfile tests before their intended boundaries.21c01972860bcff5ccdc217c08b7b82dbef90a73. The correct retained-evidence contract remains lexical canonicality (normalize(path) === path), not repository-relative confinement.This correction does not change the independent central scanner defect tracked by #1222. Protected central truth has since advanced to
.github/main@e1b03eebc6dc5c85aed393e5928927c96376cf46; itssecurity-scan.ymlstill gives Dependency Review and Trivy generic PR-event checkout, and the dependency-review support probe still usescurl ... || trueplus HTTP 403/404 =>supported=false/ exit 0.The existing canonical owner PR #897 has also advanced under its dedicated writer and is now open/Ready/mergeable at exact head
74eb5d1753cba1a48e47e9bc05940373181d7b23with current base snapshote1b03eebc6dc5c85aed393e5928927c96376cf46. Continue that owner path; do not create a Noema leaf workaround.Post-integration Noema acceptance remains unchanged: on an unchanged then-current Noema head, require Dependency Review and every head-oriented Security job to attest the exact submitted head plus independently resolved live protected base; transport failure/non-200 comparison must remain non-passing. Preserve severity thresholds, immutable pins and least privilege.
seonghobae commentedon Aug 28, 2026
Fresh ScopeWeave downstream canary confirms the remaining Security Scan exact-head defect on a current mergeable PR while the sibling SAST repair is now working.
Affected consumer:
ContextualWisdomLab/scopeweave#610develop@2c328875e00e86537df3e965170be80532571cad3bb2bd95905d590fe3d1d0d9a8fc6c6ec133c04a4e62fd8e2df98583bc1e640d8cd3669ad4c194793318075102998881032762Exact runtime evidence from that Trivy job: its generic
Checkoutstep supplied no submitted-headref; actions/checkout fetched+4e62fd8e2df98583bc1e640d8cd3669ad4c19479:refs/remotes/pull/610/merge, checked outrefs/remotes/pull/610/merge, and loggedHEAD is now at 4e62fd8 Merge 3bb2bd95905d590fe3d1d0d9a8fc6c6ec133c04a into 2c328875e00e86537df3e965170be80532571cad. Trivy then scanned.and the job concluded GitHubsuccesswith zero CRITICAL/HIGH/MEDIUM findings. That success is evidence for the synthetic merge tree, not exact submitted head3bb2bd..., so it remains non-passing for ScopeWeave merge acceptance.Working-path comparison in the same consumer/current head: SAST Semgrep run
33180750999, job98881032224, now executesCheckout exact submitted revisionfollowed byVerify exact submitted revisionand concludes success. This demonstrates the central SAST exact-head repair is deployed and gives the Security Scan owner path a concrete compatible pattern.Causal owner remains the reusable Security Scan workflow, not ScopeWeave source. Keep the existing owner path for this issue/its canonical Security Scan PR; do not create a consumer-local duplicate. RED acceptance is the current Trivy run above where
git rev-parse HEAD != pull_request.head.shayet the scanner succeeds. GREEN requires the head-oriented Trivy path (and any other generic head-oriented Security Scan checkout such as dependency-review/Scorecard where applicable) to bind the immutable submitted PR head, verify the actual checkout before scanning, and bind resulting evidence to that identity. Preserve current immutable pins, severity thresholds, least privilege, cancellation and fail-closed behavior. After normal central integration, regenerate the then-current unchanged/successor ScopeWeave #610 Security Scan canary and require machine evidencegit rev-parse HEAD == pull_request.head.sha; do not grandfather run33180751029.seonghobae commentedon Aug 28, 2026
Fresh Inkspan release-lane canary narrows #1222 to a partial central repair state; no Inkspan-local checkout workaround is correct.
Affected consumer:
ContextualWisdomLab/inkspan#389main@128a239f8b71ca16add4b9e15e21752d1ad63ff04b02834fd56a676589afd6b57516da44f8f984befe0096342f511e99c56c225f7b6ec7e19565ae27SAST is now GREEN for the exact-head half of #1222. SAST Semgrep run
33170544299, job98846340306, explicitly checked out4b02834fd56a676589afd6b57516da44f8f984be, verifiedgit rev-parse HEADagainst that exact SHA, logged the exact repository/SHA identity, scanned the submitted tree, and uploaded SARIF withrefs/pull/389/head/ SHA4b02834…. This is current downstream evidence that the SAST synthetic-merge defect has been repaired; predecessor SAST failures must not be carried forward.Security Scan is still RED for the head-oriented half. Security Scan run
33170544304, Trivy job98846339660, performed the default checkout ofrefs/pull/389/merge, materializedfe0096342f511e99c56c225f7b6ec7e19565ae27(Merge 4b02834… into 128a239…), then scannedscan-ref: .. Its zero-finding result is therefore synthetic-merge evidence and cannot satisfy exact-head acceptance. The same Security run's dependency-review job98846339820also used the synthetic merge checkout; its immutable base/head API inputs were correct, but HTTP 403 was normalized to a successful support skip and the pinned Dependency Review action never ran, which remains separately owned by #810.First causal boundary for the remaining #1222 scope is the central
security-scan.ymlhead-oriented checkout, not Inkspan source. The existing central source writer carrying that correction is #897, currently Ready/open/mergeable at exact head74eb5d1753cba1a48e47e9bc05940373181d7b23against protected.github/main@e1b03eebc6dc5c85aed393e5928927c96376cf46; its Security Scan current-head evidence attests exact Trivy/Dependency Review source identity. Do not duplicate that writer or transfer its predecessor evidence.Post-integration GREEN for #1222: rerun unchanged/current-successor Inkspan #389 and require every head-oriented central Security job to attest
git rev-parse HEAD == pull_request.head.sha == 4b02834…(or the then-current successor), while comparison jobs label immutable base and head separately; preserve severity thresholds, SARIF attribution, least privilege, immutable pins, and fail-closed behavior. Keep #1222 open until that downstream Security canary passes; SAST alone is no longer the blocker.seonghobae commentedon Aug 29, 2026
Fresh Inkspan #379 successor canary after an unrelated local performance-test repair confirms the Trivy half of the exact-source defect remains live on the current contributor head; no leaf workaround is correct.
Affected consumer:
ContextualWisdomLab/inkspan#379main@128a239f8b71ca16add4b9e15e21752d1ad63ff0e6659b2892774fb4a36fa1803b79e3e4eb7cedf3332280317199903545561514f58116b657bfcd1d756d4b85f3f9f3f50ed4c1Exact log reproduction:
actions/checkoutfetched+14f58116...:refs/remotes/pull/379/merge, checked outrefs/remotes/pull/379/merge, and loggedHEAD is now at 14f5811 Merge e6659b2... into 128a239.... The Trivy action then ranscan-type: fs,scan-ref: .against that synthetic workspace and reported 0 CRITICAL/HIGH/MEDIUM findings. The job/workflow are terminalsuccess, but they are non-passing as exact-current-head evidence because the scanned tree is not submitted heade6659b2....Contrast: the organization Semgrep exact-head lane has already progressed through merged #941, while the current central Security/Dependency repair owner #897 remains open at exact head
74eb5d1753cba1a48e47e9bc05940373181d7b23and includes exact-head Trivy/Dependency identity work. #897 is not currently governance-clean for integration: its current-head OpenCode verdict isCHANGES_REQUESTEDbecause required Strix failed, and no qualifying independent approval exists. Do not bypass those gates or create an Inkspan-local competing scanner.First causal boundary remains the organization-owned reusable Security Scan checkout: head-oriented Trivy inherits GitHub's
pull_requestsynthetic merge when no explicit exact submitted-head binding/attestation is active on protected central workflow. Falsifiable GREEN for this Inkspan canary: after the existing central repair is normally integrated, rerun an unchanged/successor #379 exact head and require the Trivy checkout/runtime attestation to equal the submitted contributor SHA, with SARIF/evidence bound to that repository/head; synthetic merge14f58116...and this run's zero-finding result must not be grandfathered.seonghobae commentedon Aug 29, 2026
Fresh downstream canary confirms the remaining central Security Scan exact-head defect on the current ScopeWeave #523 contributor revision; no ScopeWeave source mutation is correct for this boundary.
ContextualWisdomLab/scopeweave#523develop@2c328875e00e86537df3e965170be80532571cad135117e0594939240e787a161574b6fb4e10f1557f133dc301c9a2f86bd3a0f0c273ef676bf18e6a3314808343298773498227The Trivy job's fresh log shows
actions/checkoutreceived no explicitref, fetched+7f133dc301c9a2f86bd3a0f0c273ef676bf18e6a:refs/remotes/pull/523/merge, checked out that merge ref, and loggedHEAD is now at 7f133dc Merge 135117e0594939240e787a161574b6fb4e10f155 into 2c328875e00e86537df3e965170be80532571cad. Trivy then scannedscan-ref: .and reported zero CRITICAL/HIGH/MEDIUM findings. The job is GitHub-success but remains non-authoritative exact-current-head evidence because the scanned tree is synthetic.The working path is already proven in this same ScopeWeave lane: repository-owned exact-head workflows explicitly bind the contributor SHA and attest the runtime checkout, so this is not a GitHub platform limitation and should not be compensated for in leaf product code.
Repair-first acceptance for the central owner path remains: add/retain a deterministic workflow-contract RED rejecting any head-oriented Security Scan checkout without the explicit target repository + immutable
pull_request.head.sha; attestgit rev-parse HEADbefore scanning and fail closed on mismatch; preserve immutable action pins, least privilege, severity thresholds, SARIF semantics, and explicit dual-revision handling only where base/head comparison is intentional. After protected central integration, rerun the then-unchanged ScopeWeave #523 head and require the Security Scan job log/machine-readable evidence to attest the exact contributor SHA before its success can count.seonghobae commentedon Aug 29, 2026
Fresh Inkspan release-candidate canary separates the SAST repair from the still-open Security/Trivy identity defect on the current exact consumer; no Inkspan-local scanner workaround is correct.
Consumer:
ContextualWisdomLab/inkspan#389main@128a239f8b71ca16add4b9e15e21752d1ad63ff04b02834fd56a676589afd6b57516da44f8f984befe0096342f511e99c56c225f7b6ec7e19565ae27Current SAST GREEN for the exact-source part of #1222 is concrete: run
33170544299, Semgrep job98846340306, usesactions/checkoutwithref: 4b02834fd56a676589afd6b57516da44f8f984be; the explicit verification step recordsexpected_sha=4b02834... actual_sha=4b02834...; Semgrep then scans 395 tracked files, reports 0 findings, and uploads SARIF againstrefs/pull/389/headwith SHA4b02834.... This is valid downstream evidence that the merged SAST owner repair is active on Inkspan.Do not close the broader exact-source lane yet: the same unchanged consumer's required Security Scan run
33170544304, Trivy job98846339660, still materializes/scansrefs/pull/389/mergeat synthetic commitfe009634..., so its aggregate-green result is not exact-head release evidence. Dependency Review false-green remains separately owned by #810/#897.Acceptance split for this canary: SAST exact-head checkout/attestation is GREEN on
4b02834...; Security/Trivy remains RED until the existing central Security owner repair reaches protected.githubmain and a regenerated unchanged/successor Inkspan run proves the head-oriented Trivy scan checkout equals the then-current PR head. Preserve SARIF attribution, severity thresholds, immutable pins, least privilege, and fail-closed identity checks.seonghobae commentedon Aug 29, 2026
Fresh ScopeWeave canary narrows #1222 after the protected SAST exact-head repair integrated.
Consumer evidence (2026-08-29):
ContextualWisdomLab/scopeweave#523, exact submitted head7779ed29f6bf8836113128c1dbf97b3e73735464, protecteddevelop@2c328875e00e86537df3e965170be80532571cad.SAST portion is now protected-GREEN. Required SAST run
33246179742, job99083936246, explicitly checked outref: 7779ed29f6bf8836113128c1dbf97b3e73735464, attestedSAST_CHECKOUT ... expected_sha=7779ed29... actual_sha=7779ed29..., scanned that tree with 0 findings, and uploaded SARIF bound torefs/pull/523/head/ SHA7779ed29.... The old synthetic-merge SAST defect is therefore no longer reproduced on this canary.Security Scan Trivy remains RED at the central owner boundary. Run
33246179728, job99083924922, usedactions/checkoutwith no submitted-headref, fetched+f06f5bae...:refs/remotes/pull/523/merge, checked out synthetic mergef06f5bae286eced7b6c094aa9c5bf8f4b0ab8dfa(Merge 7779ed29... into 2c328875...), then rantrivy fs .and uploaded its SARIF. That terminal-success job therefore scanned the synthetic merge, not exact submitted head7779ed29..., and remains non-passing exact-head evidence.A second current-head GHAS symptom corroborates the configuration-identity problem: check
99084308863(Trivy) isneutralwith1 configuration not found, specificallyActions workflow (trivy.yml): trivy. Fresh reads of both ScopeWeave protecteddevelopand the current PR head return no.github/workflows/trivy.yml, so this missing analysis identity is not owned by ScopeWeave source.Existing central repair PR #897 is still the correct owner path: it is open/Ready/mergeable at current exact head
2be8184db9f16a06570af90bce24fe2ef3627912against currentmain@da49a345bba41ed163e524d7c2c8b068c638445d. Its current-head GHAS evidence itself still has neutral legacy configuration identities (scheduled-security-scan.yml:trivy-fs-scheduledandscorecard-analysis.yml:supply-chain/branch-protection), and its OpenCode check is failing, so no predecessor green or stale PR-body head should be promoted to merge authority.GREEN acceptance for the remaining Security/Trivy lane: integrate the existing owner repair only after its exact-current-head deterministic/security/review/governance gates pass; then regenerate one unchanged/current ScopeWeave canary and require (1) runtime checkout/attestation equal to the submitted contributor SHA before Trivy scans, and (2) a stable protected-base/current-head GHAS analysis identity so the comparative Trivy check is substantive success/failure rather than neutral
configuration not found. Preserve current severity thresholds, immutable pins, least privilege, SARIF publication, and fail-closed behavior; do not add a ScopeWeave-local competing scanner.seonghobae commentedon Aug 29, 2026
Fresh post-integration consumer evidence (2026-08-30 KST; do not close yet):
main@6c8ee24046d743b3981c566c6e29f99f09137f6acontains merged fix(security): fail closed on unavailable dependency review #897's exact-head Security Scan binding.1424dfcf009df2047a0d21130dc0bb11211f1546: https://github.com/ContextualWisdomLab/scopeweave/actions/runs/3326270454299127277014checked out and attestedexpected_sha=1424dfcf009df2047a0d21130dc0bb11211f1546 actual_sha=1424dfcf009df2047a0d21130dc0bb11211f1546: https://github.com/ContextualWisdomLab/scopeweave/actions/runs/33262704542/job/9912727701499127277068recorded the same exact-head identity andhttp_status=200 curl_exit=0for base2c328875e00e86537df3e965170be80532571cadto head1424dfcf009df2047a0d21130dc0bb11211f1546: https://github.com/ContextualWisdomLab/scopeweave/actions/runs/33262704542/job/99127277068This is a fresh downstream ScopeWeave GREEN for the repaired central contract. ScopeWeave #523 itself remains at exact head
e28b5caba7a6f16071ead232b33d0c5d64d78b7a. I requested a rerun of its Security workflow; the new attempt has not yet produced terminal exact-head Trivy evidence, so the historical synthetic-merge scan is not treated as superseded and #1222 remains open pending the required #523-specific operational acceptance.seonghobae commentedon Aug 29, 2026
#1222 downstream acceptance is now complete on the required ScopeWeave canary.
Current immutable identities:
e28b5caba7a6f16071ead232b33d0c5d64d78b7a2c328875e00e86537df3e965170be80532571cadmain@6c8ee24046d743b3981c566c6e29f99f09137f6aExact-head evidence:
33247472709/99087356940explicitly checked outref: e28b5caba7a6f16071ead232b33d0c5d64d78b7a, attestedexpected_sha=e28b5caba7a6f16071ead232b33d0c5d64d78b7a actual_sha=e28b5caba7a6f16071ead232b33d0c5d64d78b7a, completed successfully, and uploaded the resulting Semgrep SARIF against the PR head: https://github.com/ContextualWisdomLab/scopeweave/actions/runs/33247472709/job/9908735694099167410453explicitly checked out and attested the same exact head, completed successfully, and reported zero CRITICAL/HIGH/MEDIUM findings: https://github.com/ContextualWisdomLab/scopeweave/actions/runs/33247472787/job/99167410453No severity threshold, permission, immutable pin, cancellation rule, SARIF association, or fail-closed behavior was weakened. This is downstream operational evidence rather than source-merge-only evidence, so the acceptance criteria are satisfied and the issue can close as completed.