From 77b504e0c44ea5bcf8f6535545be6f5f67ffdb8a Mon Sep 17 00:00:00 2001 From: Step Security Bot Date: Thu, 20 Oct 2022 08:44:39 -0700 Subject: [PATCH] [StepSecurity] ci: Harden GitHub Actions (#1107) Signed-off-by: StepSecurity Bot --- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/codespell.yml | 4 ++-- .github/workflows/go.yml | 6 +++--- .github/workflows/release.yml | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d5b5c59bf..aacc27e82 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,11 +36,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@cc7986c02bac29104a72998e67239bb5ee2ee110 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -51,7 +51,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@cc7986c02bac29104a72998e67239bb5ee2ee110 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -65,4 +65,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@cc7986c02bac29104a72998e67239bb5ee2ee110 diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 8b6cb20ec..60daa5045 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -21,7 +21,7 @@ jobs: steps: # Check out the code base - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 with: # Full git history is needed to get a proper list of changed files within `super-linter` fetch-depth: 0 @@ -29,7 +29,7 @@ jobs: # Run linter against code base # https://github.com/codespell-project/codespell - name: Codespell - uses: codespell-project/actions-codespell@master + uses: codespell-project/actions-codespell@bcf481f4d5cce7b92b65f05aebe8f552d4f1442c with: check_filenames: true ignore_words_file: .codespellignore diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1eb75d0ea..2623d7392 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,10 +15,10 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: go-version: 1.15 @@ -41,7 +41,7 @@ jobs: if: matrix.os == 'windows-latest' run: mkdir -p bin/${{matrix.os}} && cp mlr.exe bin/${{matrix.os}} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 with: name: mlr-${{matrix.os}} path: bin/${{matrix.os}}/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d043fff8..fa4b013e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,19 +17,19 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: go-version: ${{ env.GO_VERSION }} id: go - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 with: fetch-depth: 0 # https://github.com/marketplace/actions/cache - name: Cache Go modules - uses: actions/cache@v3 + uses: actions/cache@1c73980b09e7aea7201f325a7aa3ad00beddcdda with: path: | ~/.cache/go-build @@ -40,7 +40,7 @@ jobs: # https://goreleaser.com/ci/actions/ - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 #if: startsWith(github.ref, 'refs/tags/v') with: version: latest