Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
p4p3r committed Sep 29, 2023
1 parent 6b8f98d commit 7874e7e
Showing 1 changed file with 31 additions and 35 deletions.
66 changes: 31 additions & 35 deletions typescript/lang/security/audit/cors-regex-wildcard.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
rules:
- id: cors-regex-wildcard
message: "Unescaped '.' character in CORS domain regex $CORS: $PATTERN"
metadata:
cwe:
- "CWE-183: Permissive List of Allowed Inputs"
category: security
technology:
- cors
owasp:
- A04:2021 - Insecure Design
references:
- https://owasp.org/Top10/A04_2021-Insecure_Design
subcategory:
- audit
likelihood: LOW
impact: LOW
confidence: LOW
license: Commons Clause License Condition v1.0[LGPL-2.1-only]
vulnerability_class:
- Improper Validation
languages:
- ts
severity: WARNING
patterns:
- pattern-either:
- pattern: $CORS = [...,/$PATTERN/,...]
- pattern: $CORS = /$PATTERN/
- focus-metavariable: $PATTERN
- metavariable-regex:
metavariable: $PATTERN
regex: .+?(?<!\\).\..+(?<!\\)\..+
- metavariable-regex:
metavariable: $CORS
regex: (?i)cors
- id: cors-regex-wildcard
message: "Unescaped '.' character in CORS domain regex $CORS: $PATTERN"
metadata:
cwe:
- 'CWE-183: Permissive List of Allowed Inputs'
category: security
technology:
- cors
owasp:
- A04:2021 - Insecure Design
references:
- https://owasp.org/Top10/A04_2021-Insecure_Design
subcategory:
- audit
likelihood: LOW
impact: LOW
confidence: LOW
languages:
- ts
severity: WARNING
patterns:
- pattern-either:
- pattern: $CORS = [...,/$PATTERN/,...]
- pattern: $CORS = /$PATTERN/
- focus-metavariable: $PATTERN
- metavariable-regex:
metavariable: $PATTERN
regex: .+?(?<!\\).\..+(?<!\\)\..+
- metavariable-regex:
metavariable: $CORS
regex: (?i)cors

0 comments on commit 7874e7e

Please sign in to comment.