-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (51 loc) · 1.75 KB
/
codeql.yml
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
# Define the name of the workflow
name: "CodeQL-Advanced"
# Define when the workflow should be triggered (on push to a specific branch and pull requests to the master branch)
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Define the jobs that will be executed as part of the workflow
jobs:
analyze:
name: Analyze
runs-on: [ncatslnghrunpdv04.ncats.nih.gov]
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
security-events: write
actions: read
contents: read
# Define the matrix strategy for parallel runs with different languages
strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript' ]
steps:
# Step 1: Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Initialize CodeQL for scanning
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# Step 3: Autobuild the code.
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Step 4: Analyzes the code using CodeQL, with the analysis category based on the matrix language.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
# Step 5: Generate Security Report
- name: Generate Security Report
uses: rsdmike/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Step 6: Uploads artifacts (PDF reports) generated during the workflow to download.
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: reports
path: ./*.pdf