Skip to content

fix(osv): preserve immutable direct-source provenance - #1158

Open
seonghobae wants to merge 71 commits into
mainfrom
fix/osv-direct-source-provenance-1096
Open

fix(osv): preserve immutable direct-source provenance#1158
seonghobae wants to merge 71 commits into
mainfrom
fix/osv-direct-source-provenance-1096

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Tracks #1096; do not close until protected-main integration and fresh Inkspan canary acceptance.

Outcome

The reusable Security Scan preserves direct-tarball URL, integrity, version, package identity, and scanner-source provenance before deciding whether an npm advisory applies.

  • Genuine affected xlsx releases, including 0.18.x, 0.19.2, and 0.20.1, remain findings.
  • Only exact official immutable xlsx@0.20.3 evidence outside the authoritative affected range is reconciled.
  • Unknown, malformed, ambiguous, or conflicting provenance remains typed non-passing SCANNER_METADATA_CONFLICT.
  • Advisory IDs and severities remain unchanged.
  • Reconciliation is bound to the exact governed lockfile and OSV source.path.

Exact current identity

  • head: abada26a0aef76af82ab26ac3544f2a88a3c127d
  • protected base: main@8fd471a31399a914d9cb22a840f4a4c68e010ea6
  • protected main was merged as a second parent and the branch advanced non-force
  • GitHub merge tree 649a1ef268476d24b8d8f1483c8af6b5c8d40ea1 exactly matched an independent local git merge-tree --write-tree
  • unresolved review threads: 0
  • exact-current-head formal approval: absent

Verification

Exact-head local:

  • python3 -m unittest -v tests.test_osv_direct_source_reconcile: 20/20 passed
  • affected controls remained affected
  • official immutable 0.20.3 reconciliation passed
  • unknown/unverifiable provenance remained SCANNER_METADATA_CONFLICT
  • Strix required-workflow smoke: PASS
  • git diff --check: PASS

Hosted exact-head runs checked out abada26…. The OSV and Strix quality paths are currently non-passing because their full central suite reported 2 stale predecessor assertions out of 1,431 tests: both still expect retired gpt-5.6-luna while the protected workflow emits gpt-5.4. That contract defect is already repaired on canonical owner #1320; it is not an OSV source finding and is intentionally not duplicated here.

Integration acceptance

After #1320 and this repair integrate through normal governance, rerun Security Scan on the current Inkspan #318 head. Acceptance requires the official immutable xlsx@0.20.3 contradiction to disappear while affected and unverifiable controls remain fail-closed.

No consumer source or protected branch was changed.

Summary by CodeRabbit

  • 보안 및 품질 개선

    • OSV 보안 검사 결과의 유효성과 완료 여부를 더욱 엄격하게 검증합니다.
    • 검증 가능한 공식 패키지 출처와 무결성 정보에 기반해 오탐 결과를 제한적으로 조정합니다.
    • 불완전하거나 모호한 증거, 변조된 파일, 심볼릭 링크는 안전하게 실패 처리합니다.
  • 문서

    • 패키지 출처 검증 정책, 감사 기록, 운영 점검 및 롤백 절차를 문서화했습니다.
    • 성공한 검사에서 취약점이 없을 경우 표준 빈 결과를 기록합니다.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ef0c8708-9cdc-4024-a176-997cf2c1b7f4

📝 Walkthrough

Walkthrough

OSV 보안 스캔이 결과 증거를 분류하고, base/head 결과와 lockfile provenance를 보존합니다. 중앙 정책은 검증된 SheetJS 직접 소스 finding만 재조정합니다. 감사 기록, 회귀 테스트, 전용 품질 CI를 추가했습니다.

Changes

OSV provenance 검증

