-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (64 loc) · 2.08 KB
/
codeql.yml
File metadata and controls
73 lines (64 loc) · 2.08 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# ******** NOTE ********
# This workflow includes alert suppression support via lgtm/codeql comments.
# See: https://docs.github.com/en/code-security/code-scanning
#
name: CodeQL Analysis
on:
push:
branches:
- main
- 'support/**'
pull_request:
branches:
- main
- 'support/**'
schedule:
- cron: '17 4 * * 5' # Weekly on Friday at 4:17 AM UTC
permissions:
contents: read
security-events: write
actions: read
packages: read # Required to fetch internal or private CodeQL packs
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: .github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
id: analyze
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v4.32.2
with:
category: /language:${{ matrix.language }}
output: sarif-results
- name: Dismiss suppressed alerts
if: github.ref == 'refs/heads/main' && matrix.language == 'javascript-typescript'
uses: advanced-security/dismiss-alerts@3478381bd53e9f9a9ea1c23bd25ef0ec236e0d06 # v2
with:
sarif-id: ${{ steps.analyze.outputs['sarif-id'] }}
sarif-file: sarif-results/javascript.sarif
env:
GITHUB_TOKEN: ${{ github.token }}