-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (39 loc) · 1.43 KB
/
codeql.yml
File metadata and controls
46 lines (39 loc) · 1.43 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
# CodeQL static analysis for SAST (Static Application Security Testing).
name: "CodeQL"
on:
# Scan every commit pushed to main.
push:
branches: [ "main" ]
# Scan pull requests before merging to catch vulnerabilities early.
pull_request:
# The branches below must be a subset of the branches above.
branches: [ "main" ]
# Weekly scan every Monday at 03:25 UTC.
schedule:
- cron: '25 3 * * 1'
# Declare default permissions as read only (principle of least privilege).
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
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/analyze to upload results
strategy:
fail-fast: false
matrix:
language: [ 'python', 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
- name: Initialize CodeQL
uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # pin@v4.33.0
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # pin@v4.33.0
with:
category: "/language:${{ matrix.language }}"