-
Notifications
You must be signed in to change notification settings - Fork 5
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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
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@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
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@046d6b48d2e43cf563f96f67332c47c432eff83e # v2.0.2
with:
sarif-id: ${{ steps.analyze.outputs['sarif-id'] }}
sarif-file: sarif-results/javascript.sarif
env:
GITHUB_TOKEN: ${{ github.token }}