Skip to content

Commit 68af6f0

Browse files
committed
feat: add codeql analysis
Runs on all PRs and also weekly
1 parent aa3f37e commit 68af6f0

File tree

5 files changed

+79
-2
lines changed

5 files changed

+79
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- main
1010
- latest
1111
schedule:
12-
# "At 02:00 on Monday" https://crontab.guru/#0_1_*_*_1
12+
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
1313
- cron: "0 2 * * 1"
1414

1515
jobs:
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: "CodeQL"
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: [ main ]
11+
schedule:
12+
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1
13+
- cron: "0 3 * * 1"
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [ 'javascript' ]
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v2
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v1
35+
with:
36+
languages: ${{ matrix.language }}
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@v1

lib/content/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- main
1010
- latest
1111
schedule:
12-
# "At 02:00 on Monday" https://crontab.guru/#0_1_*_*_1
12+
# "At 02:00 on Monday" https://crontab.guru/#0_2_*_*_1
1313
- cron: "0 2 * * 1"
1414

1515
jobs:

lib/content/codeql-analysis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
name: "CodeQL"
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: [ main ]
11+
schedule:
12+
# "At 03:00 on Monday" https://crontab.guru/#0_3_*_*_1
13+
- cron: "0 3 * * 1"
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [ 'javascript' ]
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v2
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v1
35+
with:
36+
languages: ${{ matrix.language }}
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@v1

lib/postinstall/copy-content.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const repoFiles = {
2121
'.github/CODEOWNERS': './CODEOWNERS',
2222
'.github/dependabot.yml': './dependabot.yml',
2323
'.github/workflows/audit.yml': './audit.yml',
24+
'.github/workflows/codeql-analysis.yml': './codeql-analysis.yml',
2425
'.github/workflows/pull-request.yml': './pull-request.yml',
2526
'.github/workflows/release-please.yml': './release-please.yml',
2627
}

0 commit comments

Comments
 (0)