Skip to content

workflows/actionlint: run zizmor#195961

Merged
carlocab merged 1 commit into
masterfrom
zizmor
Oct 30, 2024
Merged

workflows/actionlint: run zizmor#195961
carlocab merged 1 commit into
masterfrom
zizmor

Conversation

@carlocab

Copy link
Copy Markdown
Member

This tool, written by a certain @woodruffw, seems like it would be useful.

See https://github.com/woodruffw/zizmor.

Needs #195936.

@carlocab carlocab requested review from a team and MikeMcQuaid as code owners October 29, 2024 16:51
@carlocab carlocab added the CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. label Oct 29, 2024
@github-actions github-actions Bot added automerge-skip `brew pr-automerge` will skip this pull request workflows PR modifies GitHub Actions workflow files labels Oct 29, 2024
@carlocab carlocab marked this pull request as draft October 29, 2024 16:53
@woodruffw

Copy link
Copy Markdown
Member

For viz: zizmorcore/zizmor#57 will make the SARIF output slightly friendlier for GitHub's SARIF support once fixed. Right now the SARIF results are well-formed and uploaded correctly, but don't rebase correctly on top of the repo root.

@carlocab carlocab marked this pull request as ready for review October 29, 2024 17:21
@github-advanced-security

Copy link
Copy Markdown
Contributor

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@woodruffw woodruffw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM behaviorally. I leave it up to you whether you'd prefer I fix zizmorcore/zizmor#57 before merging here or not -- the results will show up as is, but won't be as easy to relate to existing files until that's fixed 🙂

This seems like it would be useful.
@carlocab

Copy link
Copy Markdown
Member Author

Dropped HOMEBREW_NO_INSTALL_FROM_API to avoid erroring out when these formulae are updated.

I leave it up to you whether you'd prefer I fix woodruffw/zizmor#57 before merging here or not -- the results will show up as is, but won't be as easy to relate to existing files until that's fixed 🙂

May also just wait until this is fixed.

@woodruffw

Copy link
Copy Markdown
Member

I've released v0.1.3, which contains the SARIF fix.

Example render:

https://github.com/woodruffw/zizmor/security/code-scanning/2

@carlocab

Copy link
Copy Markdown
Member Author

Can't see, but we can re-run actionlint / zizmor after #196022 has hit the API.

@woodruffw

Copy link
Copy Markdown
Member

Ah, whoops. Here's a cap:

(There's still lots of room for improvement there.)

@carlocab

Copy link
Copy Markdown
Member Author

Cool. Let's give this a try. There are a lot of warnings though -- many of them would be difficult to address.

@carlocab carlocab added this pull request to the merge queue Oct 30, 2024
Merged via the queue into master with commit ea5bf0d Oct 30, 2024
@carlocab carlocab deleted the zizmor branch October 30, 2024 02:55
@carlocab

Copy link
Copy Markdown
Member Author

Something that would be nice to fix is that the output on GitHub isn't quite as nice as on the command-line. For example:

https://github.com/Homebrew/homebrew-core/security/code-scanning/34

Compare this with:

warning[artipacked]: credential persistence through GitHub Actions artifacts
   --> /opt/homebrew/Library/Taps/homebrew/homebrew-core/.github/workflows/tests.yml:147:9
    |
147 |       - uses: actions/checkout@v4
    |         ------------------------- does not set persist-credentials: false
    |

On GitHub you don't see the recommendation to set persist-credentials: false.

carlocab added a commit to Homebrew/brew that referenced this pull request Oct 30, 2024
carlocab added a commit to Homebrew/brew that referenced this pull request Oct 30, 2024
@woodruffw

Copy link
Copy Markdown
Member

Something that would be nice to fix is that the output on GitHub isn't quite as nice as on the command-line. For example:

Yep, this is tracked with zizmorcore/zizmor#66. I'll try and fix that with the next release.

carlocab added a commit to Homebrew/brew that referenced this pull request Oct 30, 2024
carlocab added a commit to Homebrew/brew that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge-skip `brew pr-automerge` will skip this pull request CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. workflows PR modifies GitHub Actions workflow files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants