Skip to content

Commit aea6dcd

Browse files
Improve GitHub Actions security posture
- Add persist-credentials: false to all checkout actions to prevent credential persistence in workflow runs - Add zizmor: ignore[unpinned-uses] comments to intentionally unpinned actions to document security decisions - Add zizmor security checks to check.sh to verify GitHub Actions configuration follows security best practices These changes harden the CI/CD pipeline by reducing credential exposure risk and automating security verification of GitHub Actions workflow files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9206503 commit aea6dcd

14 files changed

Lines changed: 30 additions & 7 deletions

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ jobs:
287287
- uses: actions/checkout@v5
288288
with:
289289
submodules: true
290+
persist-credentials: false
290291

291292
- name: Setup common dependencies for Linux
292293
run: |
@@ -467,7 +468,7 @@ jobs:
467468
if: env.COVERAGE == 'ON'
468469

469470
- name: Upload coverage data
470-
uses: codecov/codecov-action@v5
471+
uses: codecov/codecov-action@v5 # zizmor: ignore[unpinned-uses]
471472
with:
472473
token: ${{ secrets.CODECOV_TOKEN }}
473474
flags: ${{matrix.BUILD_TYPE}}

.github/workflows/claude-code-review.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ jobs:
2929
uses: actions/checkout@v5
3030
with:
3131
fetch-depth: 1
32+
persist-credentials: false
3233

3334
- name: Run Claude Code Review
3435
id: claude-review
35-
uses: anthropics/claude-code-action@beta
36+
uses: anthropics/claude-code-action@beta # zizmor: ignore[unpinned-uses]
3637
with:
3738
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3839

.github/workflows/claude.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ jobs:
2626
uses: actions/checkout@v5
2727
with:
2828
fetch-depth: 1
29+
persist-credentials: false
2930

3031
- name: Run Claude Code
3132
id: claude
32-
uses: anthropics/claude-code-action@beta
33+
uses: anthropics/claude-code-action@beta # zizmor: ignore[unpinned-uses]
3334
with:
3435
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3536

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
uses: actions/checkout@v5
2828
with:
2929
submodules: true
30+
persist-credentials: false
3031

3132
- name: Setup dependencies for Linux
3233
run: |

.github/workflows/docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v5
16+
with:
17+
persist-credentials: false
1618
- name: Install Doxygen
1719
run: sudo apt-get install doxygen
1820
- name: Generate docs
1921
run: doxygen Doxyfile
2022
- name: Deploy docs
21-
uses: peaceiris/actions-gh-pages@v4
23+
uses: peaceiris/actions-gh-pages@v4 # zizmor: ignore[unpinned-uses]
2224
with:
2325
github_token: ${{ secrets.GITHUB_TOKEN }}
2426
publish_dir: ./docs/html/

.github/workflows/examples.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- uses: actions/checkout@v5
3131
with:
3232
submodules: false
33+
persist-credentials: false
3334

3435
- name: Setup dependencies
3536
run: |

.github/workflows/experimental-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- uses: actions/checkout@v5
3131
with:
3232
submodules: true
33+
persist-credentials: false
3334

3435
- name: Set up dependencies for macOS
3536
run: |

.github/workflows/feature-matrix-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- uses: actions/checkout@v5
3333
with:
3434
submodules: ${{ matrix.TESTS == 'ON' || matrix.BENCHMARKS == 'ON' }}
35+
persist-credentials: false
3536

3637
- name: Setup Boost
3738
run: sudo apt-get install -y libboost-dev

.github/workflows/msvc-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ jobs:
5858
- uses: actions/checkout@v5
5959
with:
6060
submodules: false
61+
persist-credentials: false
6162

6263
- name: Setup command line tools
63-
uses: ilammy/msvc-dev-cmd@v1
64+
uses: ilammy/msvc-dev-cmd@v1 # zizmor: ignore[unpinned-uses]
6465

6566
- name: Install dependencies
6667
run: |

.github/workflows/old-compilers.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ jobs:
631631
- uses: actions/checkout@v5
632632
with:
633633
submodules: true
634+
persist-credentials: false
634635

635636
- name: Setup common dependencies
636637
run: |

0 commit comments

Comments
 (0)