Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

fix: skip publish-secrets in the CI audit, which the app token cannot read - #24

Merged
t11z merged 3 commits into
mainfrom
fix/audit-ci-publish-secrets
Nov 24, 2026
Merged

t11z merged 3 commits into
mainfrom
fix/audit-ci-publish-secrets

Conversation

@t11z

@t11z t11z commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

The weekly audit (--ci, governance app token) reported a false failure for publish-secrets.

Evidence: cinewright/cinewright run 45453924317 (pin 2b802b8 = v1.1.0) ended with 17 pass, 1 fail, 1 skip. The only failure was publish-secrets cannot verify: gh api repos/cinewright/cinewright/actions/secrets?per_page=100 ... Resource not accessible by integration (HTTP 403), and audit-issue opened cinewright#54. The same audit in full mode with the owner's token passes 19/19. All other remote checks passed with the app token in that run.

Cause: check_token_permissions skips in ci mode, check_publish_secrets did not. The app deliberately has no Secrets permission, so the 403 surfaced through Audit.remote() as a failure.

Change:

  • In ci mode check_publish_secrets adds skip with the token-permissions wording before any API call. Full and local modes are unchanged.
  • The usage text and docs/MANUAL-STEPS.md say that the app has no Secrets access and that the owner's local audit covers both checks.
  • Tests: a fake API answers 403 on every secrets and environments endpoint. In ci mode the check is skip, no such endpoint is called, and the report passes. In full mode it still fails with "cannot verify". The compliant full run asserts pass.

python3 -m unittest discover -s tests: 101 tests OK.

@t11z
t11z merged commit 909be11 into main Nov 24, 2026
1 check passed
@t11z
t11z deleted the fix/audit-ci-publish-secrets branch November 24, 2026 18:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant