aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/go.yml
diff options
context:
space:
mode:
authornaveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>2022-03-18 20:47:20 +0000
committernaveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>2022-03-18 20:47:20 +0000
commitdd737bd7554846ad85ed98003c516da35ef34caa (patch)
treed28da25da1cbb999a6c66de3ab99a8090e3c679d /.github/workflows/go.yml
parent2824940ecf62073e00a4d7e2a069b693082b31cf (diff)
downloadseaweedfs-dd737bd7554846ad85ed98003c516da35ef34caa.tar.xz
seaweedfs-dd737bd7554846ad85ed98003c516da35ef34caa.zip
Pin actions to a full length commit SHA
- Pinned actions by SHA https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions >Pin actions to a full length commit SHA >Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
Diffstat (limited to '.github/workflows/go.yml')
-rw-r--r--.github/workflows/go.yml7
1 files changed, 5 insertions, 2 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 2ce5f7954..50f103337 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -10,6 +10,9 @@ concurrency:
group: ${{ github.head_ref }}/go
cancel-in-progress: true
+permissions:
+ contents: read
+
jobs:
build:
@@ -18,13 +21,13 @@ jobs:
steps:
- name: Set up Go 1.x
- uses: actions/setup-go@v2
+ uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2
with:
go-version: ^1.13
id: go
- name: Check out code into the Go module directory
- uses: actions/checkout@v2
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
- name: Get dependencies
run: |