-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 2.19 KB
/
Copy pathcodeql.yml
File metadata and controls
70 lines (62 loc) · 2.19 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
name: CodeQL
# Analyze your code with CodeQL for security vulnerabilities and code quality issues.
#
# IMPORTANT: Code scanning must be enabled in repository settings for results to upload.
#
# To enable code scanning:
# 1. Go to your repository on GitHub (https://github.com/bryce-seefieldt/portfolio-docs)
# 2. Click the "Settings" tab
# 3. In the left sidebar, click "Code security and analysis"
# 4. Find "Code scanning" section
# 5. Click "Set up code scanning"
# 6. Select "CodeQL analysis" as the scanning tool
# 7. Review the default CodeQL workflow (or keep it as-is)
# 8. Click "Enable CodeQL"
#
# Once enabled, CodeQL results will appear in the "Security" tab under "Code scanning alerts"
# and this workflow will automatically upload analysis results.
on:
push:
branches: ['main']
pull_request:
branches: ['main']
schedule:
# Weekly scan (Monday 14:20 UTC). Adjust if you prefer.
- cron: '20 14 * * 1'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
# Only required for private repos / private CodeQL packs, harmless for public repos:
packages: read
strategy:
fail-fast: false
matrix:
include:
# Docusaurus / site code
- language: javascript-typescript
build-mode: none
# Your workflows are portfolio evidence too
- language: actions
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# Stronger signal than the default suite:
# - security-extended adds more security coverage
# - security-and-quality adds quality checks (optional but good portfolio evidence)
queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
continue-on-error: true
with:
category: '/language:${{ matrix.language }}'