-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (40 loc) · 1.75 KB
/
Copy pathcodeql.yml
File metadata and controls
45 lines (40 loc) · 1.75 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
name: CodeQL
on:
push:
branches:
- main
pull_request:
# Advisories and query packs change without the code changing, so a scan that only ran on
# commits would go stale on a quiet week. Offset from the other scheduled workflows
# (scorecard.yml 02:31, audit-report.yml 05:17) rather than sharing a slot.
schedule:
- cron: 43 3 * * 1
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 30
# Uploading to code scanning only works against the repository that owns the alerts; on a
# fork the analyze step would fail at the upload rather than be skipped. Pull requests from
# forks still run, because `repository_owner` is the base repository's owner.
if: ${{ github.repository_owner == 'koobiq' }}
permissions:
contents: read # for actions/checkout to read the repository
security-events: write # for github/codeql-action/analyze to upload results
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# `javascript-typescript` is one language to CodeQL, not two: splitting it into a matrix
# would analyse the same files twice. build-mode `none` is what that language supports —
# nothing is compiled, the extractor reads the sources directly, so this needs neither
# setup-node nor a package install.
- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
with:
languages: javascript-typescript
build-mode: none
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
with:
category: /language:javascript-typescript