fix: prevent credential leakage in security-review evidence snippets#92
Open
paulocesarmsf wants to merge 1 commit intogetsentry:mainfrom
Open
fix: prevent credential leakage in security-review evidence snippets#92paulocesarmsf wants to merge 1 commit intogetsentry:mainfrom
paulocesarmsf wants to merge 1 commit intogetsentry:mainfrom
Conversation
…Snyk W007 Add explicit instruction to never reproduce actual secret values (passwords, API keys, tokens) in code evidence. Require placeholders (e.g. [REDACTED]) so reports do not leak credentials. Updates output format template accordingly.
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.
Summary
Fixes a credential-handling issue in the
security-reviewskill where evidence snippets could inadvertently reproduce sensitive values from analyzed code.The previous instructions allowed the agent to include raw code snippets as "evidence", which could cause secrets (e.g. API keys, passwords, tokens) to be echoed verbatim in generated reports.
This PR introduces explicit guidance to never reproduce actual secret values and to always redact credentials using placeholders.
Example:
This ensures the skill can still provide useful evidence while preventing accidental secret disclosure.
Motivation
During automated security reviews, the agent may analyze repositories that contain hardcoded credentials or sensitive configuration values. Without explicit instructions to redact them, these secrets may appear in generated reports.
Security tools such as Snyk flagged this behavior as insecure credential handling (W007) — the skill required including "evidence" code snippets and explicitly flagged hardcoded secrets, so if the reviewed code contained secret literals the agent could reproduce them verbatim in its report. By enforcing redaction in the output format, the skill avoids propagating sensitive data while preserving the usefulness of vulnerability evidence.
Changes
Security Impact
Improves the safety of automated security reviews by ensuring:
This aligns the skill with standard secure disclosure practices used in security tooling.
References
Result
Security analysis tools (e.g. Snyk audit) no longer flag insecure credential handling in the skill instructions.