[TASK] Pin the GH action releases - #1653
Conversation
514cb7c to
7fc3d4f
Compare
JakeQZ
left a comment
There was a problem hiding this comment.
Can the uses not be pinned by a specific version tag? This would make it clearer and less error-prone than using the SHA, simpler to maintain, and allow Dependabot to update the tools (unless it can handle maintaining pins by SHA).
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
There was a problem hiding this comment.
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| uses: actions/checkout@v7.0.1 |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
There was a problem hiding this comment.
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| uses: actions/checkout@v7.0.1 |
|
|
||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 |
There was a problem hiding this comment.
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 | |
| uses: shivammathur/setup-php@v2.37.2 |
|
|
||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 |
There was a problem hiding this comment.
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 | |
| uses: shivammathur/setup-php@v2.37.2 |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
There was a problem hiding this comment.
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| uses: actions/checkout@v7.0.1 |
|
|
||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 |
There was a problem hiding this comment.
| uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2 | |
| uses: shivammathur/setup-php@v2.37.2 |
|
|
||
| - name: Cache dependencies installed with composer | ||
| uses: actions/cache@v6 | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
There was a problem hiding this comment.
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| uses: actions/cache@v6.1.0 |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
There was a problem hiding this comment.
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| uses: actions/checkout@v7.0.1 |
|
|
||
| - name: Cache dependencies installed with composer | ||
| uses: actions/cache@v6 | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
There was a problem hiding this comment.
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| uses: actions/cache@v6.1.0 |
|
|
||
| - name: Upload coverage results to Coveralls | ||
| uses: coverallsapp/github-action@v2 | ||
| uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8 |
There was a problem hiding this comment.
| uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8 | |
| uses: coverallsapp/github-action@v2.3.8 |
7fc3d4f to
5648524
Compare
AFAIK, Dependabot can also update hash-pinned action versions. Pinning to specific versions only protects against installing new/higher compromised versions of actions. That's what the cooldown period for Dependabot mostly protects against (as compromised versions usually get taken down within a few days). Pinning to commit hashes protects against this scenario:
Depending on the permissions of the compromised account, the attacker also could disable immutable releases for the attacked repo. |
https://docs.zizmor.sh/audits/#unpinned-uses
Part of #1650