Back to skill

Security audit

sn-image-base

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it needs review because one backend disables model safety thresholds and the package includes risky transport and dependency choices.

Install only if you trust the publisher and understand that prompts, images, and API keys may be sent to configured external providers. Avoid using --insecure, pin dependencies in your deployment, restrict provider base URLs where possible, and review or remove the Nano Banana safetySettings override before allowing upper-layer skills to call it automatically.

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)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned third-party dependencies permit uncontrolled supply-chain drift

Content
View full analysis

Vulnerability Details

File Location: requirements.txt, lines 1-3
Vulnerability Type: Unpinned dependency versions
Risk Level: Medium

Vulnerable Code

text
httpx>=0.25.0
pillow>=11.3.0
python-dotenv>=1.0.0

Technical Analysis

The installation instructions direct users to install these dependencies with pip install -r requirements.txt, but every dependency uses only an open-ended minimum version. Consequently, two installations performed at different times can resolve to materially different package versions.

No malicious or misspelled package was identified in the reviewed dependency list. Nevertheless, the absence of exact versions and integrity hashes means that package behavior can change after the Skill has been audited. A compromised upstream release, malicious maintainer update, or newly introduced vulnerable release could be selected automatically during a future installation.

This is particularly relevant because:

  • httpx processes API keys, prompts, images, proxy settings, and remote responses.
  • python-dotenv reads credential-bearing environment files.
  • Pillow parses attacker-influenced or remotely downloaded image data.
  • Dependencies installed through pip execute Python package build and installation logic with the permissions of the installing user.

Attack Path

  1. An attacker compromises an upstream package account, release process, distribution artifact, or transitive dependency.
  2. The attacker publishes a version satisfying the unrestricted lower-bound constraint.
  3. A user or deployment environment runs pip install -r requirements.txt.
  4. The resolver selects the compromised or vulnerable release because no upper bound, lock file, or hash restricts it.
  5. Malicious installation logic can execute during installation, or malicious runtime logic can execute when the Skill imports the package.

