slsa-framework / slsa-verifier

Verify provenance from SLSA compliant builders
Apache License 2.0
231 stars 50 forks source link

fix: use pr_number as env variable #771

Closed ramonpetgrave64 closed 6 months ago

ramonpetgrave64 commented 6 months ago

changing the update-dist workflow to use the pr_number input as an env variable to avoid script injection.

Our workflows are only invokable by our trusted maintainers so we should be okay. This is just an extra hardening measure.

Open issue https://github.com/actions/runner/issues/1070#issuecomment-2113287699

Testing

I confirmed the issue by invoking the workflow with 650 && echo SCRIPT INJECTION, and it did also do the extra echo command.

after invoking the workflow again with this PR's version, the problem is mitigated.

ramonpetgrave64 commented 6 months ago

@ianlewis @laurentsimon @kpk47