Add security-severity scores#5839
Conversation
|
The latest output of the tool is as follows: |
29a241f to
c8124e4
Compare
95b8df4 to
4f70a4a
Compare
4f70a4a to
a594afb
Compare
|
Output of the tool is now: |
|
OOI, not super critical for merging: what does it look like if you plot the number of occurrences of each |
|
There are some of the severities that don't match my expectation (for instance, Heartbleed only getting a score of 5.2). How would you prefer we fix this? I can review all the C++ queries and give you the severities that I would have expected, but if all languages do that you might spend a week responding to PR reviews. |
|
@MathiasVP, In general, we want to try avoiding manual score change to keep consistency across all queries and have this feature easy to maintain. |
I've only found two instances where the calculated score and the manual score ended up in two different categories: |
|
Ok, thank you, @MathiasVP, for a detailed inspection. |
|
Have we ensured CWE consistency, and thereby |
|
The idea is that we don't override the algorithm - but we do want to find bugs in its implementation. In terms of Heartbleed To explain this better, I created a script that attempts to explain a given score: |
That's very useful. Thank you! Now that I see the look at the CWEs attached to the |
In general, we would allow language-specific variations. The onus is on the query writer to use a consistent set of CWEs for queries across languages, and then the score will be the same. In the case of |
|
Info on potentially dangerous function (CWE-676): |
|
I would like to get this merged today, so these scores can be included in the dist-upgrade that starts on Monday. Is there anything else I can do to speed up this review? |
MathiasVP
left a comment
There was a problem hiding this comment.
C++ 👍. We might end up adding a couple more CWE tags to some of the queries, but this shouldn't block this PR.
|
JS 👍🏻 We might also end up adding a couple more CWE tags to some of the queries, but this shouldn't block this PR. |
|
Python 👎 but I'll make fixes in a follow-up PR. |


Summary of changes:
update-queries.pyscript.The result of this is that all relevant queries have been tagged with
@security-severitymetadata.Background
Supports https://github.com/github/code-scanning/issues/3375 and https://github.com/github/codeql-team/issues/263. Read these issues for background information on why we are doing this and how it works.