Skip to content

fix: prevent credential leakage in security-review evidence snippets#92

Open
paulocesarmsf wants to merge 1 commit intogetsentry:mainfrom
paulocesarmsf:redact-secret-detected
Open

fix: prevent credential leakage in security-review evidence snippets#92
paulocesarmsf wants to merge 1 commit intogetsentry:mainfrom
paulocesarmsf:redact-secret-detected

Conversation

@paulocesarmsf
Copy link

Summary

Fixes a credential-handling issue in the security-review skill 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:

api_key = "sk-***REDACTED***"
password = "[REDACTED]"

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

  • Added explicit instruction to never reproduce real secret values in evidence snippets.
  • Added guidance to redact credentials using placeholders.
  • Updated the vulnerable code snippet placeholder to reflect redaction requirements.

Security Impact

Improves the safety of automated security reviews by ensuring:

  • Secrets are not echoed in reports.
  • Sensitive credentials are always redacted.
  • The skill follows secure reporting practices.

This aligns the skill with standard secure disclosure practices used in security tooling.

References

  • Snyk security audit (W007): security-review — snyk — HIGH risk, insecure credential handling in skill instructions (audited Feb 15, 2026).

Result

Security analysis tools (e.g. Snyk audit) no longer flag insecure credential handling in the skill instructions.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant