Skip to content

zizmor reveals "github.ref_name may expand into attacker-controllable code", should something else be used? #1748

@MarcoGorelli

Description

@MarcoGorelli

Issue Description

If I run zizmor against the workflow in https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow, then it finds

89 |         # sigstore-produced signatures and certificates.
90 |         run: >-
   |  _______^
91 | |         gh release upload
92 | |         '${{ github.ref_name }}' dist/**
93 | |         --repo '${{ github.repository }}'
   | |__________________________________________^ github.ref_name may expand into attacker-controllable code

Should something else be recommended instead?

Code of Conduct

  • I am aware that participants in this repository must follow the PSF Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions