Sample: Dart — see SquidGate detect findings - #17
Conversation
Demo only — hardcoded secret + injection / dangerous API patterns. See examples/README.md
🛡️ Security Scan ResultsThe new demo file introduces multiple clear security vulnerabilities: hardcoded credentials, SQL injection, and potential command injection, all explicitly marked as intentional for demonstration. ⛔ 2 finding(s) block merge. MEDIUM — Hardcoded API KeyFile: A hardcoded API key is embedded directly in source code. This exposes the credential in version control and any deployed artifacts, violating secure secret management practices. CWE: CWE-798 | OWASP: A07:2021 Recommendation: Remove the hardcoded key. Load secrets from environment variables or a secure vault, e.g., const apiKey = String.fromEnvironment('API_KEY'); HIGH — SQL Injection via String InterpolationFile: User-controlled 'id' parameter is directly concatenated into a SQL query string using single quotes, enabling SQL injection attacks when the query is executed. CWE: CWE-89 | OWASP: A03:2021 Recommendation: Use parameterized queries or prepared statements provided by the database library instead of string concatenation. HIGH — Insecure Command ConstructionFile: User input is interpolated into a shell command string ('sh -c echo $input'). If passed to Process.run or similar, this enables OS command injection. CWE: CWE-78 | OWASP: A03:2021 Recommendation: Avoid shell invocation with user input. Use Process.start with a list of arguments or validate/sanitize input strictly if shell is required. |
SquidGate language sample — Dart
This PR intentionally introduces insecure patterns so you can see SquidGate work on Dart:
File
examples/dart/demo.dartWhat to look for
block_on(defaulthigh)All language samples · Setup SquidGate on your repo