Back to skill

Security audit

Grs Image

Security checks for vulnerabilities and agentic risk

Overview

This image-generation skill mostly matches its stated purpose, but it needs review because it trusts a remote API to choose an arbitrary download URL and sends user prompts or reference images to a third-party service.

Review before installing. Use a dedicated low-privilege GrsAI API key, avoid submitting confidential prompts or reference images, install dependencies in a virtual environment, and consider adding URL allowlisting, response size limits, content-type checks, and pinned dependency versions before regular use.

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
scripts/grs_image.py:114
Finding

Unvalidated API-Controlled Image URL Enables Server-Side Request Forgery and Unbounded Downloads

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:11
Finding

Unpinned Third-Party Dependency Installation Creates a Mutable Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Tainted flow: 'headers' from os.environ.get (line 34, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/grs_image.py (reported line 59)May include surrounding context.

python
try:
        # 发起请求(API返回SSE流,逐行解析)
        response = requests.post(
            f"{BASE_URL}/v1/draw/nano-banana",
            headers=headers,
            json=payload,

Tainted flow: 'headers' from os.environ.get (line 34, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/grs_image.py (reported line 93)May include surrounding context.

python
for i in range(60):  # 最多等120秒
            time.sleep(2)
            
            result_resp = requests.post(
                result_url,
                headers=headers,
                json={"id": task_id},

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documentation indicates use of environment variables for API credentials and outbound network access to third-party endpoints, but it does not declare any corresponding tool scope or permissions. This creates a least-privilege violation: an agent or runner may grant broader capabilities implicitly, making secret access and external exfiltration harder to review and control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script sends user prompts and optional reference image URLs/Base64 data to a third-party API but does not provide an explicit privacy or data-sharing warning at runtime. In this skill context, users may submit sensitive design images or proprietary text, so silent transmission to an external provider creates a real privacy and data-governance risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/grs_image.py (reported line 59)May include surrounding context.

python
try:
        # 发起请求(API返回SSE流,逐行解析)
        response = requests.post(
            f"{BASE_URL}/v1/draw/nano-banana",
            headers=headers,
            json=payload,

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/grs_image.py (reported line 93)May include surrounding context.

python
for i in range(60):  # 最多等120秒
            time.sleep(2)
            
            result_resp = requests.post(
                result_url,
                headers=headers,
                json={"id": task_id},

Tainted flow: 'image_url' from requests.post (line 114, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
90% confidence
Finding

The script downloads image_url returned by the remote API without validating the scheme, host, or content type. If the upstream service is compromised or returns unexpected URLs, the client could be induced to fetch arbitrary resources, enabling SSRF-like behavior from the user's machine or downloading malicious/unexpected content.

Content

Scanner excerpt · scripts/grs_image.py (reported line 118)May include surrounding context.

python
print(f"\n图片URL: {image_url}")
                    
                    # 下载图片
                    img_resp = requests.get(image_url, timeout=60)
                    with open(output_path, "wb") as f:
                        f.write(img_resp.content)
                    print(f"已保存: {output_path}")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The docstring, error messages, status output, and argument descriptions are all written exclusively in Chinese. This imposes a language choice on users without offering an alternative or documenting that the skill is intended only for a Chinese-speaking audience.

Content

No source excerpt is available for this finding.