Skip to content

Commit 82b2fd2

Browse files
committed
Exclude queries without precision
1 parent 18165cb commit 82b2fd2

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

ql/ql/src/queries/style/MissingSecuritySeverity.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ predicate missingSecuritySeverity(QLDoc doc) {
1515
exists(string securityTag | securityTag = s.splitAt("@") |
1616
securityTag.matches("tags%security%")
1717
) and
18+
exists(string precisionTag | precisionTag = s.splitAt("@") |
19+
precisionTag.matches("precision %")
20+
) and
1821
not exists(string securitySeverity | securitySeverity = s.splitAt("@") |
1922
securitySeverity.matches("security-severity %")
2023
)

ql/ql/test/queries/style/MissingSecuritySeverity/testcases/NoPrecision.expected

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @name Some query
3+
* @description Some description
4+
* @kind problem
5+
* @problem.severity warning
6+
* @id ql/some-query
7+
* @tags quality
8+
* security
9+
*/
10+
11+
import ql
12+
13+
from Class c
14+
select c

0 commit comments

Comments
 (0)