Skip to content

Lint our GitHub Actions workflows with zizmor - #1222

Merged
rocodes merged 1 commit into
mainfrom
zizmor
Jan 3, 2025
Merged

Lint our GitHub Actions workflows with zizmor#1222
rocodes merged 1 commit into
mainfrom
zizmor

Conversation

@legoktm

@legoktm legoktm commented Dec 20, 2024

Copy link
Copy Markdown
Member

Status

Ready for review

Description of Changes

zizmor is a new tool to lint GitHub Actions workflows. For the most part our workflows are pretty low risk since we don't give it a bunch of credentials, but we can avoid issues in the future by locking them down now.

The only issue that needed fixing was setting persist-credentials: false for actions/checkout, which we do everywhere except in the workflows that need to push.

While zizmor is written in Rust, it is also shipped as a prebuilt binary via PyPI, so we can set it as a poetry dependency and run it as part of our normal lint CI.

Refs freedomofpress/securedrop-dev#18.

Testing

  • CI passes
  • visual review

Deployment

Any special considerations for deployment? n/a

zizmor is a new tool to lint GitHub Actions workflows. For the most part
our workflows are pretty low risk since we don't give it a bunch of
credentials, but we can avoid issues in the future by locking them down
now.

The only issue that needed fixing was setting persist-credentials: false
for actions/checkout, which we do everywhere except in the workflows
that need to push.

While zizmor is written in Rust, it is also shipped as a prebuilt binary
via PyPI, so we can set it as a poetry dependency and run it as part of
our normal lint CI.

Refs <freedomofpress/securedrop-dev#18>.

@rocodes rocodes left a comment

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.

Thanks @legoktm, lgtm

@rocodes
rocodes added this pull request to the merge queue Jan 3, 2025
Merged via the queue into main with commit f29cf9d Jan 3, 2025
@deeplow deeplow mentioned this pull request Feb 24, 2025
45 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants