Skip to content

fix(security): fail closed on unavailable dependency review - #897

Open
seonghobae wants to merge 6 commits into
mainfrom
fix/dependency-review-fail-closed-current-main-20260809
Open

fix(security): fail closed on unavailable dependency review#897
seonghobae wants to merge 6 commits into
mainfrom
fix/dependency-review-fail-closed-current-main-20260809

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Purpose

Replace the stale, conflicted #799 integration path with a bounded current-main repair for #810. Preserve #799 as historical evidence only; do not import its divergent removal of later Strix work.

Root cause

The central required Security Scan could conclude success when the exact dependency-review comparison returned HTTP 403 or 404. The support probe emitted supported=false, exited zero, and skipped the pinned Dependency Review action. A hard supply-chain evidence boundary had therefore been modeled as an optional capability optimization.

Remedy and TDD identity

  • exact protected base: 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba;
  • RED commit b06bb25c1af99b784730209dceb299cd493734f7 reverses the stale fail-open queue contract;
  • GREEN commit 71947d24828cfb42806f5ef0a8abf83f9279d0af accepts only HTTP 200, preserves curl transport status separately, bounds connect/total time, discards the response body, checks out the explicit PR-head repository/SHA, and emits exact-identity failure evidence;
  • transport-failure regression b527192d7b758fc2f8a95545f25545cec7747c99 proves a partial transfer that prints 200 but exits non-zero cannot pass;
  • exact current head: 59d702f30fa419a016e24c18e87e05c76fbee4a3;
  • read-only permissions and immutable action pins remain unchanged.

Scope correction

Unrelated scheduler-secret and Python-lock-materializer source/test changes that had accumulated on this branch were removed. Flattening an include-bearing requirements lock under a generated filename does not preserve relative include targets and requires a separately designed, test-first path-preservation contract.

The final scope changes only the Dependency Review control plane and its durable architecture, operator, release-note, and workflow-contract evidence. The existing executable mode of scripts/ci/materialize_base_python_requirements.py is preserved; the final mode-only correction introduces no source-content change.

Acceptance contract

Merge only after:

  1. all exact-current-head deterministic, security, dependency, and required workflows are terminal and clean;
  2. Dependency Review reaches the immutably pinned action through a complete exact HTTP-200 comparison whose transport exits zero;
  3. current automated review has no valid unresolved finding;
  4. a qualifying counted non-author formal approval exists; and
  5. repository protection permits normal integration.

After merge, require a protected-main public-repository consumer run proving a non-200 or failed-transfer comparison cannot produce a green Dependency Review gate before closing #810.

Summary by CodeRabbit

  • 보안 강화

    • 보안 스캔이 PR의 정확한 기준·변경 커밋을 검증하도록 개선되었습니다.
    • 의존성 검토에서 네트워크 오류, 불완전한 응답, 빈 응답 및 비정상 상태 코드를 허용하지 않습니다.
    • Trivy와 Scorecard 결과가 정확한 변경 커밋에 연결됩니다.
  • 문서

    • 의존성 검토의 실패 종료 정책, 권한 범위 및 예외 처리 기준을 문서화했습니다.
  • 테스트

    • 보안 스캔의 커밋 검증과 실패 처리 동작에 대한 자동화 테스트를 강화했습니다.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 359a2b60-e7b1-4cd8-a157-96cf03d26796

📥 Commits

Reviewing files that changed from the base of the PR and between 07efb4a and ef3d210.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • requirements-pip-audit-ci-hashes.txt
  • tests/test_required_workflow_queue_contract.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c52c7aa-33d3-4477-8a84-d7cf70105d89

📥 Commits

Reviewing files that changed from the base of the PR and between 3cc65a7 and 07efb4a.

