You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gather context: read AGENTS.md and relevant standards
Read push-protection standard
Read compliance audit workflow and scripts
Understand the finding and determine fix
Implement fix in scripts/lib/push-protection.sh and standards/push-protection.md
CI passing: SonarCloud ✅, ShellCheck ✅, AgentShield ✅, Lint ✅, CodeQL in progress
Tagged @petry-projects/org-leads for review
What was done
Root cause:ORG_SCORECARD_TOKEN lacks security_events OAuth scope or admin access, so GET /repos/{owner}/{repo} returns security_and_analysis: null. The audit treated this the same as "settings not configured" and fired security_and_analysis_unavailable every week with no self-resolving path.
Fix in scripts/lib/push-protection.sh:
pp_check_security_and_analysis: when security_and_analysis is unreadable, falls back to a proxy check via the secret-scanning alerts endpoint (no admin scope needed on public repos). If the alerts endpoint returns a valid array → secret scanning is confirmed active → emits security_and_analysis_unverifiable instead of security_and_analysis_unavailable. Issue Compliance: security_and_analysis_unavailable #117 will auto-close on the next audit run; a new security_and_analysis_unverifiable issue is created with clear actionable guidance.
pp_apply_security_and_analysis: removed premature return 1 when current state is unreadable — the loop already handles null/missing values correctly (all required settings are "enabled", so applying unconditionally is safe and idempotent).
Fix in standards/push-protection.md: Added "Token scope requirement" section documenting the proxy-check fallback and remediation steps.
Activity
don-petry commentedon Apr 9, 2026
Weekly Compliance Audit (2026-04-09)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon Apr 9, 2026
Claude encountered an error —— View job
Analyzing Compliance Finding #117
don-petry commentedon Apr 10, 2026
Weekly Compliance Audit (2026-04-10)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon Apr 14, 2026
Claude encountered an error —— View job
I'll analyze this and get back to you.
don-petry commentedon Apr 17, 2026
Weekly Compliance Audit (2026-04-17)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon Apr 21, 2026
Weekly Compliance Audit (2026-04-21)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon Apr 24, 2026
Weekly Compliance Audit (2026-04-24)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 1, 2026
Weekly Compliance Audit (2026-05-01)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 8, 2026
Weekly Compliance Audit (2026-05-08)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 8, 2026
Claude finished @don-petry's task in 13m 1s —— View job •
claude/issue-117-20260508-1733• [Create PR ➔](https://github.com/petry-projects/.github/compare/main...claude/issue-117-20260508-1733?quick_pull=1&title=Issue%20%23117%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23117%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Analyzing Compliance Finding #117
scripts/lib/push-protection.shandstandards/push-protection.md@petry-projects/org-leadsfor reviewWhat was done
Root cause:
ORG_SCORECARD_TOKENlackssecurity_eventsOAuth scope or admin access, soGET /repos/{owner}/{repo}returnssecurity_and_analysis: null. The audit treated this the same as "settings not configured" and firedsecurity_and_analysis_unavailableevery week with no self-resolving path.Fix in
scripts/lib/push-protection.sh:pp_check_security_and_analysis: whensecurity_and_analysisis unreadable, falls back to a proxy check via the secret-scanning alerts endpoint (no admin scope needed on public repos). If the alerts endpoint returns a valid array → secret scanning is confirmed active → emitssecurity_and_analysis_unverifiableinstead ofsecurity_and_analysis_unavailable. Issue Compliance: security_and_analysis_unavailable #117 will auto-close on the next audit run; a newsecurity_and_analysis_unverifiableissue is created with clear actionable guidance.pp_apply_security_and_analysis: removed prematurereturn 1when current state is unreadable — the loop already handles null/missing values correctly (all required settings are"enabled", so applying unconditionally is safe and idempotent).Fix in
standards/push-protection.md: Added "Token scope requirement" section documenting the proxy-check fallback and remediation steps.PR #224 ·
don-petry commentedon May 11, 2026
Weekly Compliance Audit (2026-05-11)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 12, 2026
Weekly Compliance Audit (2026-05-12)
This finding is still open.
Detail: Could not fetch security_and_analysis — token may lack admin scope, or the repo's plan does not expose these settings
Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 12, 2026
Resolved! This check is now passing as of 2026-05-12. Closing automatically.
fix(push-protection): use alerts API proxy when security_and_analysis…
fix(push-protection): use alerts API proxy when security_and_analysis…
fix(push-protection): use alerts API proxy when security_and_analysis…