CodeQL #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '31 6 * * 1' | |
concurrency: | |
group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} | |
cancel-in-progress: true | |
# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions | |
permissions: # added using https://github.com/step-security/secure-workflows | |
contents: read | |
jobs: | |
codeql-analyze: | |
name: CodeQL Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
actions: read | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'go', 'python' ] | |
# 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@8ca2b8b2ece13480cda6dacd3511b49857a23c09 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- name: Checkout repository | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a | |
with: | |
languages: ${{ matrix.language }} | |
# If you wish to specify custom queries, you can do so here or in a config file. | |
# By default, queries listed here will override any specified in a config file. | |
# Prefix the list here with "+" to use these queries and those in the config file. | |
# queries: ./path/to/local/query, your-org/your-repo/queries@main | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a |