]> git.ipfire.org Git - thirdparty/curl.git/commit
GHA/checksrc: check GHA rules with zizmor
authorViktor Szakats <commit@vsz.me>
Wed, 7 May 2025 16:56:27 +0000 (18:56 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 7 May 2025 21:11:09 +0000 (23:11 +0200)
commite522f47986bb72f194636e155191d7dccdc2d4fc
tree0f39968b6b0829917bc25f2b58ee859852908365
parent283ad5c4320fa1d733e60a0dbe216ee36e3924fb
GHA/checksrc: check GHA rules with zizmor

The pedantic level is experimental. If it causes issues, we may just
disable it alongside the ignore comments.

Also:
- silence error:
  ```
   INFO audit: zizmor: completed label.yml
  error[dangerous-triggers]: use of fundamentally insecure workflow trigger
    --> label.yml:13:1
     |
  13 | 'on': [pull_request_target]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ pull_request_target is almost always used insecurely
     |
     = note: audit confidence -> Medium
  ```
- fix pedantic warning:
  ```
   INFO audit: zizmor: completed label.yml
  warning[excessive-permissions]: overly broad permissions
    --> label.yml:1:1
  ...  |
  24 | |         with:
  25 | |           repo-token: '${{ secrets.GITHUB_TOKEN }}'
     | |____________________________________________________- default permissions used due to no permissions: block
     |
     = note: audit confidence -> Medium
  ```
- silence `template-injection` false positives like:
  ```
  - note: ${{ matrix.build.torture && 'test-torture' || 'test-ci' }} may expand into attacker-controllable code
  - note: ${{ contains(matrix.build.install_steps, 'pytest') && 'caddy httpd vsftpd' || '' }} may expand into attacker-controllable code
  ```
  It doesn't seem like these could be controlled by an attacker.
  Let me know if I'm missing something.

Closes #17278
.github/workflows/checksrc.yml
.github/workflows/label.yml
.github/workflows/linux.yml
.github/workflows/macos.yml
.github/workflows/windows.yml