gitlab.find_sec_bugs.CUSTOM_INJECTION-1
unknown
Download Count*
License
The method identified is susceptible to injection. The input should be validated and properly escaped.
Run Locally
Run in CI
Defintion
rules:
- id: find_sec_bugs.CUSTOM_INJECTION-1
patterns:
- pattern-either:
- pattern: |
$QUERY = ... + $VAR + ...;
...
$ST.executeQuery($QUERY);
- pattern: |
$QUERY = ... + $VAR ;
...
$ST.executeQuery($QUERY);
- pattern: |
$QUERY = String.format("...",...,$VAR,...);
...
$ST.executeQuery($QUERY);
- pattern: $ST.executeQuery((StringBuilder $SB).toString());
- pattern: $ST.executeQuery(... + $VAR + ...);
- pattern: $ST.executeQuery(... + $VAR);
- pattern: $ST.executeQuery(...,String.format("...",...,$VAR,...), ...);
- metavariable-pattern:
metavariable: $ST
pattern-either:
- pattern: (java.sql.Statement $ST)
- pattern: (org.apache.turbine.om.peer.BasePeer $ST)
message: >
The method identified is susceptible to injection. The input should be
validated and properly
escaped.
languages:
- java
severity: WARNING
metadata:
category: security
cwe: "CWE-89: Improper Neutralization of Special Elements used in an SQL Command
('SQL Injection')"
technology:
- java
primary_identifier: find_sec_bugs.CUSTOM_INJECTION-1
secondary_identifiers:
- name: Find Security Bugs-CUSTOM_INJECTION
type: find_sec_bugs_type
value: CUSTOM_INJECTION
license: MIT
Short Link: https://sg.run/0WpJ