-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.96 KB
/
Copy pathcodeql.yml
File metadata and controls
55 lines (49 loc) · 1.96 KB
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
name: CodeQL
# Static analysis (SAST) for OpenSSF Scorecard / DPG Indicator 8. CodeQL uploads results to
# GitHub code scanning, which is free for public repositories.
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "31 4 * * 1" # weekly, Monday 04:31 UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
# Skip on draft PRs (matches the CI workflow's draft gate). Still runs on
# push to main and the weekly schedule, where there is no pull_request context.
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
permissions:
security-events: write # upload results to code scanning
actions: read
contents: read
strategy:
fail-fast: false
matrix:
language: ["javascript-typescript"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# init and analyze MUST stay on the same version. init serializes its own
# action version into $RUNNER_TEMP/config, and analyze refuses to read a
# config written by a different version ("Loaded a configuration file for
# version X, but running version Y"). Bump both refs in the same commit —
# see the codeql-action group in .github/dependabot.yml.
- name: Initialize CodeQL
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
languages: ${{ matrix.language }}
queries: security-and-quality
# JavaScript/TypeScript is interpreted — no build step required.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
category: "/language:${{ matrix.language }}"