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
The compliance audit flags this repo because security_and_analysis.secret_scanning_non_provider_patterns.status is disabled on GitHub. The existing scripts/compliance-remediate.sh script already auto-fixes most settings-level findings via the GitHub API but routes every push-protection/* finding straight to the "skipped" pile, so this finding has been re-opened by the weekly audit since 2026-05-12.
This change adds an auto-remediation path for the specific push-protection/secret_scanning_non_provider_patterns finding so the next remediation run flips the setting via API (the same call apply-repo-settings.sh would make, scoped to the single key the audit reported).
Implementation Checklist
Add remediate_security_analysis_setting() helper in scripts/compliance-remediate.sh that PATCHes security_and_analysis.<key>.status via stdin (since gh api -F cannot send nested JSON).
Wire push-protection/secret_scanning_non_provider_patterns into the dispatcher above the existing push-protection/* catch-all so it routes to the new helper instead of being skipped.
Keep the existing push-protection/* catch-all for the other push-protection findings (open alerts, CI gitleaks job, gitignore, bypasses) since they each require a different remediation path.
Tests to Write
test/scripts/compliance-remediate/security-analysis.bats — using the existing gh stub pattern from test/workflows/feature-ideation/stubs/gh:
dispatcher routes push-protection/secret_scanning_non_provider_patterns to the security-analysis remediator (was previously skipped)
remediator issues gh api -X PATCH repos/<org>/<repo> with the nested security_and_analysis payload
dry-run mode does NOT call the API
other push-protection/* checks (e.g. open_secret_alerts) still hit the skip path
failed PATCH (gh exit != 0) reports a failure rather than silent success
Test Command
bats test/scripts/compliance-remediate/
The full repo lint will also run: bash .dev-lead/scripts/dev-lead-lint.sh (shellcheck on all scripts/**/*.sh).
Added remediate_security_analysis_setting() helper in scripts/compliance-remediate.sh (PATCHes the nested security_and_analysis object via stdin, since gh api -F only sends flat form fields).
Wired push-protection/secret_scanning_non_provider_patterns into the dispatcher above the push-protection/* catch-all.
Catch-all preserved for the other push-protection findings (open alerts, CI gitleaks job, gitignore baseline, recent bypasses) — each of those needs a different remediation path and stays skipped for now.
New bats test suite under test/scripts/compliance-remediate/ (helper + gh stub + 4 cases).
Test Results
$ bats test/scripts/compliance-remediate/security-analysis.bats
1..4
ok 1 applies PATCH to security_and_analysis for secret_scanning_non_provider_patterns
ok 2 dry-run does not call the GitHub API but records the planned change
ok 3 failed PATCH is reported as a failure
ok 4 non-remediated push-protection findings still hit the skip path
$ bats -r test/ # full suite
1..155
... (all 155 tests pass)
$ bash .dev-lead/scripts/dev-lead-lint.sh
[lint] shellcheck on 12 file(s)...
[lint] all checks passed
Files Changed
scripts/compliance-remediate.sh — new remediate_security_analysis_setting() function (+33 lines) and one dispatcher case (+3 lines) wiring push-protection/secret_scanning_non_provider_patterns to it.
test/scripts/compliance-remediate/security-analysis.bats — new bats suite covering apply, dry-run, failure, and catch-all paths.
test/scripts/compliance-remediate/stubs/gh — env-driven gh stub mirroring test/workflows/feature-ideation/stubs/gh, extended with GH_STUB_STDIN_LOG so tests can assert on JSON payloads sent via --input -.
Notes
This change adds the auto-remediation path; the underlying setting on petry-projects/.github flips to enabled only when compliance-remediate.sh runs with a token that has repo-admin permission (as documented in standards/push-protection.md#required-repo-level-settings). PR feat: add compliance-remediate.sh — close the audit -> auto-fix -> PR loop #220 noted the workflow wiring step is gated on a PAT with workflow scope, which this agent cannot modify.
Scope kept narrow per the issue: only secret_scanning_non_provider_patterns is wired in. The other four security_and_analysis settings (secret_scanning, secret_scanning_push_protection, secret_scanning_ai_detection, dependabot_security_updates) are currently enabled on this repo, so no remediation entry is needed for them — they can be added later by following the same pattern if they ever regress.
No new bats CI workflow is wired for test/scripts/compliance-remediate/ (a workflow file change would need workflow scope). Running bats -r test/ locally executes the new suite alongside the existing 151 tests; the existing Feature Ideation Tests workflow does not exercise these files.
Activity
don-petry commentedon May 12, 2026
Claude encountered an error —— View job
I'll analyze this and get back to you.
don-petry commentedon May 12, 2026
Weekly Compliance Audit (2026-05-12)
This finding is still open.
Detail: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)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: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)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: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 13, 2026
Weekly Compliance Audit (2026-05-13)
This finding is still open.
Detail: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 15, 2026
Weekly Compliance Audit (2026-05-15)
This finding is still open.
Detail: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)Standard: standards/push-protection.md#required-repo-level-settings
20 remaining items
don-petry commentedon May 30, 2026
Weekly Compliance Audit (2026-05-30)
This finding is still open.
Detail: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon May 30, 2026
@don-petry-dev-lead
don-petry commentedon Jun 5, 2026
Weekly Compliance Audit (2026-06-05)
This finding is still open.
Detail: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)Standard: standards/push-protection.md#required-repo-level-settings
don-petry commentedon Jun 9, 2026
Dev-Lead Implementation Plan
Issue: #252 — Compliance: secret_scanning_non_provider_patterns
Scope
The compliance audit flags this repo because
security_and_analysis.secret_scanning_non_provider_patterns.statusisdisabledon GitHub. The existingscripts/compliance-remediate.shscript already auto-fixes most settings-level findings via the GitHub API but routes everypush-protection/*finding straight to the "skipped" pile, so this finding has been re-opened by the weekly audit since 2026-05-12.This change adds an auto-remediation path for the specific
push-protection/secret_scanning_non_provider_patternsfinding so the next remediation run flips the setting via API (the same callapply-repo-settings.shwould make, scoped to the single key the audit reported).Implementation Checklist
remediate_security_analysis_setting()helper inscripts/compliance-remediate.shthat PATCHessecurity_and_analysis.<key>.statusvia stdin (sincegh api -Fcannot send nested JSON).push-protection/secret_scanning_non_provider_patternsinto the dispatcher above the existingpush-protection/*catch-all so it routes to the new helper instead of being skipped.push-protection/*catch-all for the other push-protection findings (open alerts, CI gitleaks job, gitignore, bypasses) since they each require a different remediation path.Tests to Write
test/scripts/compliance-remediate/security-analysis.bats— using the existingghstub pattern fromtest/workflows/feature-ideation/stubs/gh:push-protection/secret_scanning_non_provider_patternsto the security-analysis remediator (was previously skipped)gh api -X PATCH repos/<org>/<repo>with the nestedsecurity_and_analysispayloadpush-protection/*checks (e.g.open_secret_alerts) still hit the skip pathTest Command
bats test/scripts/compliance-remediate/The full repo lint will also run:
bash .dev-lead/scripts/dev-lead-lint.sh(shellcheck on allscripts/**/*.sh).don-petry commentedon Jun 9, 2026
Dev-Lead: Implementation Complete
Plan Execution
remediate_security_analysis_setting()helper inscripts/compliance-remediate.sh(PATCHes the nestedsecurity_and_analysisobject via stdin, sincegh api -Fonly sends flat form fields).push-protection/secret_scanning_non_provider_patternsinto the dispatcher above thepush-protection/*catch-all.test/scripts/compliance-remediate/(helper + gh stub + 4 cases).Test Results
Files Changed
scripts/compliance-remediate.sh— newremediate_security_analysis_setting()function (+33 lines) and one dispatcher case (+3 lines) wiringpush-protection/secret_scanning_non_provider_patternsto it.test/scripts/compliance-remediate/security-analysis.bats— new bats suite covering apply, dry-run, failure, and catch-all paths.test/scripts/compliance-remediate/helpers/setup.bash— bats helper mirroringtest/workflows/feature-ideation/helpers/setup.bash.test/scripts/compliance-remediate/stubs/gh— env-drivenghstub mirroringtest/workflows/feature-ideation/stubs/gh, extended withGH_STUB_STDIN_LOGso tests can assert on JSON payloads sent via--input -.Notes
petry-projects/.githubflips toenabledonly whencompliance-remediate.shruns with a token that has repo-admin permission (as documented instandards/push-protection.md#required-repo-level-settings). PR feat: add compliance-remediate.sh — close the audit -> auto-fix -> PR loop #220 noted the workflow wiring step is gated on a PAT withworkflowscope, which this agent cannot modify.secret_scanning_non_provider_patternsis wired in. The other foursecurity_and_analysissettings (secret_scanning,secret_scanning_push_protection,secret_scanning_ai_detection,dependabot_security_updates) are currentlyenabledon this repo, so no remediation entry is needed for them — they can be added later by following the same pattern if they ever regress.test/scripts/compliance-remediate/(a workflow file change would needworkflowscope). Runningbats -r test/locally executes the new suite alongside the existing 151 tests; the existingFeature Ideation Testsworkflow does not exercise these files.don-petry commentedon Jun 10, 2026
Weekly Compliance Audit (2026-06-10)
This finding is still open.
Detail: Secret scanning non-provider patterns should be enabled (current:
disabled, expected:enabled)Standard: standards/push-protection.md#required-repo-level-settings
feat: implement issue #252 — Compliance: secret_scanning_non_provider…
feat: implement issue #252 — Compliance: secret_scanning_non_provider…