Layer / File(s) Summary
직접 소스 재조정 엔진
scripts/ci/osv_direct_source_reconcile.py
lockfile의 직접 tarball 출처와 무결성을 검증합니다. 검증된 xlsx@0.20.3 finding만 조건에 따라 제거합니다. 충돌과 보존 결과를 감사 로그에 기록하고 원자적으로 저장합니다.
스캔 증거 분류와 재시도
.github/workflows/security-scan.yml
base/head 결과의 구조와 scan outcome을 분류합니다. 불완전한 증거를 재시도하고, 검증된 결과와 lockfile provenance를 보존합니다.
정책 적용과 reporter 연계
.github/workflows/security-scan.yml
중앙 정책을 정확한 revision으로 체크아웃합니다. provenance 조정 후 SARIF reporter를 실행하고 감사 파일을 debug artifact로 업로드합니다.
회귀 검증과 품질 게이트
tests/test_osv_direct_source_reconcile.py, tests/test_required_workflow_queue_contract.py, .github/workflows/osv-direct-source-quality-ci.yml, docs/doctoring/osv-direct-source-provenance.md, CHANGELOG.md
재조정, 증거 분류, fail-closed 입력 처리, workflow 순서와 빈 결과 정규화를 검증합니다. Python 3.14, 해시 고정 의존성, branch coverage 및 컴파일 검사를 품질 workflow에 추가합니다.

Estimated code review effort: 5 (Critical) | ~90+ minutes

Merge Risk: ⚪ Minimal · up to 32123

The change preserves direct-source provenance and fail-closed handling; no actionable merge-blocking risk remains. A minor documentation correction is still recommended so the documented range rules match the implemented behavior.

Sequence Diagram(s)

