Skip to content

CI: Use Zizmor defaults#4223

Open
snazy wants to merge 1 commit intoapache:mainfrom
snazy:zizmor-defaults
Open

CI: Use Zizmor defaults#4223
snazy wants to merge 1 commit intoapache:mainfrom
snazy:zizmor-defaults

Conversation

@snazy
Copy link
Copy Markdown
Member

@snazy snazy commented Apr 16, 2026

Zizmor is a static analysis toll, which, by the nature of such tools, does not consider the context of a finding, but judges on using static patters. Users can either deal with false positives or silence a lot to a level that they don't report much by default. Hiding those can, in case of security issues, be dangerous.

'low' confidence doesn't mean that the risk does not exist nor that the issue is not exploitable.

'informational'/'low' severity issues today can become 'high' or even 'critical' ones tomorrow. Hiding those can easily give a false sense of security.

Chains of informational/low severity/confidence issues have led to exactly the recent tj-actions incident. Some of these are:

  • unpinned actions: this is still a risk, just look at the approved wildcard patterns.
  • no explicitly declared workflow/job permissions - this is even just informational
  • similarly: excessive workflow/job permissions
  • (some) template injections

As the workflows and actions work with Zizmor's default severity/confidence, I'd advocate to use its default and not silence a lot.

Zizmor is a static analysis toll, which, by the nature of such tools, does not consider the context of a finding, but judges on using static patters. Users can either deal with false positives or silence a lot to a level that they don't report much by default. Hiding those can, in case of security issues, be dangerous.

'low' confidence doesn't mean that the risk does not exist nor that the issue is not exploitable.

'informational'/'low' severity issues today can become 'high' or even 'critical' ones tomorrow. Hiding those can easily give a false sense of security.

Chains of informational/low severity/confidence issues have led to exactly the recent tj-actions incident. Some of these are:

* unpinned actions: this is _still_ a risk, just look at the [approved wildcard patterns](https://github.com/apache/infrastructure-actions/blob/8a059befd17ed98f4942c5cf3a67b7378045b669/approved_patterns.yml).
* no explicitly declared workflow/job permissions - this is even just _informational_
* similarly: excessive workflow/job permissions
* (some) template injections

As the workflows and actions work with Zizmor's default severity/confidence, I'd advocate to use its default and not silence a lot.
@adutra
Copy link
Copy Markdown
Contributor

adutra commented Apr 17, 2026

#min-severity:
#min-confidence:
advanced-security: ${{ github.event_name != 'pull_request' }}
annotations: ${{ github.event_name == 'pull_request' }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Strictly speaking, the "defaults" for Zizmor is to use advanced security, always. The question is how to fail a PR with advanced security on.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right. This one is mirroring what the old workflow did:

  • for PRs: annotations=true + advanced-security=false
  • for main/release branch CI: annotations=false + advanced-security=true

@snazy
Copy link
Copy Markdown
Member Author

snazy commented Apr 17, 2026

I'm a little confused now, we have 4 PRs modifying Zizmor:

* this one
* [ci: apply github workflow best practice (zizmor/codeql/asf-allowlist-check) #4216](https://github.com/apache/polaris/pull/4216)

This is orthogonal.

* [ci: remove zizmor ignores #4221](https://github.com/apache/polaris/pull/4221)

This one it contrary to this PR.

* [CI: Make security workflows CodeQL + Zizmor a real PR-merge-gate #4224](https://github.com/apache/polaris/pull/4224)

This is orthogonal.

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Apr 17, 2026
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.

2 participants