Skip to content

allowlist: silence zizmor unpinned-tools on if:false 1Password load-secrets-action#886

Merged
potiuk merged 1 commit into
mainfrom
zizmor-ignore-1password-unpinned-tools
May 27, 2026
Merged

allowlist: silence zizmor unpinned-tools on if:false 1Password load-secrets-action#886
potiuk merged 1 commit into
mainfrom
zizmor-ignore-1password-unpinned-tools

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 24, 2026

Summary

  • Adds an inline # zizmor: ignore[unpinned-tools] on the if: false line of 1Password/load-secrets-action in .github/actions/for-dependabot-triggered-reviews/action.yml.
  • Reason: zizmor v1.25.2 (pulled by zizmorcore/zizmor-action@v0.5.6) added the unpinned-tools audit, which flags the action because it installs the 1Password CLI from an unpinned URL when it runs. In this file the step has if: false — the entry exists purely so dependabot tracks the SHA for the allowlist; it never executes.
  • Pattern matches existing # zizmor: ignore[<rule>] <explanation> ignores already in this repo (secrets-outside-env, dependabot-cooldown).

Why not a zizmor.yml config-level ignore?

  • zizmor's docs explicitly state composite-action findings cannot be silenced via the config file — inline is the only path here.
  • Even if it were possible, config-level path matching is base-filename only, which would silence the rule across all 5 action.yml files in this repo.

What this unblocks

🤖 Generated with Claude Code

…ecrets-action

zizmor v1.25.2 (shipped by zizmor-action v0.5.6) added the
unpinned-tools audit, which flags `1Password/load-secrets-action`
at line 40 of `.github/actions/for-dependabot-triggered-reviews/action.yml`
because that action installs the 1Password CLI from an unpinned
URL when it runs. In this file the step is `if: false` — it
never executes; the entry exists only so dependabot tracks the
SHA for inclusion in the approved allowlist.

zizmor's `unpinned-tools` audit doesn't currently understand
`if: false` and produces a false positive. Suppress with an
inline `# zizmor: ignore[unpinned-tools]` comment plus an
explanatory tail, matching the pattern already used for
`secrets-outside-env` and `dependabot-cooldown` ignores in
this repo.

This unblocks #885 (zizmor-action v0.5.5 → v0.5.6).

Generated-by: Claude Code (Claude Opus 4.7)
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an inline zizmor suppression for the new unpinned-tools audit on a composite-action step that is intentionally non-executable (if: false) and exists only to keep Dependabot tracking the allowlist SHA.

Changes:

  • Adds # zizmor: ignore[unpinned-tools] ... to the if: false line for 1Password/load-secrets-action in the Dependabot-tracked composite action allowlist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/actions/for-dependabot-triggered-reviews/action.yml
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented May 27, 2026

Gentle ping @dfoulks1 @ppkarwasz — one-line suppression for the new zizmor unpinned-tools audit on the if: false 1Password entry in the dependabot composite. Worth a quick look when you have a moment; landing this also unblocks #885 (zizmor 0.5.5 → 0.5.6 bump, currently failing on exactly this finding).

Copy link
Copy Markdown
Contributor

@dfoulks1 dfoulks1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a docfix. SGTM

@potiuk potiuk merged commit 2a9abd3 into main May 27, 2026
10 checks passed
@potiuk potiuk deleted the zizmor-ignore-1password-unpinned-tools branch May 27, 2026 23:04
potiuk added a commit that referenced this pull request May 28, 2026
#886 tried to silence zizmor 1.25.2's new `unpinned-tools` audit on
`1Password/load-secrets-action` with an inline `# zizmor: ignore[]`
comment, but placed it on the `if: false` line. zizmor only honours
the ignore on the line where the finding lives — line 40 (the
`- uses:` line) — so the suppression never took effect, and #885
(zizmor 0.5.5 → 0.5.6 bump) has been stuck failing CI ever since.

