-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (71 loc) · 2.55 KB
/
Copy pathcodeql.yml
File metadata and controls
80 lines (71 loc) · 2.55 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
name: CodeQL
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'LICENSE'
- 'LICENSES/**'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
- 'LICENSE'
- 'LICENSES/**'
schedule:
- cron: "0 18 * * 0"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
language:
- csharp
- actions
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up .NET
if: matrix.language == 'csharp'
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: 9.0.301
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: ${{ matrix.language }}
# --locked-mode keeps CodeQL's restore inside the committed
# packages.lock.json bounds so dependency-graph analysis runs against
# the same transitive set we ship. See issue #1556.
# --locked-mode により CodeQL の restore も packages.lock.json と同じ
# 推移依存セットに揃え、出荷物と同じ依存グラフを解析対象にする。
# 詳細は issue #1556 参照。
# CodeQL restore is analysis-only; keep the lock-file boundary but avoid
# failing security analysis when an external certificate revocation server
# is temporarily unreachable.
# CodeQL restore は解析用のため、lock file 境界は維持しつつ、外部の証明書失効確認
# サーバに一時到達できないだけで security analysis 全体を落とさない。
- name: Restore dependencies
if: matrix.language == 'csharp'
env:
NUGET_CERT_REVOCATION_MODE: offline
run: dotnet restore CodeIndex.sln --locked-mode -p:WarningsNotAsErrors=NU3018
- name: Build for CodeQL
if: matrix.language == 'csharp'
run: dotnet build CodeIndex.sln --configuration Release --no-restore
- name: Analyze
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2