Back to skill

Security audit

compliance-archive-claw

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent local compliance-archive tool, but its script has serious input-handling flaws that could corrupt archive records or write files outside the intended archive directory.

Review this skill before installing. It does not show exfiltration or hidden persistence, but it should not be used on important compliance files until SQL inputs are parameterized, document types are allowlisted to fixed directories, file overwrites are prevented, archive permissions are tightened, and obsolete-version changes require an explicit preview and confirmation.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/archive-document.sh:80
Finding

SQL Injection Through Unsafely Interpolated Command-Line Arguments

Content
View full analysis
= '$start_date'" [[ -n "$end_date" ]] && where="$where AND effective_date <= '$end_da ...[truncated 3067 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/archive-document.sh:89
Finding

Directory Traversal and File Overwrite Through Unvalidated Document Type

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad, generic business terms such as '归档文件', '查询制度', and '版本管理', which could cause the skill to activate in routine conversations that were not intended to invoke archival actions. In this skill’s context, unintended activation is more dangerous because the capability includes state-changing operations like archive, update-version, and marking older versions obsolete, increasing the chance of accidental records modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill documents automatic invalidation of old versions when a new version is archived, but does not present this as a destructive metadata change requiring explicit, contextual warning and confirmation. In a compliance archive, incorrectly marking a prior policy or legal document as obsolete can create audit, legal, and operational risk by corrupting the authoritative record or making active documents appear invalid.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill supports '全文检索索引' for archived legal/regulatory documents, which implies indexing document text. However, the FTS table is created only for archive_no, name, and keywords, and the archive flow never extracts or stores file contents, so searches operate on metadata rather than document full text.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest lists '归档通知推送' as a core capability, suggesting that archiving or updates trigger some outbound notification. The script only writes to SQLite, copies files, and prints local console output; there is no email, webhook, message queue, or other notification mechanism in code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script copies potentially sensitive compliance and legal documents into a persistent local archive directory under $HOME without any permission hardening, consent prompt, or disclosure at execution time. In a compliance-document context, this increases the risk of unintended retention and local disclosure to other users, backups, sync agents, or processes that can access the archive path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The entire skill file is written only in Chinese and does not state that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Comments, status values, output messages, and type matching are all written in Chinese, and the script does not offer any language or locale selection. This creates a language policy concern because users are forced into one locale without opt-in or justification in the file.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest explicitly lists '标记废止' as a supported scenario/capability. In the actual CLI entrypoint, there is no dedicated command to mark an arbitrary document obsolete; obsolescence only happens indirectly during archive or limited version update flows.

Content

No source excerpt is available for this finding.