Inline placement on the `- uses:` line would also be fragile: it
sits next to dependabot's `# v4.0.0` version comment, and dependabot
rewrites that comment on every bump. The zizmor docs (configuration
guide) also state that "composite action findings cannot be ignored
via `zizmor.yml`", so the config-file path is closed.

The audit's actual remediation (per its source at
crates/zizmor/src/audit/unpinned_tools.rs) is to set a static
`with.version` value. The audit fires only when the input is
missing or literal `latest`. Setting it to any specific string
silences the finding. Since these composite entries are `if: false`
(allowlist registration only — they never execute), the version
value is cosmetic; only the static analyser cares.

This change:

- Adds `_unpinned_tool_version_pin()` + `_UNPINNED_TOOLS_VERSION_PINS`
  in `gateway/gateway.py` so the composite generator emits a
  `with.version` block for any action zizmor's `unpinned-tools` audit
  knows about (currently `1password/load-secrets-action` and
  `aquasecurity/setup-trivy`; the latter is preemptive — we don't
  carry it on the allowlist today).
- Applies the same `with.version` block manually to the existing
  `1Password/load-secrets-action` entries in the composite. The next
  full regeneration (post #892's pipeline recovery) will produce
  identical content; the manual edit only fast-paths the fix so #885
  can land immediately.
- Drops the no-op `# zizmor: ignore[unpinned-tools]` tail comment
  #886 added on the `if: false` line — the version pin is now the
  real suppression mechanism.

Local verification: `zizmor --min-severity medium --min-confidence
medium .github/ allowlist-check/ pelican/ stash/` now reports
"No findings to report. Good job!" (down from 1 medium). Gateway
tests still pass (8 passed).

Generated-by: Claude Opus 4.7
potiuk added a commit that referenced this pull request May 28, 2026
`1Password/load-secrets-action` with an inline `# zizmor: ignore[]`
comment, but placed it on the `if: false` line. zizmor only honours
the ignore on the line where the finding lives — line 40 (the
`- uses:` line) — so the suppression never took effect, and #885
(zizmor 0.5.5 → 0.5.6 bump) has been stuck failing CI ever since.

Inline placement on the `- uses:` line would also be fragile: it
sits next to dependabot's `# v4.0.0` version comment, and dependabot
rewrites that comment on every bump. The zizmor docs (configuration
guide) also state that "composite action findings cannot be ignored
via `zizmor.yml`", so the config-file path is closed.

The audit's actual remediation (per its source at
crates/zizmor/src/audit/unpinned_tools.rs) is to set a static
`with.version` value. The audit fires only when the input is
missing or literal `latest`. Setting it to any specific string
silences the finding. Since these composite entries are `if: false`
(allowlist registration only — they never execute), the version
value is cosmetic; only the static analyser cares.

This change:

- Adds `_unpinned_tool_version_pin()` + `_UNPINNED_TOOLS_VERSION_PINS`
  in `gateway/gateway.py` so the composite generator emits a
  `with.version` block for any action zizmor's `unpinned-tools` audit
  knows about (currently `1password/load-secrets-action` and
  `aquasecurity/setup-trivy`; the latter is preemptive — we don't
  carry it on the allowlist today).
- Applies the same `with.version` block manually to the existing
  `1Password/load-secrets-action` entries in the composite. The next
  full regeneration (post #892's pipeline recovery) will produce
  identical content; the manual edit only fast-paths the fix so #885
  can land immediately.
- Drops the no-op `# zizmor: ignore[unpinned-tools]` tail comment
  #886 added on the `if: false` line — the version pin is now the
  real suppression mechanism.

Local verification: `zizmor --min-severity medium --min-confidence
medium .github/ allowlist-check/ pelican/ stash/` now reports
"No findings to report. Good job!" (down from 1 medium). Gateway
tests still pass (8 passed).

Generated-by: Claude Opus 4.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants