mirror of
https://github.com/curl/curl.git
synced 2026-04-25 05:12:11 +03:00
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
This commit is contained in:
parent
283ad5c432
commit
e522f47986
5 changed files with 23 additions and 2 deletions
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
|
|
@ -298,6 +298,7 @@ jobs:
|
|||
steps:
|
||||
- name: 'install prereqs'
|
||||
if: matrix.build.container == null && !contains(matrix.build.name, 'i686')
|
||||
# zizmor: ignore[template-injection]
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||
sudo apt-get -o Dpkg::Use-Pty=0 update
|
||||
|
|
@ -661,6 +662,7 @@ jobs:
|
|||
- name: 'run tests'
|
||||
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
|
||||
timeout-minutes: ${{ contains(matrix.build.install_packages, 'valgrind') && 30 || 15 }}
|
||||
# zizmor: ignore[template-injection]
|
||||
run: |
|
||||
export TFLAGS='${{ matrix.build.tflags }}'
|
||||
if [ -z '${{ matrix.build.torture }}' ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue