Skip to content

Commit 8d7887a

Browse files
[StepSecurity] ci: Harden GitHub Actions (#187)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
1 parent 780cc73 commit 8d7887a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
4949
with:
5050
persist-credentials: false
51-
- uses: actions/cache@v3.3.1
51+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
5252
with:
5353
path: ~/.m2/repository
5454
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -57,7 +57,7 @@ jobs:
5757
5858
# Initializes the CodeQL tools for scanning.
5959
- name: Initialize CodeQL
60-
uses: github/codeql-action/init@v2
60+
uses: github/codeql-action/init@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
6161
with:
6262
languages: ${{ matrix.language }}
6363
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
6868
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6969
# If this step fails, then you should remove it and run the build manually (see below)
7070
- name: Autobuild
71-
uses: github/codeql-action/autobuild@v2
71+
uses: github/codeql-action/autobuild@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
7272

7373
# ℹ️ Command-line programs to run using the OS shell.
7474
# 📚 https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
8282
# make release
8383

8484
- name: Perform CodeQL Analysis
85-
uses: github/codeql-action/analyze@v2
85+
uses: github/codeql-action/analyze@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1

.github/workflows/coverage.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ jobs:
3232
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
3333
with:
3434
persist-credentials: false
35-
- uses: actions/cache@v3.3.1
35+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
3636
with:
3737
path: ~/.m2/repository
3838
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
3939
restore-keys: |
4040
${{ runner.os }}-maven-
4141
- name: Set up JDK ${{ matrix.java }}
42-
uses: actions/setup-java@v3.11.0
42+
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
4343
with:
4444
distribution: 'temurin'
4545
java-version: ${{ matrix.java }}
4646
- name: Build with Maven
4747
run: mvn -V test jacoco:report --file pom.xml --no-transfer-progress
4848

4949
- name: Upload coverage to Codecov
50-
uses: codecov/codecov-action@v3
50+
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
5151
with:
5252
files: ./target/site/jacoco/jacoco.xml

.github/workflows/maven.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
3838
with:
3939
persist-credentials: false
40-
- uses: actions/cache@v3.3.1
40+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
4141
with:
4242
path: ~/.m2/repository
4343
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
4444
restore-keys: |
4545
${{ runner.os }}-maven-
4646
- name: Set up JDK ${{ matrix.java }}
47-
uses: actions/setup-java@v3.11.0
47+
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
4848
with:
4949
distribution: 'temurin'
5050
java-version: ${{ matrix.java }}

0 commit comments

Comments
 (0)