Back to skill

Security audit

Secret Exposure Gate

Security checks for vulnerabilities and agentic risk

Overview

This skill is not destructive or exfiltrating, but its secret-scan gate is under-scoped enough that users could rely on incomplete results before publishing sensitive files.

Review before installing if you intend to use this as a release blocker. It appears locally scoped and non-destructive, but treat its results as a lightweight heuristic, not a complete secret scanner; run a dedicated secret-scanning tool before publishing important repositories or packages.

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
scripts/run.py:33
Finding

Incomplete File Coverage and Narrow Secret Detection Can Produce False-Negative Security Reports

Content
View full analysis
= limit: break if path.is_file(): if path.suffix.lower() in {".md",".txt",".json",".yaml",".yml",".py",".js",".ts",".csv",".tsv",".sh"}: results.append(path) return results ``` ```python PATTERNS = { "curl_pipe_bash": r"curl\s+[^|]+\|\s*(bash|sh)", "dangerous_rm": r"\brm\s+-rf\s+(/|\*|~|\.{1,2})", "base64_exec": r"base64\s+(-d|--decode).+\|\s*(bash|sh|python)", "secret_like": r"(api[_-]?key|token|secret|password)\s*[:=]\s*['\"]?[A-Za-z0-9_\-]{8,}", "private_url": r"https?://[^/\s]+/(admin|internal|private|secret)", } def pattern_report(spec: dict, path: Path, limit: int) -> str: targets = [path] if path.is_file() else list_text_files(path, limit=limit) findings = [] for target in targets: text = read_text(target) for name, pattern in PATTERNS.items(): for match in re.finditer(pattern, text, flags=re.IGNORECASE): snippet = match.group(0) if "secret_like" == name: snippet = re.sub(r"([A-Za-z0-9_\-]{4})[A-Za-z0-9_\-]+", r"\1***", snippet) findings.append((str(target), name, snippet[:160])) ``` ### Technical Analysis The Skill is presented as a pre-publication secret-exposure gate, but directory scanning only examines files whose suffix appears in a narrow allowlist. This excludes several common locations and formats for sensitive material, including: - `.env` and related environment files - Extensionless files such as `credentials` - Private keys stored in `.pem` or `.key` files - Certificate and keystore formats - ...[truncated 2443 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose is a narrow, safety-sensitive secret exposure gate, but the finding indicates broader and different behaviors, including generic directory inspection, CSV auditing, spec-driven mode switching, and only limited hardcoded secret detection. In a security gate context, this is dangerous because users may trust it as a release blocker while it misses actual secrets or performs unrelated analysis, creating a false sense of protection.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The dispatcher enables multiple generic analysis and reporting modes far beyond the declared purpose of a secrets-only preflight gate. In this skill context, overbroad capabilities increase the chance the tool is used to inspect, summarize, or package unrelated repository contents, violating least privilege and making accidental data exposure or misuse more likely.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

该 README 的触发部分只给出“发布前帮我扫一遍目录里有没有密钥”“检查 token 和私有 URL”等自然语言示例,但未说明是否必须限定在发布前、目录扫描场景,或哪些类似表述不应触发。尤其“检查 token 和私有 URL”范围较宽,容易与一般性安全咨询或代码审查请求重叠。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all user-facing audit content in Chinese and does not mention any option to choose another language or locale. Under the policy for natural-language violations, forcing a specific language without user opt-in is in scope.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises execution of a local Python script via shell and implies access to input/output files, but it does not declare any explicit tool scope such as allowed-tools or permissions. This weakens policy enforcement and reviewability, because an invoking agent may grant broader shell or filesystem access than users expect for a supposedly read-only preflight secret scan.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill’s manifest description and all operating instructions are written in Chinese, and the file does not indicate that output language should follow the user’s preference or provide any opt-in choice. Under the language/locale policy, a skill should not implicitly force a specific language unless that constraint is documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The user-facing title, category label, summary, examples, and risk text are all written in Chinese, indicating the skill is presented in a fixed language. The file does not offer a language/locale option or justify that the skill is intended only for a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This function converts arbitrary input text into a structured report, which is unrelated to detecting secrets and expands the skill into a general-purpose summarizer. In a preflight secret-check skill, that creates unnecessary data handling and could reformat sensitive input into new outputs, increasing exposure surface.

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 in make_structured_report are hard-coded in Chinese, which imposes a specific language on all users. The file provides no opt-in, locale selection, or justification that this skill is region-specific, so this is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The directory report enumerates files, extensions, and Markdown headings instead of focusing on secrets. For a secret-exposure gate, this broad content inspection can leak repository structure and document titles while providing functionality outside the declared security purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The directory_report function emits headings and guidance exclusively in Chinese. Because the script does not let the user select language and does not document a justified regional constraint, this violates the language/locale policy rule.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

CSV schema and uniqueness analysis is unrelated to secret detection and processes arbitrary dataset content under a security-branded skill. That mismatch can encourage users to feed sensitive business data into a tool that should only perform narrow preflight secret checks.

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_report function formats all user-visible report text in Chinese only. This enforces a specific language for all users without opt-in or documented need, matching the policy-violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The pattern_report function returns user-facing content exclusively in Chinese. There is no mechanism for user language preference or documented justification for this locale restriction, so it is a policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Skill packaging and frontmatter compliance checks are outside the manifested purpose of secret exposure prevention. Bundling these capabilities into the same script broadens access and output in ways that are not justified by the skill's declared security role.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The parse_frontmatter error messages and skill_audit report sections are written only in Chinese. Since the script exposes these messages directly to users and offers no language preference controls or justification, this is 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
95% confidence
Finding

The entire example output is written in Chinese, and the file provides no indication that language selection is optional or tied to a documented region-specific requirement. This can violate a language/locale policy when users are not offered opt-in or alternative language support.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown template is entirely written in Chinese and labels itself as an output template, which implies the skill may require responses in a specific language. The file does not mention any user language preference, opt-in, or locale-specific justification, so it may violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file uses only Chinese for headings and instructions, which can impose a specific language on users without any visible opt-in or justification. Under the policy rule for natural-language constraints, this is a language/locale restriction that should be either optional or explicitly documented as required.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.