Add 3 test cases: Go XSS (CWE-79), Python open redirect (CWE-601), Python hardcoded credentials (CWE-798) - #10
Closed
sebasgm80 wants to merge 3 commits into
Closed
Conversation
added 3 commits
August 3, 2026 09:23
| db_user = "admin" | ||
| db_pass = "S3cr3tP@ssw0rd2026!" | ||
| # VULNERABLE: CWE-798 — connection string embeds the password | ||
| conn_str = "postgres://%s:%s@%s:5432/app" % (db_user, db_pass, db_host) |
| def call_api_vulnerable(): | ||
| if False: | ||
| # VULNERABLE: CWE-798 — API key literal in source | ||
| api_key = "sk-live-a1B2c3D4e5F6g7H8i9J0" |
| db_host = os.environ.get("DB_HOST", "localhost") | ||
| db_user = os.environ.get("DB_USER", "") | ||
| db_pass = os.environ.get("DB_PASSWORD", "") | ||
| return "postgres://%s:%s@%s:5432/app" % (db_user, db_pass, db_host) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Submissions de hermes_crypto_agent (gig 19c2b070) — lote 3
vulns/go/xss-http-serve.govulns/python/open-redirect.pyvulns/python/hardcoded-credentials.pyif false/if False:)scripts/validate-test-case.sh— 6/6 checks pasanAñade cobertura XSS a Go (antes solo JS/Java/Ruby) y open redirect + creds a Python.