fix: align release-governance tests with central Security Scan migration (#926) - #968
fix: align release-governance tests with central Security Scan migration (#926)#968seonghobae wants to merge 4 commits into
Conversation
…ion (#926) PR #926 ("stop duplicating central Security Scan on PRs") intentionally removed the per-repo PR security-scan copies: it deleted .github/workflows/dependency-review.yml and dropped the `pull_request:` triggers from scorecard.yml and trivy.yml, because dependency-review, osv-scan, trivy-fs and scorecard now run via the org-level required "Security Scan" workflow on PRs. The governance tests still asserted the old per-repo contract, so the full backend pytest suite failed on every open PR, blocking the coverage-evidence gate develop-wide. Update tests/test_release_governance.py to the current intentional state: - test_stepsecurity_remediation_adds_pinned_audit_hardening: drop dependency-review.yml from the per-repo hardened-workflow list and remove the dependency-review-action pin assertion (file no longer exists in this repo). - test_required_code_scanning_workflows_upload_scorecard_and_trivy_sarif: replace the stale `pull_request:` trigger assertion with a positive guard that the per-repo `pull_request:` trigger stays removed (so the central scan is not re-duplicated) while push/develop/master coverage and all SARIF-upload governance remain asserted. No genuine governance weakened: every still-valid pin, permission, SARIF and hardening assertion is retained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RTAMs4bpSZS77Xe3RQjv9P
|
@copilot resolve the merge conflicts on this branch. |
… and pull_request triggers
Head branch was pushed to by a user without write access
Merge conflicts resolved in commit
All 34 governance tests now pass. |
|
자동 정리: base 대비 실제 변경(diff)이 0건이라 이 PR을 닫습니다. 변경을 추가한 뒤 reopen하세요. |
OpenCode Review Overview
Pull request overviewOpenCode reviewed the current-head bounded evidence and found no blocking issues. FindingsNo blocking findings. SummaryApproved with no findings. No executable changes or issues were found in the PR. Coverage and implementation completeness scans passed, and no unresolved review threads or failed GitHub checks were present.
Changed-File Evidence Mapflowchart LR
Evidence["OpenCode evidence"] --> Review["Current PR review path"]
Review --> Verify["Required checks"]
|
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head bounded evidence and found no blocking issues.
Findings
No blocking findings.
Summary
Approved with no findings. No executable changes or issues were found in the PR. Coverage and implementation completeness scans passed, and no unresolved review threads or failed GitHub checks were present.
- Result: APPROVE
- Reason: No executable changes or issues found in the PR
- Head SHA:
2fa9da5bcb581979c94ad37774bd0a677f1f26b8 - Workflow run: 29184865707
- Workflow attempt: 1
Changed-File Evidence Map
flowchart LR
Evidence["OpenCode evidence"] --> Review["Current PR review path"]
Review --> Verify["Required checks"]
Problem
On
developtip (commit 9db32d0, PR #926 "stop duplicating central Security Scan on PRs"),backend/tests/test_release_governance.pyhad 2 failing tests, which failed the full backend pytest suite and therefore the coverage-evidence gate ondevelopand on every open PR branched from it.PR #926 intentionally centralized PR-time security scanning into the org-level required "Security Scan" workflow (osv-scan + dependency-review + trivy-fs, plus scorecard). To stop duplicating it, #926:
.github/workflows/dependency-review.yml,pull_request:triggers fromscorecard.ymlandtrivy.yml(keepingpush:to develop/master +workflow_dispatch).The governance tests still asserted the old per-repo contract (that
dependency-review.ymlexists and that scorecard/trivy carrypull_request:triggers), so they became stale and started failing.Reproduction (before)
Fix
Align
backend/tests/test_release_governance.pywith the current intentional state — touching only the assertions #926 deliberately made obsolete:test_stepsecurity_remediation_adds_pinned_audit_hardening: dropdependency-review.ymlfrom the per-repo hardened-workflow list and remove the now-danglingdependency-review-actionpin assertion (the file no longer lives in this repo — dependency review runs centrally).test_required_code_scanning_workflows_upload_scorecard_and_trivy_sarif: replace the staleassert "pull_request:" in workflowwith a positive migration guardassert "pull_request:" not in workflow, so nobody re-introduces a per-repo PR trigger that would re-duplicate the central scan. Allpush:/develop/mastercoverage and every SARIF-upload, permission, and action-pin assertion are retained.No genuine governance weakened. Every still-valid pin, permission, SARIF and hardening assertion stays. No
os.getenvsecrets, no test-gaming — the change only removes assertions on files/triggers that #926 intentionally deleted and adds a stronger guard locking in the migration.Verification
python -m pytest tests/test_release_governance.py→ 29 passedpython -m pytest -q→ 1139 passed, 22 skipped, 0 failedcoverage run -m pytestworks; governance test file at 100% line coverageruff checkon the changed file → cleanImpact
Unblocks the coverage-evidence gate for all open naruon PRs, which were all failing on this develop-wide regression regardless of their own changes.
🤖 Generated with Claude Code