Skip to content

Commit 13addbc

Browse files
fix(ci): annotations and advanced-security are mutually exclusive
Two mistakes of mine, both caught by CI rather than locally, both from running a piece of the chain instead of the chain. 1. The zizmor action refuses to start with both `advanced-security: true` and `annotations: true`. I switched the first and left the second. Running zizmor directly does not exercise the action's own option validation, so the local check could not have caught it -- the action wrapper is part of the contract and was never run. `annotations: false` is the right resolution rather than reverting: inline annotations vanish with the run, a Code Scanning alert persists and can be triaged. Uploading them is the point of enabling advanced-security. 2. An extraneous `f` prefix on a string literal with no placeholder (`tests/test_workflow_hardening_gate.py`). Ruff catches it; I had run only pytest locally, not `ruff check src tests benchmarks`. Local chain now run as the job runs it: Lint `All checks passed!`, 7 passed, and the gate green on the real tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JsDFcKo97HuF5ZLjxa3rRa
1 parent 9c2ec22 commit 13addbc

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/zizmor.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,11 @@ jobs:
5555
# nie hochgeladen: sie fehlten im Code Scanning nicht mangels
5656
# Befunden, sondern mangels Upload.
5757
advanced-security: true
58-
annotations: true
58+
# Mutually exclusive with advanced-security: the action refuses to
59+
# start if both are set. Findings now go to Code Scanning, which is
60+
# the point of turning advanced-security on -- inline annotations
61+
# vanish with the run, a Code Scanning alert persists and can be
62+
# triaged. Not caught locally: running zizmor directly does not
63+
# exercise the action's own option validation.
64+
annotations: false
5965

‎tests/test_workflow_hardening_gate.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_a_clean_workflow_is_accepted(tmp_path: Path) -> None:
7575
# invisible to the gate, every ``actions/checkout`` among them. They
7676
# were pinned by discipline, not by this check.
7777
"unpinned action in list form",
78-
f"""name: l1
78+
"""name: l1
7979
on: [push]
8080
permissions:
8181
contents: read

0 commit comments

Comments
 (0)