sequenceDiagram
  participant SecurityScan
  participant OSVScanner
  participant EvidenceClassifier
  participant ProvenanceReconciler
  participant Reporter
  SecurityScan->>OSVScanner: base/head OSV 스캔 실행
  OSVScanner-->>EvidenceClassifier: 결과 파일과 scan outcome 전달
  EvidenceClassifier-->>SecurityScan: complete 상태 반환
  SecurityScan->>ProvenanceReconciler: 결과와 pnpm lockfile 전달
  ProvenanceReconciler-->>SecurityScan: 재조정 결과와 감사 기록 저장
  SecurityScan->>Reporter: results.sarif 생성 요청
  Reporter-->>SecurityScan: reporter verdict 반환
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 OSV 스캔에서 불변 직접 소스 provenance를 보존하는 이번 변경의 핵심 목적을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring coverage is 92.59% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 3 files. (4 skipped: 4 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 92.59% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 3 files. (4 skipped: 4 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/osv-direct-source-provenance-1096

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact current head f2a94192cba86e661ed3c5fd22a8b6ffa44cd3f0 against protected base 2cce96f8671bfde7e354effef931c14a5928c23b. Verified 6 provenance tests, compileall, interrogate, actionlint, and diff --check. The reconciler retains findings unless exact direct-source identity, SHA-512 integrity, and authoritative GitHub-reviewed affected bounds all prove them disproven; the audit is append-only and the security workflow reconciles before the reporter verdict. Do not approve from queued or status-only evidence.

@seonghobae
seonghobae marked this pull request as ready for review August 20, 2026 05:03

Copy link
Copy Markdown
Contributor Author

@opencode-agent Keep this PR Draft and repair the current exact head 29af209ed2e0ecdf57e54a04d04969fb544061a6 test-first. Two fail-closed defects remain in the bounded provenance contract:

  1. reconcile_payload() selects candidates[0]. Two same-package/version direct-source records can therefore disagree while the first valid record suppresses the finding. Add a RED regression with conflicting duplicate xlsx records, then require exactly one unambiguous matching source; zero or multiple/conflicting candidates must retain the vulnerability and emit SCANNER_METADATA_CONFLICT.
  2. The production reconciler accepts every canonical SheetJS version and removes any finding whenever version >= exclusive upper bound. The declared contract is intentionally limited to the exact official immutable xlsx@0.20.3 exception. Add RED controls for 0.20.2/0.20.4 and other versions outside an advisory bound, then prevent those versions from being reconciled without a separately reviewed policy expansion.

Also remove the self-trust exception in security-scan.yml: the required gate must not execute scripts/ci/osv_direct_source_reconcile.py from the pull-request head merely because the target repository is .github. Bind runtime policy to the governed workflow/default-branch source, and use the dedicated quality workflow—not PR-controlled policy execution—to test candidate changes. Preserve advisory IDs/severities in append-only audit evidence, exact URL/tarball/integrity checks, affected-version positive controls, and existing 100% statement/branch/docstring gates. Reacquire all exact-head checks and formal review after the repair; do not mark Ready or enable merge before then.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Revalidated PR #1158 after repairing the current-head provenance contract.
Current head: c573b35

Root-cause fixes:

  • Only one direct-source record may match a package/version; zero or multiple matches retain every finding and emit SCANNER_METADATA_CONFLICT.
  • The reconciliation exception is restricted to immutable SheetJS xlsx@0.20.3. Other official versions remain findings and cannot be silently reconciled.
  • The central security policy checkout now always uses github.workflow_sha; the .github PR cannot execute its own head policy as trusted runtime policy.

Exact-head proof:

  • 1249 tests passed with 63 subtests.
  • scripts/ci/osv_direct_source_reconcile.py: 226 statements / 84 branches at 100% coverage.
  • interrogate 100%, ruff clean, actionlint passed for security-scan.yml and the provenance quality workflow, compileall and git diff --check passed.

Please rerun independent review and all protected Checks for this exact head. The PR remains subject to branch protection; no merge is claimed.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact current head c573b35648fd424337ca2897095673a52c0be1d4 against independently resolved protected main@2cce96f8671bfde7e354effef931c14a5928c23b. This supersedes the predecessor-head request for f2a94192cba86e661ed3c5fd22a8b6ffa44cd3f0. Required acceptance is a substantive formal Reviews API verdict bound to this SHA. Preserve the fail-closed provenance contract: exact official direct-source identity/version/resolved URL/integrity and authoritative affected bounds may disprove a finding; affected or unverifiable provenance remains non-passing. Queued, status-only, and predecessor evidence are not acceptance.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Integrated current main normally at c3636cc. Focused provenance suite passed (15 tests, 47 subtests), actionlint, ruff, and diff checks passed. Re-run the exact-head security/OSV checks and review this current HEAD.

@OpenCode review this exact HEAD and report only current-head findings.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review this exact current HEAD. Use the current commit SHA, current Checks, and current diff; do not reuse prior approvals or prior-head evidence.

Copy link
Copy Markdown
Contributor Author

Inkspan downstream canary is ready for this existing owner lane; no consumer-side suppression/workaround has been introduced.

Fresh bindings before this note:

  • central protected base: .github/main@aa8503f4383e8328d89104796bc3e9f7da810376;
  • this PR is Ready/open/mergeable at exact head c3636cc2962a24e50e0f1b545f22fed824df26f8 against that base;
  • exact-head owner evidence currently includes OSV Direct Source Quality CI 32347266926 success, Security Scan 32347266784 success, OSV-Scanner PR 32347267550 success, SAST Semgrep 32347267061 success, Secret Scan 32347266807 success, Scorecard 32347266777 success, and SBOM Generation 32347266875 success; Python Security 32347266788 and CodeQL PR 32347266808 are still queued/non-passing, with no formal reviews or unresolved review threads yet. Do not promote predecessor evidence or merge while those live gates/then-current governance remain incomplete.
  • consumer protected base: ContextualWisdomLab/inkspan main@3b38ead2d00f44eb578d0689087b9293b3dabe1e;
  • consumer canary: Inkspan Draft fix(review): put contract-reliable reasoning models first, flagships last #318 exact unchanged head fce8fe72ebf4d438c17a7c889dd37c92118c6204;
  • current consumer Security Scan 32144783558 fails only at OSV job 95735816267 after exact base/head checkout and successful base/head scans; debug artifact 9328396543, digest sha256:594d8a8551017a78c98a33b6574bfbb9ce945f8b202988788ab96b224c3cfd3d, is bound to that run/head. CI 32144783586 and SAST 32144783644 are success.

After this exact owner repair integrates into protected .github/main under live governance, rerun required Security Scan on the then-unchanged Inkspan #318 head rather than transferring this PR's or predecessor consumer evidence. GREEN means the official integrity-bound direct xlsx@0.20.3 artifact no longer inherits the two npm-registry false positives while the npm-registry vulnerable controls, malformed/unknown provenance, and unrelated advisories remain fail-closed. If either owner or consumer head moves, refresh the binding before canary acceptance.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Security root-cause fix at current head e2c0031: malformed UTF-8 is now rejected at the shared text-input boundary with an explicit fail-closed ValueError, covering lockfile and JSON audit/results inputs. Added regression coverage; local 15 tests, Ruff, compileall, and diff checks passed. Please run the independent current-head review and required checks for this exact SHA.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent please review current HEAD e2c0031 for PR #1158; focus on malformed input handling, fail-closed provenance, and security regressions.

@opencode-agent

opencode-agent Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: abada26a0aef76af82ab26ac3544f2a88a3c127d
  • Workflow run: 32827248949
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head abada26a0aef76af82ab26ac3544f2a88a3c127d.

  • Head SHA: abada26a0aef76af82ab26ac3544f2a88a3c127d

  • Workflow run: 32827248949

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (2 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow (2 files)"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: osv-direct-source-provenance.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: osv-direct-source-provenance.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: osv_direct_source_reconcile.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: osv_direct_source_reconcile.py"]
  R4 --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (2 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test (2 files)"]
  R5 --> V5["targeted test run"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for e61fb11fbd5c7464d34cc8bedc3a7177fbdcade2.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (2 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow (2 files)"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: osv-direct-source-provenance.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: osv-direct-source-provenance.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: osv_direct_source_reconcile.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: osv_direct_source_reconcile.py"]
  R4 --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (2 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test (2 files)"]
  R5 --> V5["targeted test run"]
Loading

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Exact head 97361089cab8c16bb94ecaa0ea01db9c6aed56b4 addresses both current informational findings. The duplicate candidates/no-candidates reason is computed once, removing the unreachable inner ternary. Atomic results/audit write OSError now follows the typed ::error:: non-passing path instead of escaping as an unstructured traceback. RED reproduced the escaping OSError: write failed; GREEN: focused 20 tests·54 subtests, full 1,422 tests·70 subtests, reconciler 292 statements/100 branches at 100%. Current hosted runs are fresh and predecessor evidence is non-passing until they complete.

@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 06:44

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Please publish an independent substantive formal Reviews API verdict for exact current head 88b6859f2edabfb65f2bbac32460b5341c3980c0 against protected main@613a33e0cb1c6db9790fae99f6253445712ac37a. All 13 substantive exact-head workflows are terminal-success and unresolved review threads are 0. Older CHANGES_REQUESTED, COMMENTED, check/status, and predecessor-head evidence is historical. Inspect the complete current diff and bind APPROVED or CHANGES_REQUESTED only to this SHA; do not reuse an older verdict.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 88b6859f2edabfb65f2bbac32460b5341c3980c0.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (2 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow (2 files)"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: osv-direct-source-provenance.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: osv-direct-source-provenance.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: osv_direct_source_reconcile.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: osv_direct_source_reconcile.py"]
  R4 --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (2 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test (2 files)"]
  R5 --> V5["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 17:52

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 88b6859f2edabfb65f2bbac32460b5341c3980c0.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (2 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow (2 files)"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: osv-direct-source-provenance.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: osv-direct-source-provenance.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: osv_direct_source_reconcile.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: osv_direct_source_reconcile.py"]
  R4 --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (2 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test (2 files)"]
  R5 --> V5["targeted test run"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head abada26a0aef76af82ab26ac3544f2a88a3c127d.

  • Head SHA: abada26a0aef76af82ab26ac3544f2a88a3c127d

  • Workflow run: 32827248949

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (2 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow (2 files)"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: CHANGELOG.md"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: osv-direct-source-provenance.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: osv-direct-source-provenance.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: osv_direct_source_reconcile.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: osv_direct_source_reconcile.py"]
  R4 --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (2 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test (2 files)"]
  R5 --> V5["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

Protected-main convergence — exact current head

Exact head 321234887f7250b1ade1d026ae2b6d2af0d0613e is a non-force two-parent merge of the prior OSV owner head abada26a0aef76af82ab26ac3544f2a88a3c127d and protected main@95b05b393c75931044b405ae491079d336d89293.

The resolved tree is exactly 326fee4728e03df350674b6ae468a61bf3e2929f. The only textual conflict was CHANGELOG.md; the resolution preserves both the direct-source OSV entry and protected-main Strix/OpenCode entries. The automatically merged required-workflow queue contract retains both parent changes.

Fresh verification on that exact tree:

  • python3 -m unittest -v tests.test_osv_direct_source_reconcile: 20/20 passed, including affected 0.18.x/0.19.2/0.20.1 controls, official immutable 0.20.3 reconciliation, and typed unknown-provenance conflicts;
  • full central pytest -q: 1443 passed, 1 skipped, 70 subtests passed;
  • full scripts/ci/test_strix_quick_gate.sh: PASS;
  • git diff --check: PASS;
  • unresolved review threads remain 0.

This restores mergeability against live protected main without weakening the Security Scan/OSV contract. Hosted exact-head checks and a qualifying exact-current-head formal review remain authoritative before integration; no merge claim is made here.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Exact-current-head convergence and verification (2026-08-26)

  • protected base: main@33dc57d7984b937e4f5ab915d5eae69a0f42e3a5
  • exact head: 5addc9250488cbbb039e3f73f0fa58d7eafc0c61
  • remote tree: d807b2324053d79625786db6a7b48b6440f15cf6
  • parents: prior OSV owner head 8d3f84a46cb7cc99704ee12abf83234da5e5d186 + protected main 33dc57d7984b937e4f5ab915d5eae69a0f42e3a5
  • non-force fast-forward publication; remote tree/parents match the independently verified local merge
  • focused OSV + workflow contracts: 89 passed, 54 subtests
  • full central suite: 1,462 passed, 1 skipped, 70 subtests
  • full Strix quick gate: PASS
  • git diff --check: PASS
  • unresolved review threads immediately after publication: 0
  • exact-current-head formal approvals: 0

Fresh exact-head OSV, Security Scan, CodeQL, SBOM, provenance, and quality runs are queued/in progress and remain non-passing until terminal. #1096 stays open until protected-main integration and a fresh Inkspan #318 Security Scan remove the official xlsx@0.20.3 contradiction while affected and unverifiable controls remain fail-closed.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment on lines +347 to +387
- name: Checkout exact central provenance policy
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: ContextualWisdomLab/.github
ref: ${{ github.event.pull_request.base.repo.full_name == 'ContextualWisdomLab/.github' && github.event.pull_request.base.sha || github.workflow_sha }}
path: .cwl-trusted-security-policy
persist-credentials: false
- name: Reconcile immutable direct-source provenance
run: |
set -euo pipefail
reconciler=".cwl-trusted-security-policy/scripts/ci/osv_direct_source_reconcile.py"
audit="osv-provenance-audit.json"
if [ -L "$reconciler" ]; then
echo "::error::Trusted OSV provenance policy is a symlink; refusing an untrusted policy boundary."
exit 1
elif [ ! -f "$reconciler" ]; then
echo "::notice::trusted provenance policy is not yet present; retaining raw OSV evidence without reconciliation."
else
base_lock="$RUNNER_TEMP/osv-base-provenance/pnpm-lock.yaml"
if [ -f "$base_lock" ]; then
python3 "$reconciler" \
--results old-results.json \
--lockfile "$base_lock" \
--source-path source/pnpm-lock.yaml \
--audit "$audit" \
--label base
fi

if [ -L source/pnpm-lock.yaml ]; then
echo "::error::Head pnpm-lock.yaml is a symlink; direct-source provenance is not authoritative."
exit 1
fi
if [ -f source/pnpm-lock.yaml ]; then
python3 "$reconciler" \
--results new-results.json \
--lockfile source/pnpm-lock.yaml \
--source-path source/pnpm-lock.yaml \
--audit "$audit" \
--label head
fi
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Reconciler no-ops on the central repo's own PR run

The policy checkout resolves to base.sha for ContextualWisdomLab/.github PRs (security-scan.yml:351). This PR adds the reconciler, so base main lacks it and the reconcile step takes the [ ! -f "$reconciler" ] notice branch, retaining raw OSV evidence. This is the intended pull_request_target model (run the base branch's trusted script), so reconciliation cannot exercise itself on this PR's own CI.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci-cd CI, GitHub Actions, checks, release, or supply chain priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant