Skip to content

Commit 54093ee

Browse files
authored
Create codeql.yml
1 parent 3bf7f02 commit 54093ee

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '33 3 * * 6'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
# Runner size impacts CodeQL analysis time. To learn more, please see:
15+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
16+
# - https://gh.io/supported-runners-and-hardware-resources
17+
# - https://gh.io/using-larger-runners (GitHub.com only)
18+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
19+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
20+
permissions:
21+
# required for all workflows
22+
security-events: write
23+
24+
# required to fetch internal or private CodeQL packs
25+
packages: read
26+
27+
# only required for workflows in private repositories
28+
actions: read
29+
contents: read
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
include:
35+
- language: actions
36+
build-mode: none
37+
- language: javascript-typescript
38+
build-mode: none
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
43+
44+
- name: Set Node.js 20.x
45+
uses: actions/[email protected]
46+
with:
47+
node-version: 20.x
48+
49+
# Initializes the CodeQL tools for scanning.
50+
- name: Initialize CodeQL
51+
uses: github/codeql-action/init@v3
52+
with:
53+
languages: ${{ matrix.language }}
54+
build-mode: ${{ matrix.build-mode }}
55+
config-file: ./.github/codeql/codeql-config.yml
56+
57+
- name: Perform CodeQL Analysis
58+
uses: github/codeql-action/analyze@v3
59+
with:
60+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)