Back to skill

Security audit

cc-insider

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only Claude Code internals skill, with no executable installer or hidden runtime behavior, but some security examples should not be copied blindly.

Install only if you want Chinese Claude Code internals notes. Treat the Tool permission examples as explanatory, not secure templates: new tools should use explicit permission checks, accurate destructive/read-only classification, meaningful classifier input, and user confirmation for state-changing actions.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
references/tool-internals.md:35
Finding

Fail-Open Permission Defaults in Recommended Tool Implementations

Content
View full analysis
true, isConcurrencySafe: (_input) => false, // Default: disallow concurrency isReadOnly: (_input) => false, // Default: may modify state isDestructive: (_input) => false, // Default: not destructive checkPermissions: (input, ctx) => ({ behavior: 'allow', updatedInput: input }), toAutoClassifierInput: (_input) => '', // Default: excluded from security classifier userFacingName: (_input) => '', // Default to name } ``` The recommended minimal Tool implementation repeats the unconditional authorization pattern: ```typescript checkPermissions: async (input, context) => { return { behavior: 'allow', updatedInput: input } }, ``` The Skill also instructs developers that permission behavior defaults to approval: ```text 5. checkPermissions() — Permission logic, default allow 6. toAutoClassifierInput() — Security classification, default empty string ``` ### Technical Analysis The Skill describes the Tool defaults as “Fail-Closed,” but the documented authorization behavior is fail-open: - `checkPermissions()` unconditionally returns `behavior: 'allow'`. - `isDestructive()` defaults to `false`, even when a Tool may perform destructive operations. - `toAutoClassifierInput()` defaults to an empty string, preventing useful input from reaching the security classifier. - The example implementation encourages developers to copy unconditional authorization into new Tools. `isConcurrencySafe: false` only serializes execution. It does not deny unauthorized actions, request user confirmation, restrict resources, or classif ...[truncated 1691 chars]
Remediation
View remediation
({ behavior: 'prompt', message: 'This Tool may modify state. Approve this operation?' }) ``` 2. Require every state-changing Tool to implement explicit, operation-specific authorization rather than inheriting a generic approval default. 3. Validate and constrain all security-sensitive arguments, including file paths, commands, resource identifiers, destinations, and operation types. 4. Implement `isDestructive()` accurately for deletion, overwrite, publication, privilege, and other difficult-to-reverse operations. 5. Supply meaningful, normalized content through `toAutoClassifierInput()` so the security classifier can assess the actual operation and target. 6. Make documentation examples genuinely read-only, or include scoped permission checks that demonstrate least privilege and user confirmation. 7. Replace the inaccurate “Fail-Closed” description. Clearly distinguish concurrency serialization from authorization enforcement. 8. Add tests confirming that: - Unrecognized operations are denied. - Destructive operations require explicit approval. - Attacker-controlled paths and commands cannot escape their permitted scope. - Empty classifier input is rejected for security-sensitive Tools. - Permission checks cannot be bypassed through modified or internally derived input. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (26)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/design-highlights.md (reported line 48)May include surrounding context.

text
排查步骤:
1. 检查 ~/.claude/settings.json 中的 rules 配置
2. 检查 Hook 规则是否匹配(glob 模式)
3. 复合命令会 split 逐子命令匹配
4. 检查 sed _simulatedSedEdit 是否被 omit(安全关键)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
65% 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 · references/patterns.md (reported line 203)May include surrounding context.

md
# 执行动作要谨慎
需要确认的危险操作:
- 破坏性操作:删除文件/分支、drop 数据库表、rm -rf
- 难逆转操作:force-push、git reset --hard、amend 已发布提交
- 影响他人的操作:push 代码、创建/关闭 PR、发消息
- 上传到第三方:先确认内容是否敏感

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill metadata and presentation are Chinese-only and do not indicate language negotiation or fallback to the user's language. This can cause misunderstanding of security-relevant guidance, permissions, or architecture explanations when auto-activated for users who did not request Chinese, reducing transparency and increasing the chance of operator error.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill states that automatic discovery can occur via broad matching on description/whenToUse without documenting meaningful constraints, exclusions, or negative examples. Overbroad auto-activation can cause the skill to be invoked in unrelated conversations, which increases prompt-surface exposure and can lead to irrelevant architectural guidance overriding user intent or contaminating task selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document is written entirely in Chinese and provides no indication that other languages are supported or that the language choice is optional. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

文件标题和全文均以中文撰写,没有说明这是特定地区/团队限定文档,也没有提供其他语言选项。根据规则,若技能或文档强制特定语言而未提供用户选择或合理依据,属于自然语言层面的语言/区域策略违规。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The file is written as a skill reference headed in Chinese ("Coordinator 多 Agent 协调") and consistently presents operational guidance only in Chinese. For a general coordinator skill reference, this effectively enforces a specific language/locale without opt-in or justification, which matches the policy's language/locale violation criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire guidance document is written in Chinese and presents the skill format, implementation checklist, and operating principles only in that language. There is no indication that users may choose another language or that the locale restriction is intentional and justified for a region-specific audience.

Content

No source excerpt is available for this finding.