Skip to content

Commit 233b54c

Browse files
authored
Merge pull request #19891 from michaelnebel/michaelnebel/freezemoresuites
Go/Ruby/Python: Freeze quality queries in `security-and-quality`.
2 parents 2ee3401 + 143a91e commit 233b54c

File tree

7 files changed

+167
-110
lines changed

7 files changed

+167
-110
lines changed

csharp/ql/src/codeql-suites/csharp-security-and-quality.qls

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
- description: Security-and-quality queries for C#
22
- queries: .
3-
- include:
4-
kind:
5-
- problem
6-
- path-problem
7-
precision:
8-
- high
9-
- very-high
10-
tags contain:
11-
- security
12-
- include:
13-
kind:
14-
- problem
15-
- path-problem
16-
precision: medium
17-
problem.severity:
18-
- error
19-
- warning
20-
tags contain:
21-
- security
3+
- apply: security-and-frozen-quality-selectors.yml
4+
from: codeql/suite-helpers
225
- include:
236
id:
247
- cs/asp/response-write
@@ -123,21 +106,3 @@
123106
- cs/wrong-compareto-signature
124107
- cs/wrong-equals-signature
125108
- cs/xmldoc/missing-summary
126-
- include:
127-
kind:
128-
- diagnostic
129-
- include:
130-
kind:
131-
- metric
132-
tags contain:
133-
- summary
134-
- exclude:
135-
deprecated: //
136-
- exclude:
137-
query path:
138-
- /^experimental\/.*/
139-
- Metrics/Summaries/FrameworkCoverage.ql
140-
- exclude:
141-
tags contain:
142-
- modeleditor
143-
- modelgenerator
Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
- description: Security-and-quality queries for Go
22
- queries: .
3-
- apply: security-and-quality-selectors.yml
3+
- apply: security-and-frozen-quality-selectors.yml
44
from: codeql/suite-helpers
5+
- include:
6+
id:
7+
- go/comparison-of-identical-expressions
8+
- go/constant-length-comparison
9+
- go/duplicate-branches
10+
- go/duplicate-condition
11+
- go/duplicate-switch-case
12+
- go/impossible-interface-nil-check
13+
- go/inconsistent-loop-direction
14+
- go/index-out-of-bounds
15+
- go/missing-error-check
16+
- go/mistyped-exponentiation
17+
- go/negative-length-check
18+
- go/redundant-assignment
19+
- go/redundant-operation
20+
- go/redundant-recover
21+
- go/shift-out-of-range
22+
- go/unexpected-nil-value
23+
- go/unhandled-writable-file-close
24+
- go/unreachable-statement
25+
- go/useless-assignment-to-field
26+
- go/useless-assignment-to-local
27+
- go/useless-expression
28+
- go/whitespace-contradicts-precedence

java/ql/src/codeql-suites/java-security-and-quality.qls

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
- description: Security-and-quality queries for Java
22
- queries: .
3-
- include:
4-
kind:
5-
- problem
6-
- path-problem
7-
precision:
8-
- high
9-
- very-high
10-
tags contain:
11-
- security
12-
- include:
13-
kind:
14-
- problem
15-
- path-problem
16-
precision: medium
17-
problem.severity:
18-
- error
19-
- warning
20-
tags contain:
21-
- security
3+
- apply: security-and-frozen-quality-selectors.yml
4+
from: codeql/suite-helpers
225
- include:
236
id:
247
- java/abs-of-random
@@ -143,22 +126,3 @@
143126
- java/wrong-object-serialization-signature
144127
- java/wrong-readresolve-signature
145128
- java/wrong-swing-event-adapter-signature
146-
- include:
147-
kind:
148-
- diagnostic
149-
- include:
150-
kind:
151-
- metric
152-
tags contain:
153-
- summary
154-
- exclude:
155-
deprecated: //
156-
- exclude:
157-
query path:
158-
- /^experimental\/.*/
159-
- Metrics/Summaries/FrameworkCoverage.ql
160-
- /Diagnostics/Internal/.*/
161-
- exclude:
162-
tags contain:
163-
- modeleditor
164-
- modelgenerator

