Skip to content

Commit 322a3c7

Browse files
committed
ci: add code scanning workflow
1 parent 899c9b7 commit 322a3c7

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/audit.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Audit Codes 🔍
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- next
8+
pull_request:
9+
branches:
10+
- '**'
11+
paths-ignore:
12+
- '**/*.md'
13+
- '**/*.txt'
14+
- '**/*.spec.ts'
15+
16+
jobs:
17+
codeql-scan:
18+
name: Scan Vulnerabilities with CodeQL (${{ matrix.language }}) 🛡️
19+
runs-on: ubuntu-latest
20+
permissions:
21+
# required for all workflows
22+
security-events: write
23+
# required to fetch internal or private CodeQL packs
24+
packages: read
25+
# only required for workflows in private repositories
26+
actions: read
27+
contents: read
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [actions, javascript-typescript]
32+
33+
steps:
34+
- name: Checkout 🛎️
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
36+
with:
37+
fetch-depth: 20
38+
fetch-tags: false
39+
40+
- name: Initialize CodeQL ⚙️
41+
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3
42+
with:
43+
languages: ${{ matrix.language }}
44+
45+
- name: Perform CodeQL Analysis 🔍
46+
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3
47+
with:
48+
category: '/language:${{ matrix.language }}'
49+
50+
osv-scan:
51+
name: Scan Vulnerabilities with OSV 🛡️
52+
uses: 'google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@b00f71e051ddddc6e46a193c31c8c0bf283bf9e6' # v2.1.0
53+
permissions:
54+
# Required to upload SARIF file to CodeQL. See: https://github.com/github/codeql-action/issues/2117
55+
actions: read
56+
# Require writing security events to upload SARIF file to security tab
57+
security-events: write
58+
# Only need to read contents
59+
contents: read
60+
with:
61+
# Start the scan from the root of the repository and scan subdirectories recursively.
62+
scan-args: |-
63+
--lockfile=package-lock.json
64+
--lockfile=website/package-lock.json
65+
-r
66+
./

0 commit comments

Comments
 (0)