secret-scanner

Detect hardcoded secrets in code changes and report type, location, severity, and remediation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ngmthaq/my-copilot --skill secret-scanner-ngmthaq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-scanner
Source: https://github.com/ngmthaq/my-copilot/tree/main/skills/secret-scanner
Command: npx skills add https://github.com/ngmthaq/my-copilot --skill secret-scanner-ngmthaq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Detects and prevents hardcoded secrets in code, configuration, and documentation to stop leaks and security breaches.

Core Features & Use Cases

  • Secret pattern detection: Recognizes common secret formats across languages and config files.
  • Diff-focused scanning: Inspects only added lines in code changes to keep CI fast.
  • Reporting & remediation guidance: Outputs findings with type, location, severity, and suggested fixes.
  • CI/CD integration: Easily integrated into pre-commit or PR pipelines to halt insecure changes.
  • Use Case: During code reviews, CI pipelines, or audits to catch secrets before merge.

Quick Start

Run the secret-scanner against your code changes to detect and report hardcoded secrets.

Frequently Asked Questions about secret-scanner

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

FAQPage Schema
How do I detect hardcoded secrets in code before merging?

To detect hardcoded secrets in code, run a diff-aware scanner during code reviews or CI pipelines. This scanner inspects added lines in code changes, identifies credentials and API keys, and reports their type, location, severity, and remediation guidance before merge.

What is diff-aware scanning and how does it help find secrets in CI pipelines?

Diff-aware scanning for secrets inspects only added lines in code changes rather than the entire repository. This mechanism keeps CI pipelines fast by limiting the inspection scope to new modifications, ensuring quick and focused secret detection during continuous integration.

Can I integrate a Bash scanner into my pre-commit hooks to prevent credential leaks?

Yes, you can integrate this Bash scanner into pre-commit hooks or PR pipelines to prevent credential leaks. It runs secret pattern detection on staged changes and exits nonzero when secrets are found, halting insecure commits before they are merged.

What is the best way to scan configuration files for API keys and tokens during an audit?

The best way to scan configuration files for API keys and tokens during an audit is using an automated scanner that recognizes common secret formats across languages. It outputs findings with location and severity, providing clear remediation guidance for identified tokens.

Does the secret scanner provide guidance on how to fix detected credentials in code?

Yes, the secret scanner provides remediation guidance for detected credentials in code. Alongside reporting the type, location, and severity of hardcoded secrets, it suggests fixes to help developers resolve the security issues and prevent leaks before deployment.