Skip to content

Commit e819207

Browse files
[StepSecurity] Apply security best practices (#202)
1 parent df49cb2 commit e819207

File tree

8 files changed

+30
-24
lines changed

8 files changed

+30
-24
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535

3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3939

4040
- name: Clone test repository
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4242
with:
4343
repository: walbourn/directxmathtest
4444
path: Tests
@@ -47,10 +47,10 @@ jobs:
4747
- name: 'Install Ninja'
4848
run: choco install ninja
4949

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

5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@v3
53+
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
5454
with:
5555
languages: c-cpp
5656
build-mode: manual
@@ -64,6 +64,6 @@ jobs:
6464
run: cmake --build out\build\x64-Debug
6565

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

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ jobs:
7070
arch: amd64_arm64
7171

7272
steps:
73-
- uses: actions/checkout@v4
73+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7474

7575
- name: Clone test repository
76-
uses: actions/checkout@v4
76+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7777
with:
7878
repository: walbourn/directxmathtest
7979
path: Tests
@@ -82,7 +82,7 @@ jobs:
8282
- name: 'Install Ninja'
8383
run: choco install ninja
8484

85-
- uses: ilammy/msvc-dev-cmd@v1
85+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
8686
with:
8787
arch: ${{ matrix.arch }}
8888

.github/workflows/msbuild.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ jobs:
3535
platform: ARM64
3636

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

4040
- name: Clone test repository
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4242
with:
4343
repository: walbourn/directxmathtest
4444
path: Tests
4545
ref: main
4646

4747
- name: Add MSBuild to PATH
48-
uses: microsoft/setup-msbuild@v2
48+
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
4949

5050
- name: Build math3
5151
working-directory: ${{ github.workspace }}/Tests/math3

.github/workflows/msbuildex.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ jobs:
9090
build_type: 'x87 Release'
9191

9292
steps:
93-
- uses: actions/checkout@v4
93+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9494

9595
- name: Clone test repository
96-
uses: actions/checkout@v4
96+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9797
with:
9898
repository: walbourn/directxmathtest
9999
path: Tests
100100
ref: main
101101

102102
- name: Add MSBuild to PATH
103-
uses: microsoft/setup-msbuild@v2
103+
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
104104

105105
- name: Build math3
106106
working-directory: ${{ github.workspace }}/Tests/math3

.github/workflows/msvc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434

3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3838

3939
- name: Clone test repository
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4141
with:
4242
repository: walbourn/directxmathtest
4343
path: Tests
@@ -48,7 +48,7 @@ jobs:
4848
run: cmake -B out
4949

5050
- name: Initialize MSVC Code Analysis
51-
uses: microsoft/[email protected]
51+
uses: microsoft/msvc-code-analysis-action@24c285ab36952c9e9182f4b78dfafbac38a7e5ee # v0.1.1
5252
id: run-analysis
5353
with:
5454
cmakeBuildDirectory: ./Tests/headertest/out
@@ -57,6 +57,6 @@ jobs:
5757

5858
# Upload SARIF file to GitHub Code Scanning Alerts
5959
- name: Upload SARIF to GitHub
60-
uses: github/codeql-action/upload-sarif@v3
60+
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
6161
with:
6262
sarif_file: ${{ steps.run-analysis.outputs.sarif }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ jobs:
7171
arch: amd64_arm64
7272

7373
steps:
74-
- uses: actions/checkout@v4
74+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7575

7676
- name: Clone test repository
77-
uses: actions/checkout@v4
77+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7878
with:
7979
repository: walbourn/directxmathtest
8080
path: Tests
@@ -83,7 +83,7 @@ jobs:
8383
- name: 'Install Ninja'
8484
run: choco install ninja
8585

86-
- uses: ilammy/msvc-dev-cmd@v1
86+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
8787
with:
8888
arch: ${{ matrix.arch }}
8989

.github/workflows/wsl.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030
# x64-Debug-NI-Linux, x64-Release-NI-Linux trigger issue with GCC
3131

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

3535
- name: Clone test repository
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3737
with:
3838
repository: walbourn/directxmathtest
3939
path: Tests
4040
ref: main
4141

42-
- uses: seanmiddleditch/gha-setup-ninja@v5
42+
- uses: seanmiddleditch/gha-setup-ninja@96bed6edff20d1dd61ecff9b75cc519d516e6401 # v5
4343

4444
- name: 'Configure CMake'
4545
working-directory: ${{ github.workspace }}/Tests

0 commit comments

Comments
 (0)