Add 20 inert JavaScript and Python security scanner test cases - #13
Merged
ralyodio merged 1 commit intoAug 4, 2026
Conversation
| const https = require('node:https'); | ||
|
|
||
| function buildHttpsAgentVulnerable() { | ||
| return new https.Agent({ rejectUnauthorized: false }); // VULNERABLE: CWE-295 certificate validation disabled |
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.
Test Case Submission — batch of 20 (uGig gig 19c2b070)
docs/CONTRIBUTING.mdif (false)orif False:).invalid,.example,example.com)@id,@cwe,@severity,@language,@expected-detection,@description,@safe-guard)VULNERABLE:and correct-code lines withSAFE:scripts/validate-test-case.shpassed all 6 validation groupsDetails
This batch adds 20 distinct inert scanner fixtures, each with a vulnerable pattern and a safe control:
vulns/javascript/cookie-security-flags.jsvulns/javascript/cors-wildcard-credentials.jsvulns/javascript/hardcoded-crypto-key.jsvulns/javascript/host-header-password-reset.jsvulns/javascript/http-header-injection.jsvulns/javascript/insecure-random-token.jsvulns/javascript/log-injection.jsvulns/javascript/mass-assignment-object-assign.jsvulns/javascript/nosql-injection-mongodb.jsvulns/javascript/tls-reject-unauthorized-false.jsvulns/python/csv-formula-injection.pyvulns/python/excessive-data-exposure.pyvulns/python/flask-debug-enabled.pyvulns/python/hardcoded-session-secret.pyvulns/python/ldap-injection.pyvulns/python/missing-admin-authorization.pyvulns/python/negative-price-validation.pyvulns/python/plaintext-password-storage.pyvulns/python/weak-password-hash.pyvulns/python/xpath-injection.pySAFE:control for every vulnerable pattern.Safety statement
All JavaScript payloads are visibly unreachable behind
if (false); all Python payloads are behindif False:. The fixtures perform no disk writes, network requests, process creation, dependency installation, deletion, resource exhaustion, or other side effects. Host literals use reserved domains. The cryptographic key and session secret are repeating test-only placeholders that cannot authenticate to or protect any real system. Removing a guard still would not target a live service.Validation
scripts/validate-test-case.sh: 6/6 validation groups passedpython3 scripts/generate-catalog.py: completedVULNERABLE:markers, 67SAFE:markers