-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (42 loc) · 1.64 KB
/
Copy pathcodeQL.yml
File metadata and controls
51 lines (42 loc) · 1.64 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
name: CodeQL
on:
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: macos-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
languages: 'swift'
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Build library
run: make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
output: "results"
upload: "never"
- name: Upload SARIF report to Artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: CodeQL Analysis SARIF
path: ${{ github.workspace }}/results/swift.sarif
- name: Upload SARIF report to DDOG
env:
DD_API_KEY: '${{ secrets.DD_API_KEY }}'
run: |
npx --yes @datadog/datadog-ci sarif upload "${{ github.workspace }}/results/swift.sarif" --service dd-sdk-swift-testing --env ci