-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (98 loc) · 2.93 KB
/
Copy pathcodeql.yml
File metadata and controls
109 lines (98 loc) · 2.93 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CodeQL
on:
push:
branches:
- main
- pre-main-integration
paths-ignore:
- '**.md'
- 'doc/**'
- 'CLAUDE.md'
- 'LICENSE'
pull_request:
branches:
- main
- pre-main-integration
paths-ignore:
- '**.md'
- 'doc/**'
- 'CLAUDE.md'
- 'LICENSE'
schedule:
- cron: "0 18 * * 0"
workflow_dispatch:
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: read
strategy:
fail-fast: false
matrix:
language:
- csharp
- actions
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up .NET
if: ${{ matrix.language == 'csharp' }}
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
- name: Initialize CodeQL
uses: github/codeql-action/init@4187e74d05793876e9989daffde9c3e66b4acd07 # v3.37.3
with:
languages: ${{ matrix.language }}
- name: Restore dependencies
if: ${{ matrix.language == 'csharp' }}
run: dotnet restore FolderDiffIL4DotNet.sln
- name: Build for CodeQL
if: ${{ matrix.language == 'csharp' }}
run: dotnet build FolderDiffIL4DotNet.sln --configuration Release --no-restore
- name: Analyze
uses: github/codeql-action/analyze@4187e74d05793876e9989daffde9c3e66b4acd07 # v3.37.3
with:
output: codeql-raw-results
post-processed-sarif-path: codeql-results
upload: never
upload-database: false
- name: Upload local CodeQL results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: CodeQL-SARIF-${{ matrix.language }}
if-no-files-found: error
path: codeql-results/**
upload-results:
name: Upload results
needs: analyze
runs-on: ubuntu-latest
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- csharp
- actions
steps:
- name: Download local CodeQL results
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: CodeQL-SARIF-${{ matrix.language }}
path: codeql-results
- name: Upload CodeQL results
uses: github/codeql-action/upload-sarif@4187e74d05793876e9989daffde9c3e66b4acd07 # v3.37.3
with:
category: ".github/workflows/codeql.yml:analyze/language:${{ matrix.language }}/"
sarif_file: codeql-results