forked from Tracer-Cloud/opensre
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.28 KB
/
Copy pathcodeql.yml
File metadata and controls
84 lines (73 loc) · 2.28 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
76
77
78
79
80
81
82
83
84
name: CodeQL
on:
push:
branches: [main]
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
inputs:
profile:
description: Analysis profile to benchmark
required: true
default: full
type: choice
options:
- full
- pr-fast
runner_label:
description: Standard or larger-runner label
required: true
default: ubuntu-latest
type: string
permissions:
contents: read
security-events: write
actions: read
concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
jobs:
analyze-full:
if: >-
github.repository == 'Tracer-Cloud/opensre' &&
(github.event_name != 'workflow_dispatch' || inputs.profile == 'full')
name: Analyze full (${{ matrix.language }})
runs-on: ${{ github.event_name == 'workflow_dispatch' && inputs.runner_label || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
language: [python, javascript-typescript]
steps:
- uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none
config-file: .github/codeql/codeql-config.yml
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
# Preserve the canonical category so each full scan supersedes the
# repository's historical results instead of leaving stale alerts open.
category: /language:${{ matrix.language }}
analyze-pr-benchmark:
if: >-
github.repository == 'Tracer-Cloud/opensre' &&
github.event_name == 'workflow_dispatch' &&
inputs.profile == 'pr-fast'
name: Analyze PR benchmark (python)
runs-on: ${{ inputs.runner_label }}
steps:
- uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: python
build-mode: none
config-file: .github/codeql/codeql-pr-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: /language:python/pr-fast