Skip to content

Sample: SQL — see SquidGate detect findings - #19

Open
DotNetRussell wants to merge 1 commit into
mainfrom
sample/sql
Open

Sample: SQL — see SquidGate detect findings#19
DotNetRussell wants to merge 1 commit into
mainfrom
sample/sql

Conversation

@DotNetRussell

Copy link
Copy Markdown
Contributor

SquidGate language sample — SQL

This PR intentionally introduces insecure patterns so you can see SquidGate work on SQL:

  • Hardcoded secret / credential
  • Injection and/or dangerous API usage

File

examples/sql/demo.sql

What to look for

  1. Check run named SquidGate
  2. Line annotations on the sample file
  3. PR comment summarizing findings
  4. Check failure when severity ≥ block_on (default high)

Demo only. Do not merge these patterns into production apps.

All language samples · Setup SquidGate on your repo

Demo only — hardcoded secret + injection / dangerous API patterns.
See examples/README.md
@DotNetRussell DotNetRussell added sample:sql Language sample PR: sql sample SquidGate language demo PR labels Jul 28, 2026
@github-actions

Copy link
Copy Markdown

🛡️ Security Scan Results

The new demo SQL file introduces hardcoded credentials and overly broad privilege grants, both of which are clear security issues.

⛔ 2 finding(s) block merge.

HIGH — Hardcoded credentials in SQL script

File: examples/sql/demo.sql:3 | Confidence: high

The CREATE USER statement hardcodes a password 'SuperSecretDemoPassword123!'. Hardcoded credentials are easily discoverable in source control and violate secure credential management practices.

CWE: CWE-798 | OWASP: A07:2021

Recommendation: Remove the hardcoded password. For demo purposes use a placeholder such as '' and document that real credentials must come from secure configuration or secret management systems.


HIGH — Overly permissive database privileges granted to public

File: examples/sql/demo.sql:8 | Confidence: high

GRANT ALL PRIVILEGES ON DATABASE prod TO public; assigns full access to any database user, violating the principle of least privilege.

CWE: CWE-732 | OWASP: A01:2021

Recommendation: Grant only the minimum required privileges to specific roles or users. Never grant to PUBLIC for production or sensitive databases.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sample:sql Language sample PR: sql sample SquidGate language demo PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant