zizmor hook (.pre-commit-config.yaml): zizmorcore/zizmor-pre-commit at 06a3975… # frozen: v1.32.0, hook zizmor, files: ^\.gitea/workflows/[^/]+\.ya?ml$, args: [--no-progress, --offline] at the default level. Overriding args drops the hook's own --no-progress, so it is repeated.
image.yml: permissions: packages: write, the job-token env and the job-token probe are removed. One probe of the org push token fails the job on anything but 202 (and when the secrets are empty), and the log records that it passed. The credentials header comment, the step comment and the step name now describe the single credential. The digest scrape is unchanged (one comment no longer names the removed marker file).
ci image 0.2.31 → 0.2.32 (bump_image_versions.py). The Dockerfile smoke run now includes zizmor, and its sample workflow sets permissions: {} (otherwise zizmor reports excessive-permissions).
Docs: docs/images/ci.md lists the zizmor hook; CONTRIBUTING.md no longer says the image workflow tries the job token first.
Test: test_check_bot_pr_diff.py checks that a Renovate bump of the real zizmor rev: line passes the bot-diff gate (red before the hook existed, green after).
No changelog fragment: only tooling files change, and they are in build_ignore.
Verified
Precondition: the latest Images run (4481) logs Registry credential in use: org-secrets (...) for every image, so job-token was not the method in use.
pre-commit run zizmor --all-files: all five workflows audited, no findings.
Two throwaway workflows, not committed, each fail the hook: pull_request_target (dangerous-triggers) and ${{ github.event.pull_request.title }} in run: (template-injection).
The Dockerfile's smoke sample passes zizmor once it sets permissions: {}.
pre-commit run --all-files passes, and so do the commit hooks on both commits.
python -m unittest discover -s tests/scripts: 202 tests OK.
check_image_versions.py bump origin/main and pins: ok.
ansible-test sanity through the pre-push hook: passed.
code-review (Standards and Spec): no missing requirement and no hard violation. Its wording points (step name, a success log line, the reason for permissions: {}) are fixed in the second commit.
Not verified
The ci image build with zizmor baked in, and its layer sizes. It builds only on main after merge. Estimate: /opt/pre-commit was 58.0 MB compressed on 0.2.31, and one more Python hook environment adds roughly 15–25 MB raw, so it should stay below the 95 MiB limit. Read the size line of the post-merge Images run.
The rewritten credential step. It runs only on main, so the first post-merge Images run is its test.
Lint in CI, and an actual Renovate bump of the new rev: line (covered only by the unit test).
Not done here
.gitea/workflows/AGENTS.md does not exist yet (#182). When it is written, the "never pull_request_target" and "never interpolate ${{ github.* }} into run:" rules should be held by "control: the zizmor hook". I will note that on #182.
CLAUDE.md's list of hooks names neither zizmor nor ruff and shellcheck; that file is replaced by #185.
Closes #145
## What
- **zizmor hook** (`.pre-commit-config.yaml`): `zizmorcore/zizmor-pre-commit` at `06a3975… # frozen: v1.32.0`, hook `zizmor`, `files: ^\.gitea/workflows/[^/]+\.ya?ml$`, `args: [--no-progress, --offline]` at the default level. Overriding `args` drops the hook's own `--no-progress`, so it is repeated.
- **`image.yml`**: `permissions: packages: write`, the job-token env and the job-token probe are removed. One probe of the org push token fails the job on anything but 202 (and when the secrets are empty), and the log records that it passed. The credentials header comment, the step comment and the step name now describe the single credential. The digest scrape is unchanged (one comment no longer names the removed marker file).
- **`ci` image 0.2.31 → 0.2.32** (`bump_image_versions.py`). The Dockerfile smoke run now includes `zizmor`, and its sample workflow sets `permissions: {}` (otherwise zizmor reports excessive-permissions).
- **Docs**: `docs/images/ci.md` lists the zizmor hook; `CONTRIBUTING.md` no longer says the image workflow tries the job token first.
- **Test**: `test_check_bot_pr_diff.py` checks that a Renovate bump of the real zizmor `rev:` line passes the bot-diff gate (red before the hook existed, green after).
No changelog fragment: only tooling files change, and they are in `build_ignore`.
## Verified
- **Precondition:** the latest Images run (4481) logs `Registry credential in use: org-secrets (...)` for every image, so `job-token` was not the method in use.
- `pre-commit run zizmor --all-files`: all five workflows audited, no findings.
- Two throwaway workflows, not committed, each fail the hook: `pull_request_target` (`dangerous-triggers`) and `${{ github.event.pull_request.title }}` in `run:` (`template-injection`).
- The Dockerfile's smoke sample passes zizmor once it sets `permissions: {}`.
- `pre-commit run --all-files` passes, and so do the commit hooks on both commits.
- `python -m unittest discover -s tests/scripts`: 202 tests OK.
- `check_image_versions.py bump origin/main` and `pins`: ok.
- `ansible-test sanity` through the pre-push hook: passed.
- `code-review` (Standards and Spec): no missing requirement and no hard violation. Its wording points (step name, a success log line, the reason for `permissions: {}`) are fixed in the second commit.
## Not verified
- **The `ci` image build with zizmor baked in, and its layer sizes.** It builds only on `main` after merge. Estimate: `/opt/pre-commit` was 58.0 MB compressed on 0.2.31, and one more Python hook environment adds roughly 15–25 MB raw, so it should stay below the 95 MiB limit. Read the size line of the post-merge Images run.
- **The rewritten credential step.** It runs only on `main`, so the first post-merge Images run is its test.
- Lint in CI, and an actual Renovate bump of the new `rev:` line (covered only by the unit test).
## Not done here
- `.gitea/workflows/AGENTS.md` does not exist yet (#182). When it is written, the "never `pull_request_target`" and "never interpolate `${{ github.* }}` into `run:`" rules should be held by "control: the zizmor hook". I will note that on #182.
- `CLAUDE.md`'s list of hooks names neither zizmor nor ruff and shellcheck; that file is replaced by #185.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude
added this to the Open to contributors milestone 2026-11-21 18:54:22 +00:00
Defame1297
was assigned by Claude2026-11-21 18:54:22 +00:00
Add zizmor (v1.32.0, pinned by SHA) as a pre-commit hook over
.gitea/workflows, offline at its default level; it fails on
pull_request_target and on ${{ }} expanded into run:. The ci image
bakes and smoke-tests the new hook environment, so its version moves
to 0.2.32.
image.yml drops `packages: write` and the job-token probe: Gitea 28
refuses the job token for organisation packages, and the latest build
used the org push token. One probe of that token now fails fast.
Refs #145
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
The step no longer chooses between credentials, so its name says it
checks the push token, and the log records that the probe passed. The
Dockerfile says why the smoke workflow sets `permissions: {}`.
Refs #145
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
CODEOWNERS rules
requested review from Defame1297 2026-11-21 18:54:22 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #145
What
.pre-commit-config.yaml):zizmorcore/zizmor-pre-commitat06a3975… # frozen: v1.32.0, hookzizmor,files: ^\.gitea/workflows/[^/]+\.ya?ml$,args: [--no-progress, --offline]at the default level. Overridingargsdrops the hook's own--no-progress, so it is repeated.image.yml:permissions: packages: write, the job-token env and the job-token probe are removed. One probe of the org push token fails the job on anything but 202 (and when the secrets are empty), and the log records that it passed. The credentials header comment, the step comment and the step name now describe the single credential. The digest scrape is unchanged (one comment no longer names the removed marker file).ciimage 0.2.31 → 0.2.32 (bump_image_versions.py). The Dockerfile smoke run now includeszizmor, and its sample workflow setspermissions: {}(otherwise zizmor reports excessive-permissions).docs/images/ci.mdlists the zizmor hook;CONTRIBUTING.mdno longer says the image workflow tries the job token first.test_check_bot_pr_diff.pychecks that a Renovate bump of the real zizmorrev:line passes the bot-diff gate (red before the hook existed, green after).No changelog fragment: only tooling files change, and they are in
build_ignore.Verified
Registry credential in use: org-secrets (...)for every image, sojob-tokenwas not the method in use.pre-commit run zizmor --all-files: all five workflows audited, no findings.pull_request_target(dangerous-triggers) and${{ github.event.pull_request.title }}inrun:(template-injection).permissions: {}.pre-commit run --all-filespasses, and so do the commit hooks on both commits.python -m unittest discover -s tests/scripts: 202 tests OK.check_image_versions.py bump origin/mainandpins: ok.ansible-test sanitythrough the pre-push hook: passed.code-review(Standards and Spec): no missing requirement and no hard violation. Its wording points (step name, a success log line, the reason forpermissions: {}) are fixed in the second commit.Not verified
ciimage build with zizmor baked in, and its layer sizes. It builds only onmainafter merge. Estimate:/opt/pre-commitwas 58.0 MB compressed on 0.2.31, and one more Python hook environment adds roughly 15–25 MB raw, so it should stay below the 95 MiB limit. Read the size line of the post-merge Images run.main, so the first post-merge Images run is its test.rev:line (covered only by the unit test).Not done here
.gitea/workflows/AGENTS.mddoes not exist yet (#182). When it is written, the "neverpull_request_target" and "never interpolate${{ github.* }}intorun:" rules should be held by "control: the zizmor hook". I will note that on #182.CLAUDE.md's list of hooks names neither zizmor nor ruff and shellcheck; that file is replaced by #185.🤖 Generated with Claude Code
Add zizmor (v1.32.0, pinned by SHA) as a pre-commit hook over .gitea/workflows, offline at its default level; it fails on pull_request_target and on ${{ }} expanded into run:. The ci image bakes and smoke-tests the new hook environment, so its version moves to 0.2.32. image.yml drops `packages: write` and the job-token probe: Gitea 28 refuses the job token for organisation packages, and the latest build used the org push token. One probe of that token now fails fast. Refs #145 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDGThe step no longer chooses between credentials, so its name says it checks the push token, and the log records that the probe passed. The Dockerfile says why the smoke workflow sets `permissions: {}`. Refs #145 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG