Repository navigation
51 lines (44 loc) · 1.61 KB
/
Copy pathcodeql-analysis.yml
File metadata and controls
51 lines (44 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "CodeQL Security Scanning"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Run every Monday at 6:00 AM UTC
- cron: '0 6 * * 1'
workflow_dispatch:
jobs:
analyze:
name: Analyze Code
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# 'actions' scans the workflow files themselves. CodeQL was already
# expecting a /language:actions configuration and warned on every pull
# request that it could not find one, so workflow changes were going
# unscanned - including the two workflows edited in #187.
language: [ 'python', 'actions' ]
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: ${{ matrix.language }}
# Run additional queries for comprehensive security analysis
queries: +security-extended,security-and-quality
# Autobuild resolves source dependencies; the 'actions' language analyses
# YAML in place and has nothing to build.
- name: Autobuild
if: matrix.language != 'actions'
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
category: "/language:${{matrix.language}}"