javascript/ql/src/codeql-suites/javascript-security-and-quality.qls

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
- description: Security-and-quality queries for JavaScript
22
- queries: .
3-
- include:
4-
kind:
5-
- problem
6-
- path-problem
7-
precision:
8-
- high
9-
- very-high
10-
tags contain:
11-
- security
12-
- include:
13-
kind:
14-
- problem
15-
- path-problem
16-
precision: medium
17-
problem.severity:
18-
- error
19-
- warning
20-
tags contain:
21-
- security
3+
- apply: security-and-frozen-quality-selectors.yml
4+
from: codeql/suite-helpers
225
- include:
236
id:
247
- js/node/assignment-to-exports-variable
@@ -123,16 +106,3 @@
123106
- js/diagnostics/successfully-extracted-files
124107
- js/summary/lines-of-code
125108
- js/summary/lines-of-user-code
126-
- include:
127-
kind:
128-
- diagnostic
129-
- include:
130-
kind:
131-
- metric
132-
tags contain:
133-
- summary
134-
- exclude:
135-
deprecated: //
136-
- exclude:
137-
query path:
138-
- /^experimental\/.*/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- description: Selectors for selecting the non-quality queries for the security-and-quality queries for a language
2+
- apply: security-extended-selectors.yml
3+
- exclude:
4+
tags contain:
5+
- 'model-generator'
Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,128 @@
11
- description: Security-and-quality queries for Python
22
- queries: .
3-
- apply: security-and-quality-selectors.yml
3+
- apply: security-and-frozen-quality-selectors.yml
44
from: codeql/suite-helpers
5+
- include:
6+
id:
7+
- py/asserts-tuple
8+
- py/attribute-shadows-method
9+
- py/call-to-non-callable
10+
- py/call/wrong-arguments
11+
- py/call/wrong-named-argument
12+
- py/call/wrong-named-class-argument
13+
- py/call/wrong-number-class-arguments
14+
- py/catch-base-exception
15+
- py/commented-out-code
16+
- py/comparison-missing-self
17+
- py/comparison-of-constants
18+
- py/comparison-of-identical-expressions
19+
- py/comparison-using-is
20+
- py/conflicting-attributes
21+
- py/constant-conditional-expression
22+
- py/cyclic-import
23+
- py/deprecated-slice-method
24+
- py/duplicate-key-dict-literal
25+
- py/empty-except
26+
- py/encoding-error
27+
- py/equals-hash-mismatch
28+
- py/exit-from-finally
29+
- py/explicit-call-to-delete
30+
- py/explicit-return-in-init
31+
- py/file-not-closed
32+
- py/hash-unhashable-value
33+
- py/illegal-raise
34+
- py/implicit-string-concatenation-in-list
35+
- py/import-and-import-from
36+
- py/import-deprecated-module
37+
- py/import-of-mutable-attribute
38+
- py/import-own-module
39+
- py/imprecise-assert
40+
- py/incomplete-ordering
41+
- py/inconsistent-equality
42+
- py/inconsistent-mro
43+
- py/ineffectual-statement
44+
- py/inheritance/incorrect-overridden-signature
45+
- py/inheritance/incorrect-overriding-signature
46+
- py/inheritance/signature-mismatch
47+
- py/init-calls-subclass
48+
- py/init-method-is-generator
49+
- py/iter-returns-non-iterator
50+
- py/iter-returns-non-self
51+
- py/iteration-string-and-sequence
52+
- py/leaking-list-comprehension
53+
- py/loop-variable-capture
54+
- py/member-test-non-container
55+
- py/mismatched-multiple-assignment
56+
- py/missing-call-to-delete
57+
- py/missing-call-to-init
58+
- py/missing-equals
59+
- py/mixed-returns
60+
- py/mixed-tuple-returns
61+
- py/modification-of-default-value
62+
- py/modification-of-locals
63+
- py/multiple-calls-to-delete
64+
- py/multiple-calls-to-init
65+
- py/multiple-definition
66+
- py/mutable-descriptor
67+
- py/nested-loops-with-same-variable
68+
- py/nested-loops-with-same-variable-reused
69+
- py/non-iterable-in-for-loop
70+
- py/not-named-cls
71+
- py/not-named-self
72+
- py/old-style-octal-literal
73+
- py/overly-complex-delete
74+
- py/overwritten-inherited-attribute
75+
- py/percent-format/not-mapping
76+
- py/percent-format/unsupported-character
77+
- py/percent-format/wrong-arguments
78+
- py/polluting-import
79+
- py/print-during-import
80+
- py/procedure-return-value-used
81+
- py/property-in-old-style-class
82+
- py/pythagorean
83+
- py/raise-not-implemented
84+
- py/raises-tuple
85+
- py/redundant-assignment
86+
- py/redundant-comparison
87+
- py/redundant-else
88+
- py/redundant-global-declaration
89+
- py/regex/backspace-escape
90+
- py/regex/duplicate-in-character-class
91+
- py/regex/incomplete-special-group
92+
- py/regex/unmatchable-caret
93+
- py/regex/unmatchable-dollar
94+
- py/repeated-import
95+
- py/return-or-yield-outside-function
96+
- py/should-use-with
97+
- py/side-effect-in-assert
98+
- py/slots-in-old-style-class
99+
- py/special-method-wrong-signature
100+
- py/str-format/missing-argument
101+
- py/str-format/missing-named-argument
102+
- py/str-format/mixed-fields
103+
- py/str-format/surplus-argument
104+
- py/str-format/surplus-named-argument
105+
- py/super-in-old-style
106+
- py/super-not-enclosing-class
107+
- py/syntax-error
108+
- py/test-equals-none
109+
- py/truncated-division
110+
- py/undefined-export
111+
- py/undefined-placeholder-variable
112+
- py/unexpected-raise-in-special-method
113+
- py/unguarded-next-in-generator
114+
- py/uninitialized-local-variable
115+
- py/unnecessary-delete
116+
- py/unnecessary-lambda
117+
- py/unnecessary-pass
118+
- py/unreachable-except
119+
- py/unreachable-statement
120+
- py/unsafe-cyclic-import
121+
- py/unused-exception-object
122+
- py/unused-global-variable
123+
- py/unused-import
124+
- py/unused-local-variable
125+
- py/unused-loop-variable
126+
- py/use-of-apply
127+
- py/use-of-exit-or-quit
128+
- py/useless-except
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
- description: Security-and-quality queries for Ruby
22
- queries: .
3-
- apply: security-and-quality-selectors.yml
3+
- apply: security-and-frozen-quality-selectors.yml
44
from: codeql/suite-helpers
5+
- include:
6+
id:
7+
- rb/database-query-in-loop
8+
- rb/uninitialized-local-variable
9+
- rb/useless-assignment-to-local

0 commit comments

Comments
 (0)