Back to skill

Security audit

社媒营销图片套组|Social Carousel Campaign

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent AI image-generation helper that uploads user-selected images and prompts to AI Hive, with no evidence of hidden persistence, account takeover, destructive behavior, or unrelated data access.

Install only if you are comfortable sending selected marketing images, prompts, and task metadata to AI Hive. Prefer using an environment variable or a secure secret manager instead of typing the API key directly in the command line, and consider installing dependencies in a dedicated virtual environment with pinned versions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:134
Finding

API Key Exposure Through Command-Line Arguments

Content
View full analysis
``` ```python save = commands.add_parser("auth", help="保存 AI Hive API Key") save.add_argument("--api-key", required=True) save.set_defaults(handler=auth) ``` The credential is subsequently written to a local configuration file: ```python def auth(args): if not args.api_key.startswith("sk-api-") or len(args.api_key) < 20: raise SystemExit("API Key 格式错误,应为完整的 sk-api-*") CONFIG.parent.mkdir(parents=True, exist_ok=True) CONFIG.write_text( json.dumps({"api_key": args.api_key}, indent=2), encoding="utf-8" ) CONFIG.chmod(0o600) print("已安全写入", CONFIG) ``` ### Technical Analysis The documented authentication procedure requires users to supply the AI Hive API key directly through the `--api-key` command-line argument. Command-line secrets can be recorded in shell history, terminal session logs, audit records, or process-monitoring systems. On systems where process arguments are visible to other local users, the key may also be observable while the command is running. The saved configuration file is appropriately changed to permission mode `0600`, which limits subsequent file access. However, this does not protect the credential during its initial entry through the command line. The existing support for the `AI_HIVE_API_KEY` environment variable also does not eliminate the risk because the insecure command remains the documented authentication workflow. ### Attack Path 1. A user follows the documented `auth --api-key ...` command. 2. The complete API key is included in the process argument lis ...[truncated 940 chars]
Remediation
View remediation
` example from `SKILL.md`. 5. If environment-variable authentication remains supported, document its potential exposure boundaries and recommend short-lived, least-privileged credentials. 6. Preserve the existing `0600` file permissions as defense in depth, and create the file securely with restrictive permissions from the outset rather than correcting permissions only after writing. 7. Recommend rotating any key previously entered through the documented command if shell history or process logs may have been retained. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:134
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs users to run local Python commands, install dependencies, read local files, and make outbound network requests, but it does not declare any explicit tool/permission scope. That mismatch increases the risk that an agent or reviewer will underestimate the skill's actual capabilities, especially since it handles API keys, uploads user-specified images, and invokes shell-accessible scripts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script transmits user-provided source images and generated prompt content to a third-party API and also downloads results from external URLs, but it does not provide a clear upfront disclosure or confirmation step about this data transfer. In a marketing workflow, source images may contain product mockups, internal campaign assets, faces, or other sensitive business content, so silent transmission to an external service can create privacy, confidentiality, and compliance risks even if the network transport uses HTTPS.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The example API key value uses Chinese placeholder text ("请替换为你的APIKey"), which imposes a specific language in user-facing configuration content. There is no indication that the skill is region-specific or that alternative locales are supported, so this appears to violate the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and user-visible error/help strings are written in Chinese, and there is no indication that users can opt into another language. This can violate language or locale policy when a skill imposes a specific language by default without user choice or documented regional scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.