Mutable tags on third-party actions could be repointed at code that runs with the repo token; pin checkout, upload-artifact and gitea-release-action to their current commits.
This commit is contained in:
@@ -10,7 +10,9 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
# third-party actions pinned to commit SHAs: mutable tags could be
|
||||||
|
# repointed at malicious code that runs with repo/token access
|
||||||
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||||
|
|
||||||
- name: Check tag matches metadata.json version
|
- name: Check tag matches metadata.json version
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
@@ -26,7 +28,7 @@ jobs:
|
|||||||
run: python3 tools/build_package.py
|
run: python3 tools/build_package.py
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
|
||||||
with:
|
with:
|
||||||
name: pcm-package
|
name: pcm-package
|
||||||
path: |
|
path: |
|
||||||
@@ -35,7 +37,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create release with the zip attached
|
- name: Create release with the zip attached
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@b8d9144f302c68610911db1aaf722708d5c02d94 # v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
dist/*.zip
|
dist/*.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user