|
@@ -9,8 +9,15 @@ on:
|
|
|
schedule:
|
|
|
- cron: '0 15 * * 5'
|
|
|
|
|
|
+permissions:
|
|
|
+ contents: read
|
|
|
+
|
|
|
jobs:
|
|
|
analyze:
|
|
|
+ permissions:
|
|
|
+ actions: read # for github/codeql-action/init to get workflow details
|
|
|
+ contents: read # for actions/checkout to fetch code
|
|
|
+ security-events: write # for github/codeql-action/autobuild to send a status report
|
|
|
name: Analyze
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
@@ -24,8 +31,13 @@ jobs:
|
|
|
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
|
|
|
|
|
steps:
|
|
|
+ - name: Harden Runner
|
|
|
+ uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
|
|
|
+ with:
|
|
|
+ egress-policy: audit
|
|
|
+
|
|
|
- name: Checkout repository
|
|
|
- uses: actions/checkout@v4
|
|
|
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
with:
|
|
|
# We must fetch at least the immediate parents so that if this is
|
|
|
# a pull request then we can checkout the head.
|
|
@@ -38,7 +50,7 @@ jobs:
|
|
|
|
|
|
# Initializes the CodeQL tools for scanning.
|
|
|
- name: Initialize CodeQL
|
|
|
- uses: github/codeql-action/init@v3
|
|
|
+ uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
|
|
|
with:
|
|
|
languages: ${{ matrix.language }}
|
|
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
@@ -49,7 +61,7 @@ jobs:
|
|
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
|
# If this step fails, then you should remove it and run the build manually (see below)
|
|
|
- name: Autobuild
|
|
|
- uses: github/codeql-action/autobuild@v3
|
|
|
+ uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
|
|
|
|
|
|
# ℹ️ Command-line programs to run using the OS shell.
|
|
|
# 📚 https://git.io/JvXDl
|
|
@@ -63,4 +75,4 @@ jobs:
|
|
|
# make release
|
|
|
|
|
|
- name: Perform CodeQL Analysis
|
|
|
- uses: github/codeql-action/analyze@v3
|
|
|
+ uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
|