@@ -2,27 +2,21 @@ name: "CodeQL Advanced"
22
33on :
44 push :
5- branches : ["main"]
5+ branches : [ "main" ]
66 pull_request :
7- branches : ["main"]
7+ branches : [ "main" ]
88 schedule :
9- - cron : " 35 19 * * 5"
10- workflow_dispatch :
11-
12- concurrency :
13- group : codeql-${{ github.workflow }}-${{ github.ref }}
14- cancel-in-progress : true
9+ - cron : ' 35 19 * * 5'
1510
1611jobs :
1712 analyze :
1813 name : Analyze (${{ matrix.language }})
1914 runs-on : ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
20-
2115 permissions :
2216 security-events : write
17+ packages : read
2318 actions : read
2419 contents : read
25- packages : read
2620
2721 strategy :
2822 fail-fast : false
@@ -34,50 +28,50 @@ jobs:
3428 build-mode : none
3529
3630 steps :
37- - name : Checkout repository
38- uses : actions/checkout@v6
39- with :
40- fetch-depth : 0
31+ - name : Checkout repository
32+ uses : actions/checkout@v4
4133
42- - name : Setup Node.js
43- if : matrix.language == 'javascript-typescript'
44- uses : actions/setup-node@v6
45- with :
46- node- version : 20
47- cache : npm
34+ - name : Install pnpm
35+ if : matrix.language == 'javascript-typescript'
36+ uses : pnpm/action-setup@v4
37+ with :
38+ version : 10.26.1
39+ run_install : false
4840
49- - name : Install dependencies
50- if : matrix.language == 'javascript-typescript'
51- shell : bash
52- run : |
53- if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
54- npm ci
55- elif [ -f pnpm-lock.yaml ]; then
56- echo "pnpm lockfile found; installing dependencies with pnpm"
57- corepack enable
58- pnpm install --frozen-lockfile
59- else
60- echo "No recognized lockfile found; skipping dependency installation"
61- fi
41+ - name : Setup Node.js
42+ if : matrix.language == 'javascript-typescript'
43+ uses : actions/setup-node@v4
44+ with :
45+ node-version : 20
6246
63- - name : Initialize CodeQL
64- uses : github/codeql-action/init@v4
65- with :
66- languages : ${{ matrix.language }}
67- build-mode : ${{ matrix.build-mode }}
47+ - name : Install dependencies
48+ if : matrix.language == 'javascript-typescript'
49+ shell : bash
50+ run : |
51+ if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
52+ npm ci
53+ elif [ -f pnpm-lock.yaml ]; then
54+ echo "pnpm lockfile found; installing dependencies with pnpm"
55+ corepack enable
56+ pnpm install --frozen-lockfile
57+ else
58+ echo "No recognized lockfile found; skipping dependency installation"
59+ fi
6860
69- - name : Autobuild
70- if : matrix.build-mode == 'autobuild'
71- uses : github/codeql-action/autobuild@v4
61+ - name : Initialize CodeQL
62+ uses : github/codeql-action/init@v4
63+ with :
64+ languages : ${{ matrix.language }}
65+ build-mode : ${{ matrix.build-mode }}
7266
73- - name : Run manual build steps
74- if : matrix.build-mode == 'manual'
75- shell : bash
76- run : |
77- echo "Add your manual build commands here"
78- exit 1
67+ - name : Run manual build steps
68+ if : matrix.build-mode == 'manual'
69+ shell : bash
70+ run : |
71+ echo 'Replace this with your manual build commands'
72+ exit 1
7973
80- - name : Perform CodeQL Analysis
81- uses : github/codeql-action/analyze@v4
82- with :
83- category : " /language:${{ matrix.language }}"
74+ - name : Perform CodeQL Analysis
75+ uses : github/codeql-action/analyze@v4
76+ with :
77+ category : " /language:${{matrix.language}}"
0 commit comments