-
Notifications
You must be signed in to change notification settings - Fork 6
80 lines (71 loc) · 2.62 KB
/
Copy pathcodeql.yml
File metadata and controls
80 lines (71 loc) · 2.62 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
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# ******** NOTE ********
# This workflow includes alert suppression support via lgtm/codeql comments.
# See: https://docs.github.com/en/code-security/code-scanning
#
name: CodeQL Analysis
on:
push:
branches:
- main
- 'support/**'
pull_request:
branches:
- main
- 'support/**'
schedule:
- cron: '17 4 * * 5' # Weekly on Friday at 4:17 AM UTC
permissions:
contents: read
security-events: write
actions: read
packages: read # Required to fetch internal or private CodeQL packs
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: .github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
id: analyze
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
with:
category: /language:${{ matrix.language }}
output: sarif-results
# GOVERNANCE: This step auto-dismisses any CodeQL alert that has a
# corresponding inline suppression comment (// codeql[query-id]) in source.
# That means a merged PR adding such a comment will silently dismiss the alert
# without a separate security review. Before merging any PR that adds a
# // codeql[...] suppression, a member of @UiPath/Apollo must confirm the
# suppression is justified. CODEOWNERS enforces this for .github/ changes;
# for source-file suppressions, reviewers must manually check.
- name: Dismiss suppressed alerts
if: github.ref == 'refs/heads/main' && matrix.language == 'javascript-typescript'
uses: advanced-security/dismiss-alerts@a18f986bdb40edba0dd7a74382c15d4a3d50a1c8 # v2.0.3
with:
sarif-id: ${{ steps.analyze.outputs['sarif-id'] }}
sarif-file: sarif-results/javascript.sarif
env:
GITHUB_TOKEN: ${{ github.token }}