@@ -26,6 +26,10 @@ permissions:
2626
2727jobs :
2828 analyze :
29+ permissions :
30+ actions : read # for github/codeql-action/init to get workflow details
31+ contents : read # for actions/checkout to fetch code
32+ security-events : write # for github/codeql-action/autobuild to send a status report
2933 name : Analyze
3034 runs-on : ubuntu-latest
3135
@@ -38,12 +42,17 @@ jobs:
3842 # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3943
4044 steps :
45+ - name : Harden the runner (Audit all outbound calls)
46+ uses : step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
47+ with :
48+ egress-policy : audit
49+
4150 - name : Checkout repository
42- uses : actions/checkout@v5
51+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4352
4453 # Initializes the CodeQL tools for scanning.
4554 - name : Initialize CodeQL
46- uses : github/codeql-action/init@v3
55+ uses : github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
4756 with :
4857 languages : ${{ matrix.language }}
4958 # If you wish to specify custom queries, you can do so here or in a config file.
5463 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5564 # If this step fails, then you should remove it and run the build manually (see below)
5665 - name : Autobuild
57- uses : github/codeql-action/autobuild@v3
66+ uses : github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
5867
5968 # ℹ️ Command-line programs to run using the OS shell.
6069 # 📚 https://git.io/JvXDl
6877 # make release
6978
7079 - name : Perform CodeQL Analysis
71- uses : github/codeql-action/analyze@v3
80+ uses : github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
0 commit comments