Back to skill

Security audit

git-repo-repair

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it reports deletion of the Git index despite a stated no-deletion boundary, and coverage is partial.

Review the skill’s backup and index-rebuild steps before installing, especially how they handle backup failure and preserve staged work. The scan is incomplete: two local references were missing, so the available results do not establish that all referenced material was assessed.

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

md
理由:旧 `.git/index` 里的 `cache-tree` 是重建丢失的树的**唯一依据**。

4. **先接引用,再重建索引(顺序不可反)**
   `git update-ref refs/heads/<branch> <完整的父提交>` → `rm .git/index && git read-tree HEAD`
   注意:索引里含失效 blob 时 `git reset --mixed HEAD` 会报 `unable to read <sha>` 而失败,必须删索引重读。

5. **重建缺失 blob 与丢失的树**

L28 explicitly deletes `.git/index`, contradicting the L71 boundary that no files inside `.git` are deleted.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The workflow explicitly deletes .git/index despite its stated no-deletion boundary, potentially causing an agent to perform an operation outside the promised recovery safeguards. Although a backup is prescribed, the instructions neither create the destination directory nor require successful backup verification before deletion; a failed backup could therefore leave staged-only state or useful recovery metadata unrecoverable.

Content

No source excerpt is available for this finding.