fleet/.github/workflows/codeql-analysis.yml
Zach Wasserman 7cb71bc5a8
Run CodeQL on every commit to main (#4794)
Practically, we were scanning enough previously (at least once a day, plus any commit that changed source files), but this will help check the box in CII Best Practices.
2022-04-11 11:53:08 -07:00

48 lines
1.4 KiB
YAML

# Base configuration generated by GitHub
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths:
- '**.go'
- '**.js'
- '**.jsx'
- '**.ts'
- '**.tsx'
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@81bfc289f5947eca8a3358341c874cb4f4697b64 # v2.8.4
with:
languages: ${{ matrix.language }}
config-file: .github/workflows/config/codeql.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@81bfc289f5947eca8a3358341c874cb4f4697b64 # v2.8.4