secrets-in-diff

Detect potential secret exposure in pull request diffs using pattern matching.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Shah-Aayush/pr-reviewer --skill secrets-in-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secrets-in-diff
Source: https://github.com/Shah-Aayush/pr-reviewer/tree/main/shared-skills/security-axes/secrets-in-diff
Command: npx skills add https://github.com/Shah-Aayush/pr-reviewer --skill secrets-in-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Detects committed secrets (API keys, tokens, certificates, connection strings) in pull request diffs, ensuring sensitive information is not accidentally merged into the codebase.

Core Features & Use Cases

  • Secret Detection: Identifies high-confidence patterns in the code that indicate secrets, such as API keys and access tokens.
  • Confidence Levels: Flags patterns with high confidence as critical and others as medium or low confidence, requiring further context.
  • Suppression Rules: Honors suppression rules defined in the repository for known false positives.

Quick Start

Activate the secrets-in-diff skill on any PR diff to scan for secrets.

Frequently Asked Questions about secrets-in-diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect API keys and tokens in pull request diffs?

Secret detection in pull request diffs works by applying pattern matching against known secret formats like API keys and connection strings to identify potential leaks before code is merged. The tool flags matches with varying confidence levels requiring further context.

What's the best way to scan pull requests for committed secrets?

Scanning pull requests for committed secrets is best handled by analyzing code patterns in the diffs to ensure sensitive information like access tokens and certificates is not accidentally merged into the codebase.

Does secret detection in PR diffs support suppression rules for false positives?

Secret detection in PR diffs honors suppression rules defined in the repository to manage known false positives, allowing security-sensitive repositories to filter out flagged patterns that are safely ignored.

How are confidence levels assigned when detecting secrets in code patterns?

Confidence levels for detected secrets are assigned by categorizing pattern matches as critical for high-confidence indicators like API keys, while others are flagged as medium or low confidence to denote the need for further context.

Can I use pattern matching to prevent accidental commitment of secrets in security-sensitive repositories?

Pattern matching can be used to prevent accidental commitment of secrets in security-sensitive repositories by analyzing PR diffs against known secret formats to identify potential leaks before code is merged.

What types of sensitive information can be flagged during PR review?

Sensitive information flagged during PR review includes API keys, tokens, certificates, and connection strings detected through pattern matching against known secret formats in the code patterns.