mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
rename query to overly-large-range, and rewrite the @description
This commit is contained in:
19
python/ql/src/Security/CWE-020/OverlyLargeRange.ql
Normal file
19
python/ql/src/Security/CWE-020/OverlyLargeRange.ql
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @name Overly large regular expression range
|
||||
* @description Overly permissive regular expression ranges may cause regular expressions to match more than anticipated.
|
||||
* This may allow an attacker to bypass a filter or sanitizer.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @security-severity 5.0
|
||||
* @precision high
|
||||
* @id py/overly-large-range
|
||||
* @tags correctness
|
||||
* security
|
||||
* external/cwe/cwe-020
|
||||
*/
|
||||
|
||||
import semmle.python.security.OverlyLargeRangeQuery
|
||||
|
||||
from RegExpCharacterRange range, string reason
|
||||
where problem(range, reason)
|
||||
select range, "Suspicious character range that " + reason + "."
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* @name Suspicious regexp range
|
||||
* @description Some ranges in regular expression might match more than intended.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @security-severity 5.0
|
||||
* @precision high
|
||||
* @id py/suspicious-regexp-range
|
||||
* @tags correctness
|
||||
* security
|
||||
* external/cwe/cwe-020
|
||||
*/
|
||||
|
||||
import semmle.python.security.SuspiciousRegexpRangeQuery
|
||||
|
||||
from RegExpCharacterRange range, string reason
|
||||
where problem(range, reason)
|
||||
select range, "Suspicious character range that " + reason + "."
|
||||
Reference in New Issue
Block a user