Back to skill

Security audit

集群编码器(专业版)

Security checks for vulnerabilities and agentic risk

Overview

This is a coding automation skill with disclosed write and exec use, but it under-specifies automatic rollback, external callbacks, and credential handling enough to require Review before installation.

Review this skill before installing it in a real repository. Use it only on a dedicated branch with clean backups, disable or confirm any automatic rollback/git-reset behavior, do not place API keys in ~/.swarm/credentials/ unless you add strict local protections, and only use callback URLs you explicitly trust.

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
SKILL.md:796
Finding

Insecure API Key Storage Guidance

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 796–799
Vulnerability Type: Insecure plaintext credential storage guidance
Risk Level: Medium

Vulnerable Code Snippet:

markdown
### API Key 配置
- 本地存储功能无需额外API Key
- 并行调度与成本追踪使用Agent平台内置LLM
- 所有API Key通过环境变量配置,禁止硬编码
- 建议将API Key存储在`~/.swarm/credentials/`目录(已gitignore)

Technical Analysis

The Skill recommends storing API keys in the predictable ~/.swarm/credentials/ directory without requiring restrictive file permissions, encryption, an operating-system keychain, or an Agent-platform secret manager. It also states that the directory is protected by Git ignore rules, but the audited project contains no .gitignore file or setup command that creates and verifies such protection.

The guidance is internally ambiguous because it first requires environment-variable configuration and then recommends filesystem storage. Environment variables may be populated from a credential file, but the Skill does not define a secure loading mechanism or safeguards for that file. Git ignore rules would only reduce accidental repository commits; they would not prevent access by other local users, compromised processes, backup software, indexing services, or tools with home-directory read access.

Attack Path

  1. A user follows the Skill's recommendation and writes an API key under ~/.swarm/credentials/.
  2. The credential directory or file is created with default permissions that permit access beyond the owning user, or it is collected by backup or indexing software.
  3. A malicious local user, compromised process, or Agent tool with home-directory access searches the documented, predictable path.
  4. The attacker reads and extracts the plaintext API key.
  5. The attacker reuses the key against the associated service until the credential is revoked or expires.

Impact Assessment

Successful exploitation can disclose API credentials and grant the ...[truncated 462 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prefer the Agent platform's managed secret store, an operating-system keychain, or a dedicated secret-management service.
  2. Remove the unsupported claim that the directory is already protected by Git ignore rules.
  3. If file-based storage is unavoidable:
    • Create the credential directory with mode 0700.
    • Create each credential file with mode 0600.
    • Verify ownership and permissions before reading a key.
    • Store one clearly identified secret per file and never print its value.
    • Prevent credentials from appearing in logs, reports, prompts, command history, or generated artifacts.
  4. Add and verify explicit ignore rules for credential files where repository-local configuration is supported. Clarify that Git ignore rules do not provide confidentiality.
  5. Document credential rotation, revocation, expiration, and least-scope requirements.
  6. Make the configuration guidance unambiguous by specifying how a managed secret or protected file is securely loaded into the required environment variable.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill accepts a callback URL for asynchronous notifications without warning that data may be transmitted to an external endpoint. In practice, this can enable unreviewed exfiltration of task metadata, outputs, or potentially sensitive code-related information if an attacker supplies or influences the callback destination.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill describes automatic file modification, checkpointing, and rollback behavior but does not clearly warn users that local code and repository state may be changed automatically. Because the skill has write and exec tools, this omission can lead to unintended code changes, git operations, or loss of uncommitted work under the guise of automation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill scope is defined using broad scenario keywords instead of strict triggers, boundaries, or allowed actions. In a skill with read/write/exec capabilities, vague scope increases the chance that an agent will over-apply the skill to loosely related prompts and perform high-impact actions outside the user's intended task.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states its scope is limited to the documented core capabilities, but the error-handling section instructs the agent to perform network connectivity checks and inspect firewall/proxy settings. This expands behavior beyond the declared scope and can lead an agent with exec access to run unanticipated diagnostic commands or probe the local environment without explicit user consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The license section explicitly lists "完全中文化表达,适配中文用户工作流," indicating a forced Chinese-language orientation. Because the document does not offer language selection or explain a necessary region-specific restriction, this appears to violate the language/locale choice policy.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

该段文档先将能力描述为无需额外 API Key 的本地功能,但紧接着又把“所有 API Key”作为该 skill 的配置前提并建议本地保存凭据。虽然不一定表示代码会读取凭据,但文档层面已对 skill 是否需要密钥形成相互矛盾的意图表述。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.