From c547a4d835628102ae062a5af06afbc2cfe10b3f Mon Sep 17 00:00:00 2001 From: Naveen <172697+naveensrinivasan@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:12:53 -0500 Subject: [PATCH] Pin actions to a full length commit SHA (#14590) - 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 https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions Also, dependabot supports upgrades based on SHA. --- .github/workflows/go-cross.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-cross.yml b/.github/workflows/go-cross.yml index 8bc6424fb..fc43cfece 100644 --- a/.github/workflows/go-cross.yml +++ b/.github/workflows/go-cross.yml @@ -11,6 +11,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true +permissions: + contents: read + jobs: build: name: Build Tests with Go ${{ matrix.go-version }} on ${{ matrix.os }} @@ -20,8 +23,8 @@ jobs: go-version: [1.17.x] os: [ubuntu-latest] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v3 + - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 + - uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2 with: go-version: ${{ matrix.go-version }} check-latest: true