Skip to content

πŸ”’οΈ Add zizmor and fix audit findings#15316

Merged
tiangolo merged 31 commits intomasterfrom
setup-zizmor
Apr 16, 2026
Merged

πŸ”’οΈ Add zizmor and fix audit findings#15316
tiangolo merged 31 commits intomasterfrom
setup-zizmor

Conversation

@YuriiMotov
Copy link
Copy Markdown
Member

@YuriiMotov YuriiMotov commented Apr 10, 2026

This PR includes changes from #15261 . So, if this PR gets merged, #15261 may be closed.

Changes applied:

  • Pin actions by SHA
  • Setup cooldown period for Dependabot (7 days)
  • Ignored dangerous-triggers rule for pull_request_target and workflow_run (checked that they are used in a safe way)
  • Specified minimal permissions on workflow level, moved permissions to the job level
  • Ignored secrets-outside-env rule as using the environments would require approval for each run (and without required approvals it wouldn't make sense)
  • Added persist-credentials: false for actions/checkout when persisting is not needed by other steps
  • Specified version of uv to install for astral-sh/setup-uv (Note that Dependabot will not upgrade it, but Renovate can do it)
  • Ignored template-injection rule when input comes from trusted source (workflow_dispatch or schedule)
  • Fixed template-injection in other cases
  • Disabled cache for deploy-docs workflow (see https://docs.zizmor.sh/audits/#cache-poisoning). Not completely sure we need this as uv has internal defense mechanism against cache poisoning
  • Specified run condition in latest-changes to make it clear that it only runs for merged PRs
  • Replaced uvx prek command with uv run prek - uvx uses latest version (unpinned), it's better to use locked version
  • Added branch filter in notify-translations - it's recommended practice for pull_request_target triggers and in this case it shouldn't break anything
  • Added zizmor pre-commit hook (there are multiple options, but I think this way is more convenient) - tested by introducing issue (see)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 10, 2026

Merging this PR will not alter performance

βœ… 20 untouched benchmarks


Comparing setup-zizmor (bb712e1) with master (708606c)

Open in CodSpeed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

@YuriiMotov YuriiMotov marked this pull request as ready for review April 10, 2026 15:48
@github-actions github-actions Bot added the conflicts Automatically generated when a PR has a merge conflict label Apr 16, 2026
@github-actions

This comment was marked as resolved.

@github-actions github-actions Bot removed the conflicts Automatically generated when a PR has a merge conflict label Apr 16, 2026
Copy link
Copy Markdown
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

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

Excellent, looks great! πŸš€ Thanks! πŸ™Œ

@tiangolo tiangolo enabled auto-merge (squash) April 16, 2026 12:19
@tiangolo tiangolo merged commit 3f4169b into master Apr 16, 2026
48 checks passed
@tiangolo tiangolo deleted the setup-zizmor branch April 16, 2026 12:21
@rsb-23
Copy link
Copy Markdown

rsb-23 commented Apr 20, 2026

Few suggestions to reduce tech debt:

  1. We can use .github/zizmor.yml for config.
  2. Can use reusable actions for checkout, python and uv. (DRY it)

This makes handling new zizmor checks simpler.

If you prefer, I can make the changes and draft a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants