-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (67 loc) · 2.29 KB
/
codeql.yml
File metadata and controls
75 lines (67 loc) · 2.29 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Advanced-setup CodeQL workflow.
#
# Default-setup only runs CodeQL on push-to-default-branch + weekly
# schedule. The Enterprise "PRs" ruleset requires a Code Scanning
# result before accepting a push to any non-default branch — a
# chicken-and-egg the default setup can't satisfy.
#
# This workflow runs on push to every branch (excluding noisy
# dependabot fans), on every PR targeting main, and weekly so the
# main-branch result stays fresh.
#
# Maintained centrally at github.com/jbdevprimary/gh-fleet-sync.
# Sync via `scripts/fanout.sh` in that repo. Do not edit in place.
name: CodeQL
on:
push:
branches-ignore:
- 'dependabot/**'
- 'gh-readonly-queue/**'
pull_request:
branches: [main]
schedule:
# 04:17 UTC every Monday — well outside any deploy / release-please
# cron windows so it doesn't fight for the runner queue.
- cron: '17 4 * * 1'
# Manual dispatch lets us run scans against branches that already
# exist behind the Enterprise PRs ruleset (where the rule rejects
# the push that would otherwise trigger the scan — chicken-and-egg).
workflow_dispatch:
# Only the most recent run per ref needs to be live; stale-cancel
# everything else so the queue stays unclogged when a feature branch
# gets a flurry of pushes.
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: actions
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# 'security-and-quality' matches the default-setup query
# suite so disabling default-setup doesn't lose coverage.
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{ matrix.language }}'