Skip to content

Commit 061355c

Browse files
[StepSecurity] Apply security best practices (#508)
Signed-off-by: StepSecurity Bot <[email protected]>
1 parent 3dc7ec1 commit 061355c

File tree

8 files changed

+28
-22
lines changed

8 files changed

+28
-22
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily

.github/workflows/codeql.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4343

4444
- name: 'Install Ninja'
4545
run: choco install ninja
4646

47-
- uses: ilammy/msvc-dev-cmd@v1
47+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
4848

4949
- name: Initialize CodeQL
50-
uses: github/codeql-action/init@v3
50+
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
5151
with:
5252
languages: c-cpp
5353
build-mode: manual
@@ -61,6 +61,6 @@ jobs:
6161
run: cmake --build out\build\x64-Debug
6262

6363
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@v3
64+
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
6565
with:
6666
category: "/language:c-cpp"

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ jobs:
7474
arch: amd64_arm64
7575

7676
steps:
77-
- uses: actions/checkout@v4
77+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7878

7979
- name: 'Install Ninja'
8080
run: choco install ninja
8181

82-
- uses: ilammy/msvc-dev-cmd@v1
82+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
8383
with:
8484
arch: ${{ matrix.arch }}
8585

.github/workflows/msbuild.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
platform: [x86, x64, ARM64]
3333

3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3636

3737
- name: Add MSBuild to PATH
38-
uses: microsoft/setup-msbuild@v2
38+
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
3939

4040
- if: matrix.platform != 'ARM64'
4141
name: Build

.github/workflows/msvc.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737

3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4141

42-
- uses: ilammy/msvc-dev-cmd@v1
42+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
4343
with:
4444
arch: amd64
4545

@@ -62,7 +62,7 @@ jobs:
6262
CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled
6363

6464
- name: Initialize MSVC Code Analysis
65-
uses: microsoft/[email protected]
65+
uses: microsoft/msvc-code-analysis-action@24c285ab36952c9e9182f4b78dfafbac38a7e5ee # v0.1.1
6666
id: run-analysis
6767
with:
6868
cmakeBuildDirectory: ./out
@@ -71,6 +71,6 @@ jobs:
7171

7272
# Upload SARIF file to GitHub Code Scanning Alerts
7373
- name: Upload SARIF to GitHub
74-
uses: github/codeql-action/upload-sarif@v3
74+
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
7575
with:
7676
sarif_file: ${{ steps.run-analysis.outputs.sarif }}

.github/workflows/test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ jobs:
7878
arch: amd64_arm64
7979

8080
steps:
81-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
8282

8383
- name: Clone test repository
84-
uses: actions/checkout@v4
84+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
8585
with:
8686
repository: walbourn/directxtextest
8787
path: Tests
@@ -90,7 +90,7 @@ jobs:
9090
- name: 'Install Ninja'
9191
run: choco install ninja
9292

93-
- uses: ilammy/msvc-dev-cmd@v1
93+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
9494
with:
9595
arch: ${{ matrix.arch }}
9696

@@ -121,7 +121,7 @@ jobs:
121121
echo "::error Unknown architecture/build-type triplet mapping"
122122
}
123123
124-
- uses: lukka/run-vcpkg@v11
124+
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
125125
with:
126126
runVcpkgInstall: true
127127
vcpkgJsonGlob: '**/build/vcpkg.json'

.github/workflows/vcpkg.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ jobs:
4141
arch: amd64_arm64
4242

4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4545

4646
- name: 'Install Ninja'
4747
run: choco install ninja
4848

49-
- uses: ilammy/msvc-dev-cmd@v1
49+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
5050
with:
5151
arch: ${{ matrix.arch }}
5252

@@ -77,7 +77,7 @@ jobs:
7777
echo "::error Unknown architecture/build-type triplet mapping"
7878
}
7979
80-
- uses: lukka/run-vcpkg@v11
80+
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
8181
with:
8282
runVcpkgInstall: true
8383
vcpkgJsonGlob: '**/build/vcpkg.json'

.github/workflows/wsl.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333
gcc: [10, 11, 12]
3434

3535
steps:
36-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3737

38-
- uses: seanmiddleditch/gha-setup-ninja@v5
38+
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # v5
3939

40-
- uses: lukka/run-vcpkg@v11
40+
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
4141
with:
4242
runVcpkgInstall: true
4343
vcpkgJsonGlob: '**/build/vcpkg.json'

0 commit comments

Comments
 (0)