You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ``@id`` | ``<text>`` | A sequence of words composed of lowercase letters or digits, delimited by ``/`` or ``-``, identifying and classifying the query. Each query must have a **unique** ID. To ensure this, it may be helpful to use a fixed structure for each ID. For example, the standard CodeQL queries have the following format: ``<language>/<brief-description>``. |
| ``@previous-id`` | ``<text>`` | Indicates that query results were previously reported on a different query. The previous id should be a sequence of words composed of lowercase letters or digits, delimited by ``/`` or ``-``, identifying and classifying the previous query. |
| ``@kind`` || ``problem`` | Identifies the query is an alert (``@kind problem``) or a path (``@kind path-problem``). For more information on these query types, see ":doc:`About CodeQL queries <about-codeql-queries>`." |
Copy file name to clipboardExpand all lines: docs/query-metadata-style-guide.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,10 @@ Note, `@id` properties should be consistent for queries that highlight the same
93
93
*`@id java/tainted-format-string`
94
94
*`@id cpp/tainted-format-string`
95
95
96
+
#### Query previous ID `@previous-id`
97
+
98
+
Queries with alerts that used to be reported on a different query should also have an `@previous-id` property to refer back to the query where the alerts were originally reported. For example, if alerts from `java/query-one` are now reported on `java/query-two`, then the metadata for `java/query-two` should contain: `@previous-id java/query-one`.
99
+
96
100
97
101
### Query type `@kind`
98
102
@@ -113,7 +117,7 @@ Alert queries (`@kind problem` or `path-problem`) support two further properties
113
117
*`medium`
114
118
*`high`
115
119
*`very-high`
116
-
*`@problem.severity`–defines the likelihood that an alert, either security-related or not, causes an actual problem such as incorrect program behavior:
120
+
*`@problem.severity`–defines the likelihood that an alert, either security-related or not, causes an actual problem such as incorrect program behavior:
117
121
*`error`–an issue that is likely to cause incorrect program behavior, for example a crash or vulnerability.
118
122
*`warning`–an issue that indicates a potential problem in the code, or makes the code fragile if another (unrelated) part of code is changed.
119
123
*`recommendation`–an issue where the code behaves correctly, but it could be improved.
* False positives in "Log entries created from user input" (`go/log-injection`) and "Clear-text logging of sensitive information" (`go/clear-text-logging`) which involved the verb `%T` in a format specifier have been fixed. As a result, some users may also see more alerts from the "Use of constant `state` value in OAuth 2.0 URL" (`go/constant-oauth2-state`) query.
0 commit comments