Passive Scan Rule: Credential Leak Detection#516
Open
aasthasahni9 wants to merge 2 commits into
Open
Conversation
… identify exposed credentials in HTTP traffic. Signed-off-by: Aastha Sahni <aastha.cyberpreserve@gmail.com>
Signed-off-by: Aastha Sahni <aastha.cyberpreserve@gmail.com>
Member
|
New Issues (9)Checkmarx found the following issues in this Pull Request
Use @Checkmarx to interact with Checkmarx PR Assistant. |
6ce8366 to
a6dab62
Compare
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.




Adds a new passive community script, Credential Exposure Detector, to identify exposed credentials in HTTP traffic.
What this PR does
Introduces a passive script to detect exposed credentials such as:
API keys
Client secrets
OAuth access tokens
Scans the following locations:
HTTP response bodies
Request URL paths
URL query parameters
Supports multiple content types, including:
Swagger / OpenAPI JSON
HTML pages
Other response formats
Why this is needed
Credentials are commonly exposed due to:
Public or misconfigured API documentation
Debug or test endpoints
Passing sensitive values via GET requests or URL parameters
This passive script helps identify secret leakage caused by insecure configuration or deployment practices without actively modifying traffic.
Recommended remediation
Remove hardcoded secrets from responses and URLs
Restrict access to sensitive documentation (e.g., Swagger/OpenAPI)
Avoid passing credentials in URL paths or query parameters
Use secure authentication mechanisms such as Authorization headers or secure cookies over HTTPS
Integrate secret‑scanning tools into CI/CD pipelines and enforce access controls
References
OWASP Non‑Human Identities Top 10 – Secret Leakage https://owasp.org/www-project-non-human-identities-top-10/2025/2-secret-leakage/
CWE‑200: Exposure of Sensitive Information https://cwe.mitre.org/data/definitions/200.html
OWASP Secrets Management Cheat Sheet https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html
Gitleaks https://github.com/gitleaks/gitleaks
Testing
✅ Script loaded successfully in ZAP
✅ Passive scan triggered as expected
✅ Build and VerifyScripts checks pass
✅ Spotless formatting applied
Author
Aastha Sahni