This attack requires compromise or malicious modificat ...[truncated 873 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin every direct and transitive dependency to an exact reviewed version.
  2. Generate a lock file using a tool such as pip-tools, Poetry, or uv.
  3. Require package hashes during installation, for example with pip install --require-hashes.
  4. Separate human-maintained input requirements from a fully resolved deployment lock file.
  5. Use automated dependency scanning and controlled update reviews before changing pinned versions.
  6. Install dependencies in an isolated virtual environment or container under a non-privileged account.
  7. Avoid source distributions in production where practical, or build and verify wheels in a trusted build pipeline.
  8. Document a reproducible update process that includes vulnerability scanning, tests, and review of dependency provenance.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sn_agent_runner.py:259
Finding

Optional TLS verification bypass exposes API credentials and user content to interception

Content
View full analysis

Vulnerability Details

File Location: scripts/sn_agent_runner.py, lines 259-266
Vulnerability Type: Disabled TLS certificate verification
Risk Level: Medium

Vulnerable Code

The image-generation client derives TLS verification directly from the user-controlled --insecure option:

python
client = SensenovaText2ImageClient(
    api_key=api_key,
    base_url=base_url,
    model=global_configs.SN_IMAGE_GEN_MODEL,
    timeout=args.timeout,
    ssl_verify=not args.insecure,
)

The corresponding command-line option is exposed as:

python
gen_parser.add_argument(
    "--insecure", action="store_true", help="Disable TLS verification"
)

The image-editing path implements the same behavior when constructing its client.

Technical Analysis

TLS verification is enabled by default, so ordinary invocations are not affected. However, passing --insecure sets ssl_verify to False, which is forwarded to the underlying HTTP transport.

Certificate verification provides authentication of the remote API endpoint. Disabling it allows a network-positioned attacker to present an arbitrary certificate and impersonate the configured image provider. Requests include a bearer API key and potentially sensitive prompts or local image content.

Supporting custom providers does not inherently require disabling certificate verification. A private certificate authority can instead be supplied through a trusted CA bundle. The unrestricted bypass therefore grants more network trust than is necessary for the declared image-generation and image-editing functionality.

Attack Path

  1. A user, wrapper, or upper-layer Skill invokes image generation or image editing with --insecure, commonly to work around a certificate configuration error.
  2. The victim is connected through a malicious network, compromised proxy, hostile DNS resolver, or attacker-controlled routing path.
  3. The attacker intercep ...[truncated 1286 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the --insecure option from normal user-facing operation.
  2. Support a --ca-bundle option for private or enterprise certificate authorities instead of disabling verification.
  3. If the bypass must remain for diagnostics, require an additional explicit acknowledgement and emit a prominent warning before transmitting credentials.
  4. Reject --insecure in non-interactive, agent-driven, or production execution modes.
  5. Restrict provider base URLs to HTTPS when API credentials are transmitted.
  6. Consider an allowlist of approved provider hostnames for agent-managed deployments.
  7. Ensure redirects cannot forward authorization headers to a different origin.
  8. Add automated tests confirming that certificate validation is enabled by default and that production configuration cannot disable it.
  9. Rotate any API key used over a connection where verification was disabled if interception is suspected.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (61)

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.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill is a low-level multimodal/LLM API wrapper for image generation, recognition, and text optimization, with no preprocessing and only backend service invocation. The supplied code does none of that. It implements a local helper script for recovering JSON from noisy text input, including stripping markdown fences and scanning for balanced JSON objects/arrays. There are no calls to image generation, VLM, LLM, or any backend services at all. This is a materially different primary purpose and capability set, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/sn_image_base/configs.py (reported line 22)May include surrounding context.

python
warnings.warn("python-dotenv is not installed, `.env` files will be ignored", stacklevel=2)
        return
    # Priorities:
    # 1. ".env" in the agent's config directory:
    #    - openclaw: ~/.openclaw/.env
    #    - hermes: ~/.openclaw/.env
    # 2. ".env" in current working directory. (depends on how the agent runs the skill)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/sn_image_base/configs.py (reported line 25)May include surrounding context.

python
warnings.warn("python-dotenv is not installed, `.env` files will be ignored", stacklevel=2)
        return
    # Priorities:
    # 1. ".env" in the agent's config directory:
    #    - openclaw: ~/.openclaw/.env
    #    - hermes: ~/.openclaw/.env
    # 2. ".env" in current working directory. (depends on how the agent runs the skill)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/sn_image_base/configs.py (reported line 37)May include surrounding context.

python
warnings.warn("python-dotenv is not installed, `.env` files will be ignored", stacklevel=2)
        return
    # Priorities:
    # 1. ".env" in the agent's config directory:
    #    - openclaw: ~/.openclaw/.env
    #    - hermes: ~/.openclaw/.env
    # 2. ".env" in current working directory. (depends on how the agent runs the skill)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/sn_image_base/configs.py (reported line 23)May include surrounding context.

python
return
    # Priorities:
    # 1. ".env" in the agent's config directory:
    #    - openclaw: ~/.openclaw/.env
    #    - hermes: ~/.openclaw/.env
    # 2. ".env" in current working directory. (depends on how the agent runs the skill)
    # 3. Environment variables

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/sn_image_base/configs.py (reported line 24)May include surrounding context.

python
return
    # Priorities:
    # 1. ".env" in the agent's config directory:
    #    - openclaw: ~/.openclaw/.env
    #    - hermes: ~/.openclaw/.env
    # 2. ".env" in current working directory. (depends on how the agent runs the skill)
    # 3. Environment variables

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The request payload explicitly turns harm-category safety thresholds OFF for harassment, hate speech, sexually explicit, and dangerous content. In a low-level backend skill, this creates a direct mechanism to bypass provider-side moderation and enables downstream skills to generate prohibited or unsafe content with minimal friction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This code deliberately disables multiple model safety filters in the outbound request, materially weakening abuse prevention for generated content. Because this is a reusable base-layer client, the unsafe default propagates to any higher-level feature that depends on it, increasing systemic abuse risk.

Content

No source excerpt is available for this finding.

Ssd 1

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Semantically disabling safety filters for several harm categories meaningfully increases the chance that the model will return abusive, sexual, hateful, or dangerous outputs. Given the skill is a base-layer API wrapper rather than a narrowly controlled red-team or research tool, this unsafe configuration is more dangerous because it broadens impact across all dependent skills.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 119)May include surrounding context.

md
# For Google's Nano Banana model API
    SN_IMAGE_GEN_BASE_URL="https://generativelanguage.googleapis.com"
    # For OpenAI's image generation API
    SN_IMAGE_GEN_BASE_URL="https://api.openai.com/v1"
    ```

3. Set `SN_IMAGE_GEN_MODEL` to the model name provided by the model type. For example:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 193)May include surrounding context.

md
# For Google's Nano Banana model API
    SN_IMAGE_GEN_BASE_URL="https://generativelanguage.googleapis.com"
    # For OpenAI's image generation API
    SN_IMAGE_GEN_BASE_URL="https://api.openai.com/v1"
    ```

3. Set `SN_IMAGE_GEN_MODEL` to the model name provided by the model type. For example:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README_CN.md (reported line 121)May include surrounding context.

md
# For Google's Nano Banana model API
    SN_IMAGE_GEN_BASE_URL="https://generativelanguage.googleapis.com"
    # For OpenAI's image generation API
    SN_IMAGE_GEN_BASE_URL="https://api.openai.com/v1"
    ```

3. Set `SN_IMAGE_GEN_MODEL` to the model name provided by the model type. For example:

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README_CN.md (reported line 192)May include surrounding context.

md
# For Google's Nano Banana model API
    SN_IMAGE_GEN_BASE_URL="https://generativelanguage.googleapis.com"
    # For OpenAI's image generation API
    SN_IMAGE_GEN_BASE_URL="https://api.openai.com/v1"
    ```

3. Set `SN_IMAGE_GEN_MODEL` to the model name provided by the model type. For example:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly documents that image, vision, and text requests are sent to third-party model providers, but it does not clearly warn operators that prompts, images, and possibly sensitive metadata may leave the local environment and be processed by external services. Because this is a base-layer, non-user-facing skill intended to be called by higher-layer skills, the missing disclosure is more dangerous: upstream authors may unknowingly route sensitive data to external providers without adding their own privacy guardrails.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 191)May include surrounding context.

