Skip to content

Commit 393e9c4

Browse files
committed
ci: scope codeql permissions to analysis job
Signed-off-by: MIA_Ether <2452597472@qq.com>
1 parent 021400b commit 393e9c4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎.github/workflows/codeql.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

44
name: CodeQL
@@ -20,7 +20,6 @@ on:
2020

2121
permissions:
2222
contents: read
23-
security-events: write
2423

2524
concurrency:
2625
group: codeql-${{ github.workflow }}-${{ inputs.candidate_ref || github.ref }}
@@ -30,6 +29,9 @@ jobs:
3029
analyze:
3130
name: CodeQL (${{ matrix.language }})
3231
runs-on: ubuntu-latest
32+
permissions:
33+
contents: read
34+
security-events: write
3335
timeout-minutes: 90
3436
env:
3537
# Keep Rust test fixtures out of production-focused security results.
@@ -166,3 +168,4 @@ jobs:
166168
exit 1
167169
fi
168170
echo "All CodeQL analyzers completed and the configured finding threshold passed."
171+

0 commit comments

Comments
 (0)