mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
rename query to overly-large-range, and rewrite the @description
This commit is contained in:
@@ -506,11 +506,11 @@
|
||||
"python/ql/lib/semmle/python/security/BadTagFilterQuery.qll",
|
||||
"ruby/ql/lib/codeql/ruby/security/BadTagFilterQuery.qll"
|
||||
],
|
||||
"SuspiciousRegexRange Python/JS/Ruby/Java": [
|
||||
"javascript/ql/lib/semmle/javascript/security/SuspiciousRegexpRangeQuery.qll",
|
||||
"python/ql/lib/semmle/python/security/SuspiciousRegexpRangeQuery.qll",
|
||||
"ruby/ql/lib/codeql/ruby/security/SuspiciousRegexpRangeQuery.qll",
|
||||
"java/ql/lib/semmle/code/java/security/SuspiciousRegexpRangeQuery.qll"
|
||||
"OverlyLargeRange Python/JS/Ruby/Java": [
|
||||
"javascript/ql/lib/semmle/javascript/security/OverlyLargeRangeQuery.qll",
|
||||
"python/ql/lib/semmle/python/security/OverlyLargeRangeQuery.qll",
|
||||
"ruby/ql/lib/codeql/ruby/security/OverlyLargeRangeQuery.qll",
|
||||
"java/ql/lib/semmle/code/java/security/OverlyLargeRangeQuery.qll"
|
||||
],
|
||||
"CFG": [
|
||||
"csharp/ql/lib/semmle/code/csharp/controlflow/internal/ControlFlowGraphImplShared.qll",
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
/**
|
||||
* @name Suspicious regexp range
|
||||
* @description Some ranges in regular expression might match more than intended.
|
||||
* @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 java/suspicious-regexp-range
|
||||
* @id java/overly-large-range
|
||||
* @tags correctness
|
||||
* security
|
||||
* external/cwe/cwe-020
|
||||
*/
|
||||
|
||||
import semmle.code.java.security.SuspiciousRegexpRangeQuery
|
||||
import semmle.code.java.security.OverlyLargeRangeQuery
|
||||
|
||||
RegExpCharacterClass potentialMisparsedCharClass() {
|
||||
// nested char classes are currently misparsed
|
||||
@@ -0,0 +1 @@
|
||||
Security/CWE/CWE-020/OverlyLargeRange.ql
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE/CWE-020/SuspiciousRegexpRange.ql
|
||||
19
javascript/ql/src/Security/CWE-020/OverlyLargeRange.ql
Normal file
19
javascript/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 js/overly-large-range
|
||||
* @tags correctness
|
||||
* security
|
||||
* external/cwe/cwe-020
|
||||
*/
|
||||
|
||||
import semmle.javascript.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 js/suspicious-regexp-range
|
||||
* @tags correctness
|
||||
* security
|
||||
* external/cwe/cwe-020
|
||||
*/
|
||||
|
||||
import semmle.javascript.security.SuspiciousRegexpRangeQuery
|
||||
|
||||
from RegExpCharacterRange range, string reason
|
||||
where problem(range, reason)
|
||||
select range, "Suspicious character range that " + reason + "."
|
||||
@@ -0,0 +1 @@
|
||||
Security/CWE-020/OverlyLargeRange.ql
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE-020/SuspiciousRegexpRange.ql
|
||||
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 + "."
|
||||
@@ -0,0 +1 @@
|
||||
Security/CWE-020/OverlyLargeRange.ql
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE-020/SuspiciousRegexpRange.ql
|
||||
@@ -1,17 +1,18 @@
|
||||
/**
|
||||
* @name Suspicious regexp range
|
||||
* @description Some ranges in regular expression might match more than intended.
|
||||
* @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 rb/suspicious-regexp-range
|
||||
* @id rb/overly-large-range
|
||||
* @tags correctness
|
||||
* security
|
||||
* external/cwe/cwe-020
|
||||
*/
|
||||
|
||||
import codeql.ruby.security.SuspiciousRegexpRangeQuery
|
||||
import codeql.ruby.security.OverlyLargeRangeQuery
|
||||
|
||||
RegExpCharacterClass potentialMisparsedCharClass() {
|
||||
// some escapes, e.g. [\000-\037] are currently misparsed.
|
||||
@@ -0,0 +1 @@
|
||||
queries/security/cwe-020/OverlyLargeRange.ql
|
||||
@@ -1 +0,0 @@
|
||||
queries/security/cwe-020/SuspiciousRegexpRange.ql
|
||||
Reference in New Issue
Block a user