md
# (默认)用于 [SenseNova](https://platform.sensenova.cn/)
    SN_CHAT_BASE_URL="https://token.sensenova.cn/v1"
    # 用于 Anthropic Messages API
    SN_CHAT_BASE_URL="https://api.anthropic.com/v1"
    # 用于 OpenAI Chat Completion API
    SN_CHAT_BASE_URL="https://api.openai.com/v1"
    # 用于 Google Gemini API(OpenAI 兼容)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README_CN.md (reported line 190)May include surrounding context.

md
# (默认)用于 [SenseNova](https://platform.sensenova.cn/)
    SN_CHAT_BASE_URL="https://token.sensenova.cn/v1"
    # 用于 Anthropic Messages API
    SN_CHAT_BASE_URL="https://api.anthropic.com/v1"
    # 用于 OpenAI Chat Completion API
    SN_CHAT_BASE_URL="https://api.openai.com/v1"
    # 用于 Google Gemini API(OpenAI 兼容)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 222)May include surrounding context.

md
# (默认)用于 [SenseNova](https://platform.sensenova.cn/)
    SN_CHAT_BASE_URL="https://token.sensenova.cn/v1"
    # 用于 Anthropic Messages API
    SN_CHAT_BASE_URL="https://api.anthropic.com/v1"
    # 用于 OpenAI Chat Completion API
    SN_CHAT_BASE_URL="https://api.openai.com/v1"
    # 用于 Google Gemini API(OpenAI 兼容)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 224)May include surrounding context.

md
# (默认)用于 [SenseNova](https://platform.sensenova.cn/)
    SN_CHAT_BASE_URL="https://token.sensenova.cn/v1"
    # 用于 Anthropic Messages API
    SN_CHAT_BASE_URL="https://api.anthropic.com/v1"
    # 用于 OpenAI Chat Completion API
    SN_CHAT_BASE_URL="https://api.openai.com/v1"
    # 用于 Google Gemini API(OpenAI 兼容)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill exposes capabilities to read environment variables, read/write files, and access the network, yet the manifest does not declare any tool scope or permission boundaries. In a non-user-facing infrastructure skill that forwards prompts, images, and credentials to backends, missing explicit scope increases the chance that upper-layer agents invoke powerful operations without review or least-privilege constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly sends prompts and images to backend services but does not warn operators that potentially sensitive inputs leave the local environment. Because this is a base-layer skill intended for reuse by upper layers, the omission can propagate unsafe assumptions and lead to inadvertent disclosure of confidential text or images to third-party endpoints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Documenting an --insecure option without a strong warning normalizes disabling TLS certificate verification for API calls that may carry prompts, images, and API keys. If used on hostile or intercepted networks, this enables man-in-the-middle attacks, credential theft, and tampering with model responses or generated content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The spec exposes an --insecure flag that disables TLS verification but does not warn that this permits man-in-the-middle attacks, endpoint impersonation, and leakage of API keys and request contents. Because this skill sends prompts, images, and credentials to remote services, documenting insecure transport without a strong warning makes unsafe deployment and copy-paste usage more likely.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
README_CN.md:45

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
README.md:45