-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.5 KB
/
Copy pathcodeql.yml
File metadata and controls
55 lines (45 loc) · 1.5 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
# Security policy for GitHub Security Advisories
name: CodeQL Security Scanning
on:
push:
branches-ignore:
- "hotfix/**"
pull_request:
workflow_dispatch:
jobs:
analyze:
name: Analyze Code
if: ${{ !startsWith(github.head_ref || github.ref_name, 'hotfix/') }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["javascript", "actions"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
config-file: ./.github/codeql/codeql-config.yml
- name: Autobuild
if: matrix.language == 'javascript'
uses: github/codeql-action/autobuild@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
with:
category: "/language:${{ matrix.language }}"
hotfix-bypass:
name: CodeQL Hotfix Bypass
runs-on: ubuntu-latest
if: ${{ startsWith(github.head_ref || github.ref_name, 'hotfix/') }}
permissions: {}
steps:
- name: Skip CodeQL for hotfix branch
run: echo "hotfix/* branch detected; skipping CodeQL but allowing deployments."