Back to skill

Security audit

git-commit-skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a transparent Git commit assistant that reads repository changes, checks for likely secrets, and only stages, commits, or pushes after user confirmation.

Install this if you are comfortable letting the agent inspect your current Git diffs and run user-confirmed git add, commit, and optional push commands. Review the generated commit message and staged files carefully, especially when secrets or environment files appear in the changes.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (8)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · skill.md (reported line 71)May include surrounding context.

md
| 文件类型 | 风险 | 示例 |
|----------|------|------|
| 环境变量 | 🔴 | `.env`, `.env.local`, `.env.production` |
| 凭证文件 | 🔴 | `credentials`, `credentials.json`, `service-account.json` |
| 私钥证书 | 🔴 | `*.pem`, `*.key`, `*.p12`, `id_rsa`, `id_ed25519` |
| AWS 配置 | 🔴 | `.aws/credentials`, `aws_config` |
| 数据库配置 | 🔴 | `database.yml`, `config.json`(含密码) |

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · skill.md (reported line 73)May include surrounding context.

md
| 环境变量 | 🔴 | `.env`, `.env.local`, `.env.production` |
| 凭证文件 | 🔴 | `credentials`, `credentials.json`, `service-account.json` |
| 私钥证书 | 🔴 | `*.pem`, `*.key`, `*.p12`, `id_rsa`, `id_ed25519` |
| AWS 配置 | 🔴 | `.aws/credentials`, `aws_config` |
| 数据库配置 | 🔴 | `database.yml`, `config.json`(含密码) |
| Git 凭证 | 🔴 | `.git-credentials`, `.git-creds` |
| 其他敏感 | 🟡 | `*password*`, `*secret*`, `*token*`(文件名) |

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · skill.md (reported line 75)May include surrounding context.

md
| 私钥证书 | 🔴 | `*.pem`, `*.key`, `*.p12`, `id_rsa`, `id_ed25519` |
| AWS 配置 | 🔴 | `.aws/credentials`, `aws_config` |
| 数据库配置 | 🔴 | `database.yml`, `config.json`(含密码) |
| Git 凭证 | 🔴 | `.git-credentials`, `.git-creds` |
| 其他敏感 | 🟡 | `*password*`, `*secret*`, `*token*`(文件名) |

#### 敏感代码模式检查

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · skill.md (reported line 105)May include surrounding context.

md
⚠️ 警告:检测到可能的敏感信息

【检测到的内容】
- 文件:.env
- 改动:DB_PASSWORD=MyPassword123

【风险】

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · skill.md (reported line 117)May include surrounding context.

md
⚠️ 警告:检测到可能的敏感信息

【检测到的内容】
- 文件:.env
- 改动:DB_PASSWORD=MyPassword123

【风险】

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · skill.md (reported line 116)May include surrounding context.

md
【建议操作】
1. 确认此文件是否已添加到 .gitignore
2. 如未添加,执行:echo ".env" >> .gitignore
3. 移除已暂存:git reset .env
4. 使用环境变量或密钥管理服务

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill's natural-language instructions, prompts, and examples are all in Chinese, which effectively forces a specific language for users. The file does not provide opt-in, alternative language support, or a documented reason that the skill is intended only for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This reference file is written entirely in Chinese, beginning with the title on L001, and does not indicate that language selection is optional or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.