security-check

Scan Git diffs for sensitive credentials before commit or push.

2.2k|444|Updated Nov 8, 2021
One-click install
npx skills add https://github.com/alibaba/loongcollector --skill security-check-alibaba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-check
Source: https://github.com/alibaba/loongcollector/tree/main/.cursor/skills/security-check
Command: npx skills add https://github.com/alibaba/loongcollector --skill security-check-alibaba

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps prevent sensitive information such as API keys and tokens from being committed or pushed by automatically scanning diffs for common leakage patterns.

Core Features & Use Cases

  • Pre-commit and pre-push secret detection to stop leakage early.
  • Reporting and logging of commits that contain secrets for remediation.
  • Optional scripts to reset history if secrets were leaked, with safeguards.

Quick Start

Run the security_check.sh script with commit mode to scan the staging area for sensitive information before committing.

Frequently Asked Questions about security-check

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

FAQPage Schema
How do I prevent API keys and tokens from leaking in git commits?

You can prevent API keys and tokens from leaking in git commits by scanning diffs for known sensitive patterns before they are committed. This Skill blocks sensitive credentials at the pre-commit and pre-push stages to stop leakage in shared repos.

How does pre-commit secret scanning work for Git workflows?

Pre-commit secret scanning works by using bash scripts and Git commands to detect API keys and tokens in the staging area. It identifies sensitive information using defined patterns and blocks the commit or push if leakage is detected.

What should I do if secrets were already leaked to shared repositories?

If secrets were already leaked to shared repositories, you can use optional scripts to reset history with built-in safeguards. This provides safe recovery options to remediate commits that contain secrets after detection.

Can I use bash scripts to scan staging area diffs for sensitive information?

Yes, you can use bash scripts to scan staging area diffs for sensitive information before committing. Running the security check script in commit mode scans the staged changes to detect API keys and tokens using defined patterns.

Does pre-push secret detection report commits containing secrets for remediation?

Yes, pre-push secret detection reports and logs commits containing secrets for remediation. It scans diffs across pre-commit and pre-push stages to identify sensitive credentials and provides safe recovery options.