Back to skill

Security audit

Env Diff Explainer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local, read-only-style report generator for environment/config review, with some overbroad generic audit code but no evidence of hidden execution, network exfiltration, persistence, or destructive behavior.

Install this only if you are comfortable giving it the specific config files or directories you choose. Prefer running it on a narrow copied or sanitized config set, since reports may include file paths, internal URLs, and partially masked secret-like values. Do not expect it to perform a full semantic dev/staging/prod diff without additional review.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个面向环境配置差异分析的专用技能,核心应是比较 dev/staging/prod 配置并解释业务风险。但代码实际实现的是一个由 spec 驱动的通用报告器/审计器:可扫描目录、读取 CSV、执行模式匹配、检查 Skill 工程结构,或仅把输入文本重组为模板化报告。代码中没有看到针对多环境配置文件的差异比较逻辑、环境间基线比对、配置键级别 diff、或把配置差异翻译成业务风险的明确规则。虽然 pattern_report 会对疑似 secret 做掩码,未明显违反“不输出敏感密钥值”,但这只是附带安全处理,不足以支撑声明的主要用途。故描述与实际行为存在明显不一致,且代码具备若干未声明的通用审计能力。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script supports multiple generic audit modes in build_report, including directory, CSV, pattern, and skill-package auditing, which materially exceeds the declared purpose of comparing environment/config differences and translating them into business risk. This scope expansion increases the chance the skill is used to inventory unrelated repositories or inspect arbitrary local content, creating capability drift and unexpected data exposure in a context where users may trust the narrower description.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger examples are broad, natural-language phrases that could match ordinary user conversation rather than clearly signaling use of this specific skill. In agentic systems with automatic skill routing, this can cause over-invocation of the skill on unrelated inputs, potentially exposing configuration content to unnecessary processing or producing misleading environment-risk analysis when the user did not explicitly request it.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all user-facing content in a single language and does not indicate that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises executable capability via python3 and references local files/templates, but it does not declare any explicit tool scope such as allowed tools or permissions. That ambiguity can cause an agent runtime to grant broader-than-necessary read/write/shell access, increasing the chance of unintended file access or command execution. In this context, the danger is elevated because the skill processes environment/config data, which often contains secrets or sensitive infrastructure details.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description forces a mixed Chinese/English presentation style in the skill definition rather than explicitly letting the user choose their preferred language or locale. Under the language/locale policy, fixed language behavior without opt-in can be a policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire example output is presented only in Chinese, and the file does not indicate that language selection is optional or constrained by a region-specific requirement. Under the 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
94% confidence
Finding

The title, summary, section names, use cases, examples, and risk text are all specified only in Chinese, which indicates the skill is designed around a single language/locale. The file does not mention user opt-in, language selection, or a documented region-specific justification, so this appears to violate the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The generated report strings are hard-coded in Chinese, such as '结果', '摘要', and follow-up guidance, which forces a specific language regardless of user preference. The file provides no option to choose output language or document a justified locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Directory report content, section labels, and review guidance are emitted only in Chinese. Because the script accepts generic inputs and does not expose any locale opt-in, this is a natural-language policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The CSV reporting path emits headings and analysis prompts only in Chinese, such as '数据报告' and '字段概览'. There is no user-facing mechanism to select another language or acknowledge the locale limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The pattern_report function implements generic secret- and risky-command scanning over arbitrary files or directories, which is not justified by the env-diff explainer purpose. Even though matched secrets are partially masked, the tool still enumerates potentially sensitive findings and can be repurposed to search local content for tokens, internal URLs, and operationally sensitive snippets.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The pattern audit output uses Chinese-only natural-language strings for findings and remediation guidance. Since the script otherwise appears to be a general-purpose local support tool, forcing one language without user choice violates the language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Frontmatter error messages and audit section text are emitted only in Chinese, including missing/invalid notices and repair guidance. The script does not offer any locale selection or explicit Chinese-only scoping.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill_audit function performs generic package compliance auditing against a skill directory structure, unrelated to environment diff analysis. This broadens the tool into a repository/package inspector that can reveal project structure and metadata unexpectedly, undermining the principle of least functionality for a narrowly described skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire smoke test is written only in Chinese, including headings, instructions, and acceptance criteria, with no indication that language choice is optional or that the skill is region-specific. This can violate language/locale policy requirements when a skill implicitly mandates a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file presents the skill input and requirements entirely in Chinese, and it does not indicate that the language is optional or region-specific. Under the policy criteria, forcing a specific language without user 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
92% confidence
Finding

The markdown template presents all user-facing headings and instructions in Chinese and does not indicate that another language can be selected. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code creates parent directories and writes rendered output to the supplied path, but there is no confirmation prompt and no prior disclosure in comments or docstrings about the file-write side effect. While the --output flag implies writing, the safety-critical file modification behavior is not explicitly warned about in this file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.