Skip to content

Commit 8f38ab0

Browse files
authored
Merge pull request github#6540 from jbj/ctime-weaken-claims
C++:Lower potentially-dangerous-function precision
2 parents 2f5ed03 + 19ee64d commit 8f38ab0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lgtm,codescanning
2+
* Lowered the precision of `cpp/potentially-dangerous-function` so it is run but not displayed on LGTM by default and so it's only run and displayed on Code Scanning if a broader suite like `cpp-security-extended` is opted into.

cpp/ql/src/Security/CWE/CWE-676/PotentiallyDangerousFunction.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ can use their own storage.</p>
2626
<p>Similarly replace calls to <code>localtime</code> with
2727
<code>localtime_r</code>, calls to <code>ctime</code> with
2828
<code>ctime_r</code> and calls to <code>asctime</code> with
29-
<code>asctime_r</code>.</p>
29+
<code>asctime_r</code> (if those functions exist on your platform).</p>
3030

3131
</recommendation>
3232
<example>

cpp/ql/src/Security/CWE/CWE-676/PotentiallyDangerousFunction.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @kind problem
55
* @problem.severity warning
66
* @security-severity 10.0
7-
* @precision high
7+
* @precision medium
88
* @id cpp/potentially-dangerous-function
99
* @tags reliability
1010
* security

0 commit comments

Comments
 (0)