📒 Files selected for processing (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

dependency-review 게이트가 exact base/head 비교의 HTTP 200 증거만 허용하도록 변경되었습니다. 오류, 빈 응답, 부분 전송, 비정상 상태 코드는 실패 처리합니다. PR head checkout, 회귀 계약 테스트, 운영 문서를 갱신했습니다.

Changes

공급망 검증 제어

Layer / File(s) Summary
Exact-head dependency-review 게이트
.github/workflows/security-scan.yml, tests/test_required_workflow_queue_contract.py
PR head 저장소와 정확한 SHA를 checkout합니다. API probe는 응답 본문을 저장하지 않습니다. 전송 코드 0과 HTTP 200을 모두 확인하지 못하면 게이트를 실패시킵니다. 회귀 테스트는 부분 전송과 GITHUB_OUTPUT 미생성을 검증합니다.
Fail-closed 운영 계약 문서
docs/doctoring/dependency-review-fail-closed.md, CHANGELOG.md
fail-closed 정책, 권한 범위, 오류 분류, 수용·롤백 조건과 관련 표준을 문서화합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 07efb

The dependency-review gate is changed to fail closed when comparison evidence is unavailable, and no actionable merge-blocking risk remains in the supplied evidence beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant security_scan
  participant GitHubCompareAPI
  participant dependency_review
  PullRequest->>security_scan: PR head repository와 head SHA 전달
  security_scan->>GitHubCompareAPI: 정확한 base...head 비교 요청
  GitHubCompareAPI-->>security_scan: HTTP 상태와 전송 결과 반환
  security_scan->>dependency_review: 전송 코드 0 및 HTTP 200일 때 실행
Loading

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 dependency-review를 사용할 수 없을 때 fail closed로 처리하는 주요 변경을 정확하고 간결하게 설명합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dependency-review-fail-closed-current-main-20260809

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
seonghobae enabled auto-merge (squash) August 9, 2026 12:47

Copy link
Copy Markdown
Contributor Author

/oc Refetch and abort unless exact head is still 71947d24828cfb42806f5ef0a8abf83f9279d0af. There is one blocking source defect in the current GREEN candidate: the dependency-review probe still uses status="$(curl ... || true)". That discards curl's transport exit code. A partial-transfer/body-write/TLS/transport failure can therefore emit HTTP 200 and still reach supported=true, contradicting this PR's own fail-closed contract and the historical regression already observed in predecessor work.

Fix test-first on this existing branch only. Add a permanent regression that models a fake/controlled curl which writes HTTP 200 to stdout but exits nonzero (for example curl exit 18 partial transfer) and proves the support probe fails rather than setting supported=true. Then change the shell to preserve both channels independently: capture curl output/status without || true erasing the exit code, restore set -e, and require both curl_status == 0 and exact HTTP status 200 before emitting supported=true. Any nonzero transport exit, empty/malformed status, or non-200 status must produce only bounded exact repository/base/head/status/transport diagnostics and exit 1. Continue discarding the response body, keep 10s connect/30s total timeouts, exact-head checkout, read-only permissions, immutable dependency-review action pin, and no credential/model/ruleset changes.

Strengthen tests/test_required_workflow_queue_contract.py or a focused companion to reject the literal || true support-probe pattern and require the captured transport-status branch. Run the focused fail-closed contract, complete central suite, compilation, git diff --check, Strix quick gate, then exact-head security/supply-chain gates. Do not mark this head accepted from the current queued checks; they are stale as soon as this repair lands.

Copy link
Copy Markdown
Contributor Author

Exact-head RCA and proof for 8fc17de86d1d22c9c11946dd7f70ff934c0b553a:

  • First failing boundary on predecessor 71947d24828cfb42806f5ef0a8abf83f9279d0af: the support probe used command substitution with || true, which erased curl's transport exit. A partial transfer could emit HTTP 200, exit nonzero, and still reach supported=true.
  • Technical root cause: HTTP response status and transport integrity were collapsed into one string channel. Systemic control: the permanent executable regression now supplies a controlled curl that prints 200 and exits 18, and requires fail-closed behavior with no GitHub output.
  • Remedy: capture the curl transport exit separately under a bounded set +e region, immediately restore set -e, normalize the body-free HTTP status, and require transport exit 0 plus exact HTTP 200. Diagnostics remain bounded to repository/base/head, normalized HTTP status, and numeric transport exit.
  • Preserved boundaries: discarded response body, 10-second connect/30-second total timeouts, exact-head checkout, read-only permissions, immutable dependency-review pin, and no credential/model/ruleset changes.
  • RED: focused contract failed 2 tests, including the executable HTTP-200/exit-18 counterexample.
  • GREEN: focused 2 passed; complete central suite 978 passed + 16 subtests; compile/diff checks clean; Strix self-test PASS.

Hosted exact-head security and supply-chain results remain authoritative.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Evaluate exact current head 8fc17de86d1d22c9c11946dd7f70ff934c0b553a against independently resolved live main 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. Keep source revision, current-base compatibility, deterministic checks, model judgment, and qualifying independent human approval as separate evidence channels; do not infer merge authority.

Copy link
Copy Markdown
Contributor Author

Follow-up at current head 59505c1d: declared optional PR_REVIEW_MERGE_TOKEN and OPENCODE_APPROVE_TOKEN under workflow_call.secrets in both reusable review schedulers, added the permanent contract test and fail-closed operations note. This enables callers to pass only the two required review credentials instead of secrets: inherit. Evidence: actionlint passed; focused contract suite 52 passed. The full suite reached 974 passed with 5 pre-existing platform-gated trusted-uv tests failing on this macOS arm64 workstation before the archive-verification assertions; no unrelated source was changed. No self/Admin/bypass approval or merge was used.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Review exact current head 59505c1d89eb7ea816e921b6da38079c736608c2 against independently resolved live main 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. Nine exact-head hosted workflows are terminal-success and no review thread is unresolved. Verify dependency-review unavailable, skipped, neutral, and absent evidence fail closed without manufacturing a dependency finding, while successful exact-head evidence remains distinct from semantic review and merge authority. Automated judgment is not qualifying independent human approval or merge authorization.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review
@opencode-agent review
@cwl-noema-review review

Review exact current head 59505c1d89eb7ea816e921b6da38079c736608c2 only. All nine exact-head quality, security, and supply-chain workflows are terminal-success. Validate that dependency-review capability accepts only a transport-successful HTTP 200 for the exact base/head comparison, with 10-second connect and 30-second total bounds, response body discarded, literal PR-head repository/SHA checkout, read-only permissions, and no substitute security gate. Review only; do not mutate, merge, or alter protections.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

@seonghobae I will review PR #897 at exact head 59505c1d89eb7ea816e921b6da38079c736608c2 only.

I will verify the dependency-review fail-closed boundary and the listed workflow invariants. I will keep exact-head check evidence separate from review judgment, approval, and merge authority. I will not modify code, merge, or change protections.

I used the repository guidance that only successful checks for the exact current head are valid merge evidence.


🧠 Learnings used
Learnt from: seonghobae
Repo: ContextualWisdomLab/.github PR: 0
File: :0-0
Timestamp: 2026-08-05T13:44:10.007Z
Learning: For PR `#782`, only successful checks associated with the exact current head are valid merge evidence. Do not treat queued, in-progress, cancelled, predecessor-head, temporary-workflow, or administrative-bypass results as passing evidence. Before a formal approval, verify that the direct security and supply-chain workflows, the permanent hourly NVIDIA NIM contract, current-head reviews, unresolved-thread checks, and an independent approval have completed successfully.

Learnt from: CR
Repo: ContextualWisdomLab/.github PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-07-29T06:47:25.581Z
Learning: Applies to opencode.jsonc : All reviewer agents in `opencode.jsonc` must keep `"edit": "deny"`; reviewers must never implement changes.
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

Exact-current-head review request for 59505c1d89eb7ea816e921b6da38079c736608c2 over protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

Review the bounded six-file supply-chain evidence repair: dependency-review support accepts only HTTP 200; non-200, timeout, or unavailable comparison fails closed with exact identity and operator guidance; response bodies are discarded; checkout is bound to the explicit PR head repository/SHA; and read-only permissions plus immutable action pins remain. Strix Changed Path Quality CI, CodeQL PR, Python Security, Security Scan, SAST Semgrep, Secret Scan, OSV-Scanner PR, Scorecard PR, and SBOM Generation are terminal-success on this exact head. No review thread exists.

Keep the exact head unchanged. Do not update the branch, synthesize author approval, substitute another scanner for dependency-review evidence, add credentials, merge, release, or bypass protection.

@coderabbitai review
@opencode-agent review
@cwl-noema-review review
@strix review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 4 minutes and 33 seconds before sending another message.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Re-evaluate exact current head 3af29c40796490ced463a9a6de7c4495a4ae97c8. 리뷰 확인 for the bounded-include increment; do not treat Checks wait as a blocker.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Please perform a fresh exact-head semantic review of 3af29c40796490ced463a9a6de7c4495a4ae97c8, keeping source findings separate from merge-readiness evidence. Do not infer approval from wrapper checks; submit a formal review only if the current head is defect-free under the protected control-plane contract.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Please provide an independent exact-head review of 3af29c40796490ced463a9a6de7c4495a4ae97c8. Confirm that unavailable or skipped dependency-review evidence cannot satisfy the required security contract, and submit a formal review verdict rather than a status-only acknowledgement.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head 3af29c40796490ced463a9a6de7c4495a4ae97c8, focusing on whether every unavailable, skipped, neutral, or metadata-incomplete dependency-review path fails closed and cannot satisfy the required security contract.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 50 minutes and 4 seconds before sending another message.

@seonghobae
seonghobae marked this pull request as draft August 14, 2026 08:45
auto-merge was automatically disabled August 14, 2026 08:45

Pull request was converted to draft

Copy link
Copy Markdown
Contributor Author

Returned to Draft because this branch overlaps the authoritative prerequisite #821 and no longer matches its own four-file bounded-scope claim.

#821 already owns the fail-closed dependency-review boundary and exact-head focused quality gate. This branch contains a useful incremental refinement—capturing the curl exit status independently while discarding the response body—but its current eleven-file diff also duplicates the security workflow, materializer/governance changes, and scheduler-token changes outside that refinement.

After #821 reaches protected main, rebuild this as a narrow follow-up retaining only the independently justified transport-status refinement, its focused regression proving a numeric HTTP 200 plus non-zero curl exit still fails closed, and bounded doctoring/changelog evidence. Remove duplicated prerequisite and unrelated scheduler/materializer changes, then reacquire exact-head checks and independent review.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 09:00
@seonghobae
seonghobae enabled auto-merge (squash) August 14, 2026 09:00

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head 94f799f7e0701e1a317bbe407759988cbad915c4. The branch is now narrowed to the dependency-review fail-closed control plane; unrelated scheduler-secret and incomplete requirements-include materializer changes were removed. Verify exact-head checkout, curl transport/HTTP-200 binding, body discard, timeout bounds, and the permanent fail-closed contract.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 16 minutes and 31 seconds before sending another message.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Please perform a fresh exact-head semantic review of 94f799f7e0701e1a317bbe407759988cbad915c4. Confirm that only a complete HTTP-200 exact base/head comparison can reach the pinned dependency-review action, every transport/non-200/malformed outcome fails closed without response-body disclosure, and the scope cleanup removed unrelated changes. Submit a formal current-head verdict.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

After a qualifying exact-head OpenCode verdict, independently review 94f799f7e0701e1a317bbe407759988cbad915c4. Confirm unavailable dependency evidence cannot be converted into a passing security contract and that no complementary scanner is treated as a semantic substitute.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact head 3cc65a7b24371ee453875d9efe06e82ff06477b7 and submit a formal current-head verdict.

Replay unique #897 source onto current origin/main. Skip shared
ARCHITECTURE/CLAUDE trees. Treat non-200 or failed transport as
unavailable evidence rather than a clean skip.
@opencode-agent
opencode-agent Bot force-pushed the fix/dependency-review-fail-closed-current-main-20260809 branch from d6bb469 to b2d19cc Compare August 21, 2026 16:20
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head lock repair pushed as ef3d210 from b2d19cc. Updated the hashed pip audit runtime from pip 26.1.2 to pip 26.2.1 with exact hashes. The same lock has passed local pip-audit in this maintenance loop; hosted checks and exact-head approval must be re-evaluated. No bypass or force push was used.

devin-ai-integration[bot]

This comment was marked as resolved.

@opencode-agent opencode-agent Bot added area: dependencies Dependency or lockfile maintenance area: security Security boundary, hardening, or vulnerability prevention merge: urgent-review Central or critical pull request requiring immediate review attention priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: maintenance Maintenance, build, dependency, or operational upkeep priority: critical Immediate blocker, P0, urgent deadlock, or critical incident and removed priority: medium Normal-priority or P2 work labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 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: 425354d9-7569-4874-aef2-cd937df68100

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 39596ab4-ca9e-4523-9984-a888e7af734d

📥 Commits

Reviewing files that changed from the base of the PR and between 07efb4a and ac4d8ad.

📒 Files selected for processing (3)
  • .github/workflows/security-scan.yml
  • CHANGELOG.md
  • tests/test_required_workflow_queue_contract.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

보안 스캔 워크플로가 정확한 PR revision을 checkout하고 SHA를 검증합니다. dependency-review는 curl 전송 성공과 HTTP 200을 모두 요구하는 fail-closed 게이트로 변경되었습니다. Trivy와 Scorecard SARIF 업로드에도 PR head 정보를 고정했습니다. 관련 문서와 계약 테스트를 갱신했습니다.

Changes

공급망 검증 제어

Layer / File(s) Summary
Exact-head dependency-review 게이트
.github/workflows/security-scan.yml, docs/doctoring/dependency-review-fail-closed.md, CHANGELOG.md
dependency-review가 PR head 저장소와 SHA를 사용합니다. curl 종료 코드 0과 HTTP 200을 모두 확인합니다. 오류, 빈 응답, 부분 전송, 403, 404는 실패 처리합니다.
Exact revision checkout 및 SARIF 연결
.github/workflows/security-scan.yml
OSV, Trivy, Scorecard checkout이 정확한 revision을 사용합니다. 실제 checkout SHA를 검증합니다. Trivy와 Scorecard SARIF 업로드에 PR head ref와 SHA를 지정합니다.
워크플로 계약 및 fail-closed 회귀 검증
tests/test_required_workflow_queue_contract.py
정확한 revision checkout, cross-fork credential 처리, API 상태 검증, 전송 실패 시 동작을 테스트합니다. 실패 시 GITHUB_OUTPUT이 생성되지 않는지 확인합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to ac4d8

The change makes dependency review fail closed when required comparison evidence is unavailable, with no actionable merge-blocking risk remaining after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant SecurityScan
  participant GitHubCompareAPI
  participant DependencyReview
  participant SARIFUpload
  PullRequest->>SecurityScan: head repository와 immutable head SHA 제공
  SecurityScan->>GitHubCompareAPI: 정확한 base/head 비교 요청
  GitHubCompareAPI-->>SecurityScan: curl 상태와 HTTP 상태 반환
  SecurityScan->>DependencyReview: 두 상태가 성공이면 dependency-review 실행
  SecurityScan->>SARIFUpload: PR head ref와 SHA로 결과 업로드
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 제목은 dependency-review를 사용할 수 없을 때 보안 검사를 fail-closed로 처리하는 PR의 핵심 변경을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
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.
✨ 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/dependency-review-fail-closed-current-main-20260809

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.

Copy link
Copy Markdown
Contributor Author

#1222 exact-head Security owner update

Exact current head: 9ac7cef1fc611d010429955d7b1fbd62002929c8, synchronized non-destructively with protected main@23a776ed37027d8ab8ab2aefcf81fac586352e2f (tree 62e81090dcded28eefb96cdce7e5ab20562a3c59).

TDD evidence:

  • RED: test_security_scan_binds_every_scan_to_immutable_pr_revisions failed at the missing OSV base checkout attestation.
  • GREEN: focused Security contract 65 passed; full central suite 1382 passed, 1 skipped, 16 subtests passed.

The workflow now explicitly materializes and attests immutable OSV base/head revisions; binds Dependency Review, Trivy, and Scorecard to the submitted head repository/SHA; supplies exact base/head refs to the pinned Dependency Review action; and binds all Security SARIF uploads to refs/pull/<n>/head plus the exact head SHA. Permissions, severities, immutable pins, cancellation, and fail-closed gates are unchanged.

Current hosted workflows are new-head queued/in-progress and are not counted as passing. @opencode-agent review — submit a review-only formal verdict for this exact head after current-head checks are authoritative; do not transfer predecessor verdicts or mutate/merge the branch.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Exact-head update for .github#1222 and the still-live #810 visibility contract:

  • current head: bc3802d96fea911f2490a7f0b5dc7d5b11e794c4
  • protected base integrated: main@9ad0ad50409561292b424d6f35a95d670a277e77
  • every head-oriented Security checkout remains bound and runtime-attested to the submitted PR head; OSV keeps explicit dual-revision semantics
  • the dependency-review support receipt now allowlists repository visibility to public|private|internal, emits unknown otherwise, and records exact repository/base/head/HTTP/curl identities without inferring a 403 cause
  • RED: focused visibility contract failed before the diagnostic existed; GREEN: 65 focused Security contracts and 1,382 central tests + 16 subtests passed (1 skipped)
  • tree identity: 60453e0539ceca6721e1e500d9b34cf440e1650d

Hosted checks and a substantive formal Reviews API verdict must be regenerated for this exact head. Keep #1222 open until protected-main integration and a fresh ScopeWeave #523 canary records the actual Security checkout SHA equal to its exact contributor head.

@opencode-agent review this exact head only. Review-only: do not mutate branches, merge state, rulesets, or releases.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Exact-head permission-contract repair for #1222 / #810:

  • current head: ac4d8ad392f00de5136cb4f28778ed02f22eb020
  • protected base: main@9ad0ad50409561292b424d6f35a95d670a277e77
  • exact tree: 19b1ac4eac7cedd9dbe2c4432300e2944c51bc05
  • RED: the focused contract rejected the pre-existing comment-summary-in-pr: on-failure configuration because the dependency-review job intentionally retains read-only pull-requests permission
  • GREEN: the pinned action now uses comment-summary-in-pr: never; workflow annotations and fail-closed status remain authoritative without widening credentials
  • focused Security contract: 65 passed
  • full central suite: 1382 passed, 1 skipped, 16 subtests passed

Every head-oriented Security checkout remains bound and runtime-attested to the submitted PR head, and OSV remains explicitly dual-revision. Hosted exact-head checks and a substantive exact-head formal verdict must regenerate; predecessor evidence is non-passing.

@opencode-agent review this exact head only. Review-only; do not mutate or merge the branch.

Copy link
Copy Markdown
Contributor Author

Exact-head review handoff for ac4d8ad392f00de5136cb4f28778ed02f22eb020.

The two current informational threads are now dispositioned against the live required-workflow contract and resolved:

  • unavailable/disabled Dependency Review evidence remains typed non-passing by design; it is never converted to skipped success;
  • Trivy is explicitly head-oriented and binds the submitted repository/SHA, attests git rev-parse HEAD, and scans that exact tree rather than the synthetic merge; Scorecard remains soft and cannot satisfy the hard gates.

All 12 substantive exact-head hosted workflows are successful, with only the unrelated repair workflow skipped; unresolved threads are zero. No exact-current-head formal Reviews API verdict exists yet.

@opencode-agent review

Review-only request: inspect the exact-head binding and fail-closed dependency-evidence boundary and submit a substantive formal verdict for this SHA.

Copy link
Copy Markdown
Contributor Author

Protected-main synchronization moved the exact head to d9b395cd01999a6ec946d3c7a013f22225143782 on base 885f2cd251999f21cf562cab3e2d9cc3cc3ec737. Fresh comparison confirms the PR remains scoped to Security-owned paths (security-scan.yml, its contract tests, changelog, and dependency-review doctoring); all 13 substantive exact-head hosted workflows are terminal success and all review threads are resolved. An exact-current-head formal Reviews API verdict is still absent and remains the integration gate.

@opencode-agent review

@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 d9b395cd01999a6ec946d3c7a013f22225143782.
  • 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: security-scan.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: security-scan.yml"]
  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: dependency-review-fail-closed.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: dependency-review-fail-closed.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test: test_required_workflow_queue_contract.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_required_workflow_queue_contract.py"]
  R4 --> V4["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 d9b395cd01999a6ec946d3c7a013f22225143782.
  • 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: security-scan.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: security-scan.yml"]
  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: dependency-review-fail-closed.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: dependency-review-fail-closed.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test: test_required_workflow_queue_contract.py"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test: test_required_workflow_queue_contract.py"]
  R4 --> V4["targeted test run"]
Loading

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

Labels

area: dependencies Dependency or lockfile maintenance area: security Security boundary, hardening, or vulnerability prevention merge: urgent-review Central or critical pull request requiring immediate review attention priority: critical Immediate blocker, P0, urgent deadlock, or critical incident status: blocked Blocked by conflict, dependency, or required prerequisite type: maintenance Maintenance, build, dependency, or operational upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant