Skip to content

Commit c461774

Browse files
authored
ci: further tune the codeql (#15254)
Some of the security-extended checks were actually useful, it only has one extremely noisy rule, just like the default queries have one extremely noisy rule. Disable both of the noisy rules via configuration file instead.
1 parent 0abf009 commit c461774

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/codeql-config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
query-filters:
3+
- exclude:
4+
# Very noisy check which can also be accomplished with an ordinary linter.
5+
# See: https://codeql.github.com/codeql-query-help/java/java-implicit-cast-in-compound-assignment/
6+
id: java/implicit-cast-in-compound-assignment
7+
- exclude:
8+
# Very noisy check which can also be accomplished with an ordinary linter.
9+
# See: https://codeql.github.com/codeql-query-help/java/java-comparison-with-wider-type/
10+
id: java/comparison-with-wider-type

.github/workflows/codeql.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@ jobs:
2727
include:
2828
- language: actions
2929
build-mode: none
30-
queries: security-extended
3130
- language: python
3231
build-mode: none
33-
queries: security-extended
3432
- language: java
3533
build-mode: none
36-
queries: "" # security-extended is very noisy for the java language
3734
steps:
3835
- name: Checkout repository
3936
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -49,7 +46,8 @@ jobs:
4946
with:
5047
languages: ${{ matrix.language }}
5148
build-mode: ${{ matrix.build-mode }}
52-
queries: ${{ matrix.queries }}
49+
queries: security-extended
50+
config-file: ./.github/codeql-config.yml
5351

5452
- name: Perform CodeQL Analysis
5553
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3

0 commit comments

Comments
 (0)