Sample: Shell — see SquidGate detect findings - #16
Conversation
Demo only — hardcoded secret + injection / dangerous API patterns. See examples/README.md
🛡️ Security Scan ResultsThe new demo script contains a hardcoded secret and multiple injection vulnerabilities (SQL and command) that represent clear high/critical security risks. ⛔ 3 finding(s) block merge. HIGH — Hardcoded CredentialFile: A secret API key is hardcoded directly in the source code. This exposes the credential if the file is committed to version control, shared, or accessed by unauthorized users. CWE: CWE-798 | OWASP: A07:2021 Recommendation: Remove the hardcoded key. Load secrets from environment variables (e.g., ${API_KEY}) or a secure secrets manager at runtime. HIGH — SQL InjectionFile: Unsanitized user input ($1) is directly interpolated into a SQL query string passed to the mysql client. An attacker can inject SQL via the argument to alter the query or extract data. CWE: CWE-89 | OWASP: A03:2021 Recommendation: Use parameterized queries or prepared statements. Avoid constructing SQL commands from untrusted input; escape or validate $1 before use. CRITICAL — Command Injection via evalFile: The eval builtin executes a string containing unsanitized user input ($1). This allows arbitrary command execution, including shell metacharacters for full RCE. CWE: CWE-78 | OWASP: A03:2021 Recommendation: Remove eval. Use direct command execution with proper argument handling (e.g., echo "$1" without eval) or validate/sanitize input strictly. |
SquidGate language sample — Shell
This PR intentionally introduces insecure patterns so you can see SquidGate work on Shell:
File
examples/shell/demo.shWhat to look for
block_on(defaulthigh)All language samples · Setup SquidGate on your repo