Back to skill

Security audit

eric-compliance-suite

Security checks for vulnerabilities and agentic risk

Overview

This looks like a legitimate ERiC compliance API wrapper, but it needs review because it can upload product data/images, fetch arbitrary URLs, and install a Python dependency at runtime.

Install only if you are comfortable sending selected product titles, descriptions, images, and your ERiC token to the ERiC SaaS service. Avoid using image URLs from untrusted sources; prefer approved local image files, and do not submit confidential, unreleased, regulated, or customer-sensitive material unless your organization has approved the vendor and data handling. Run it in a controlled Python environment with requests preinstalled from a trusted, pinned source, and treat P005/P006 as remote account-configuration changes.

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/detect.py:123
Finding
Unrestricted Image URL Retrieval Enables Server-Side Request Forgery and Data Disclosure## Vulnerability Details **File Location**: `scripts/detect.py`, lines 123-128 **Vulnerability Type**: Server-Side Request Forgery (SSRF) and unintended data transmission **Risk Level**: Medium ### Vulnerable Code ```python if source.startswith(("http://", "https://")): requests = ensure_requests() try: resp = requests.get(source, timeout=30, headers={"User-Agent": "Mozilla/5.0"}) resp.raise_for_status() return base64.b64encode(resp.content).decode() except Exception as e: print(f"错误: 下载图片失败: {e}") sys.exit(1) ``` The returned content is later included in requests to the external ERiC service by image-based commands, including D001, L001, C001, and P001. ### Technical Analysis The image loader treats any user-supplied HTTP or HTTPS URL as a valid image source. It does not: - Restrict requests to HTTPS. - Resolve and reject loopback, private, link-local, reserved, or multicast addresses. - Revalidate destinations after HTTP redirects. - Verify that the response has an image content type. - Validate the downloaded file format. - Apply a maximum response-size limit. - Stream the response with a bounded read. Consequently, the process can be induced to request URLs that are accessible from the Agent's network environment but inaccessible to an external attacker. Potential destinations include localhost services, private-network systems, and cloud instance metadata endpoints. The fetched response is base64-encoded and, during normal execution of an image-based detection command, sent to the declared third-party API at `https://saas.eric-bot.com`. Base64 encoding itself is required by the documented API and is not covert behavior, but in combination with unrestricted URL retrieval it can transmit content obtained from unintended internal destinations. ### Attack Path 1. An attacker supplies, or causes an Agent to use, an internal URL as the image argument to `d001`, `l001`, `c001`, or `p001`. 2. `load_imag ...[truncated 1264 chars]
Remediation
## Remediation Suggestions 1. Prefer local image files and disable URL retrieval unless it is essential. 2. If URLs must be supported, accept HTTPS only. 3. Parse and canonicalize the URL before use. 4. Resolve all destination addresses and reject: - Loopback ranges. - Private address ranges. - Link-local ranges. - Reserved and multicast ranges. - IPv4-mapped IPv6 representations of restricted addresses. 5. Disable redirects or manually follow them while repeating destination validation for every redirect. 6. Stream responses and enforce a strict maximum download size. 7. Require an approved image MIME type and validate file signatures after download. 8. Consider an explicit hostname allowlist. 9. Separate URL fetching from API submission and obtain explicit user confirmation before sending remotely retrieved content to a third party.

T08 · Insecure Dependencies

Warning
Location
scripts/detect.py:92
Finding
Automatic Runtime Installation of an Unpinned Dependency Creates a Supply-Chain Execution Risk## Vulnerability Details **File Location**: `scripts/detect.py`, lines 92-104 **Vulnerability Type**: Unpinned runtime dependency installation **Risk Level**: Medium ### Vulnerable Code ```python def ensure_requests(): try: import requests return requests except ImportError: import subprocess print("正在安装 requests...") subprocess.run( [sys.executable, "-m", "pip", "install", "requests", "-q"], check=True, capture_output=True ) import requests return requests ``` ### Technical Analysis When `requests` is unavailable, the Skill invokes pip during normal execution and installs the package without a version constraint or integrity hash. The source is determined by the runtime environment's pip configuration, including configured indexes, mirrors, proxies, and trusted-host settings. This expands the effective executable code beyond the reviewed project. A compromised package repository, attacker-controlled package mirror, or manipulated pip configuration could cause malicious installation or import-time code to execute. Even without an active attacker, resolving the latest available version makes builds non-reproducible and can introduce unexpected behavior after the Skill has been audited. Although the package name is the legitimate `requests` name rather than an apparent typosquat, automatically downloading and installing mutable third-party code at runtime remains an unnecessary supply-chain risk. ### Attack Path 1. The Skill runs in an environment where `requests` is not installed. 2. The environment has a malicious or compromised pip index, mirror, proxy, or package source. 3. `ensure_requests()` invokes `python -m pip install requests -q`. 4. Pip downloads and installs an artifact that was not pinned or verified by the project. 5. Package installation hooks or subsequent import-time logic execute with the privileges of the Skill process. 6. Malici ...[truncated 735 chars]
Remediation
## Remediation Suggestions 1. Remove automatic package installation from runtime code. 2. Declare `requests` in a dependency manifest and lock it to an approved exact version. 3. Use integrity hashes, such as a hash-locked requirements file generated with a trusted dependency-management tool. 4. Install dependencies during an explicit deployment or setup phase from an approved package index. 5. Fail safely with a clear error message if the dependency is absent. 6. Use an isolated virtual environment with restricted write permissions. 7. Audit direct and transitive dependencies and update them through a controlled review process. 8. In higher-assurance deployments, use a vetted internal package mirror and signed or otherwise verified artifacts.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (40)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill documents use of environment variables, shell commands, and outbound API calls, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this can lead to overbroad access at runtime, making accidental secret exposure, unintended command execution, or unrestricted network use more likely if the skill is invoked or extended unsafely.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The activation condition says the skill should trigger for essentially any intellectual-property or e-commerce compliance review request, which is very broad. Overbroad triggering can cause the agent to invoke a networked, billable skill unexpectedly, send user data to an external service without sufficient intent confirmation, and expose the ERIC_API_TOKEN-backed capability more often than necessary.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The natural-language instructions and metadata are presented in Chinese, but the file does not state that the skill is China-specific or offer users a language/locale option. This can violate language/locale policy expectations when users have not opted into Chinese output or documentation.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The documentation instructs users to transmit base64-encoded image content and an API token to an external SaaS endpoint, but it provides no privacy, retention, or data-handling disclosure. In a compliance-related skill, users may submit sensitive product images or proprietary materials, so the omission can lead to uninformed disclosure of confidential or personal data to a third party.

External Transmission

Medium
Category
Data Exfiltration
Content
IMG_B64=$(base64 -w 0 /path/to/image.png)
fi

curl -s -X POST "https://saas.eric-bot.com/v1.0/eric-api/copyright/v1/detection" \
  -H "Content-Type: application/json" \
  -H "Token: ${ERIC_API_TOKEN}" \
  -d "$(cat <<EOF
Confidence
84% confidence
Finding
The shell example uses curl to send a base64-encoded local image and API token to an external SaaS endpoint. This creates an explicit outbound data-transfer mechanism; in the context of IP/compliance checking, the uploaded images may contain confidential designs, customer data, or other sensitive material, making undisclosed transfer risky.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/copyright/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={"img_64lis": [img_b64], "top_number": 100, "enable_radar": False},
Confidence
78% confidence
Finding
This duplicate finding points to the same Python call site where image data and a bearer-like token are transmitted externally. The security concern is not code execution but undisclosed outbound transfer of potentially sensitive content to a remote API, which is more significant in a compliance-analysis workflow because users may assume local-only processing.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/copyright/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={"img_64lis": [img_b64], "top_number": 100, "enable_radar": False},
Confidence
78% confidence
Finding
This duplicate finding points to the same Python call site where image data and a bearer-like token are transmitted externally. The security concern is not code execution but undisclosed outbound transfer of potentially sensitive content to a remote API, which is more significant in a compliance-analysis workflow because users may assume local-only processing.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The examples show users base64-encoding a local image and sending it, along with product metadata, to an external SaaS endpoint, but the documentation does not clearly warn that potentially sensitive product images and descriptions leave the local environment. In a compliance/IP-review skill, users may upload unreleased product assets, so lack of explicit disclosure can lead to unintentional data exposure and privacy/commercial confidentiality risk.

External Transmission

Medium
Category
Data Exfiltration
Content
IMG_B64=$(base64 -w 0 /path/to/image.png)
fi

curl -s -X POST "https://saas.eric-bot.com/v1.0/eric-api/patent/design/v1/detection" \
  -H "Content-Type: application/json" \
  -H "Token: ${ERIC_API_TOKEN}" \
  -d "$(cat <<EOF
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/patent/design/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The document instructs users to send product titles and detailed product descriptions to a third-party SaaS endpoint, but it provides no explicit warning that potentially sensitive business data will leave the local environment. In a compliance/IP-review workflow, those inputs may include unreleased product information, making silent external transmission a real privacy and confidentiality risk.

External Transmission

Medium
Category
Data Exfiltration
Content
exit 1
fi

curl -s -X POST "https://saas.eric-bot.com/v1.0/eric-api/patent/utility/v1/detection" \
  -H "Content-Type: application/json" \
  -H "Token: ${ERIC_API_TOKEN}" \
  -d '{
Confidence
84% confidence
Finding
The shell example uses curl to transmit product details and an API token to an external SaaS endpoint. Although this is core functionality rather than overtly malicious behavior, it is still a true security/privacy concern because the documentation encourages outbound sharing of potentially proprietary product data without an explicit warning or safe-handling guidance.

External Transmission

Medium
Category
Data Exfiltration
Content
print("错误:请先设置 ERIC_API_TOKEN 环境变量", file=sys.stderr)
    sys.exit(1)

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/patent/utility/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
78% confidence
Finding
This duplicate external-transmission finding is substantively valid for the same reason: the code sends product content and credentials to a third-party API. In the skill context, users may paste confidential product descriptions for patent screening, so the lack of explicit privacy/security framing increases the chance of accidental data disclosure.

External Transmission

Medium
Category
Data Exfiltration
Content
print("错误:请先设置 ERIC_API_TOKEN 环境变量", file=sys.stderr)
    sys.exit(1)

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/patent/utility/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
78% confidence
Finding
This duplicate external-transmission finding is substantively valid for the same reason: the code sends product content and credentials to a third-party API. In the skill context, users may paste confidential product descriptions for patent screening, so the lack of explicit privacy/security framing increases the chance of accidental data disclosure.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation explicitly instructs users to transmit base64-encoded images and an API token to an external service, but it provides no warning about privacy, retention, third-party processing, or handling of potentially sensitive uploaded content. In a compliance-analysis skill, users may submit logos, product images, or other proprietary material, so omission of data-handling guidance increases the risk of unintentional disclosure and misuse.

External Transmission

Medium
Category
Data Exfiltration
Content
IMG_B64=$(base64 -w 0 /path/to/image.png)
fi

curl -s -X POST "https://saas.eric-bot.com/v1.0/eric-api/trademark/graphic/v1/detection" \
  -H "Content-Type: application/json" \
  -H "Token: ${ERIC_API_TOKEN}" \
  -d "$(cat <<EOF
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/trademark/graphic/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/trademark/graphic/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/trademark/graphic/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The examples and API reference instruct users to send product titles, descriptions, and potentially images to a third-party external service, but they do not clearly warn about the data-transfer/privacy implications at the point of use. This can cause inadvertent exfiltration of sensitive product content, customer data, or unreleased IP to an external vendor without informed consent or internal approval.

External Transmission

Medium
Category
Data Exfiltration
Content
IMG_B64=$(base64 -w 0 /path/to/image.png)
fi

curl -s -X POST "https://saas.eric-bot.com/v1.0/eric-api/policy-compliance/v1/gun-parts-search" \
  -H "Content-Type: application/json" \
  -H "Token: ${ERIC_API_TOKEN}" \
  -d "{\"base64_image\": \"${IMG_B64}\", \"type\": [\"gun_parts\"]}"
Confidence
93% confidence
Finding
The shell example posts a base64-encoded local image and API token to an external service. In the context of a compliance-detection integration this is expected behavior, but it is still security-relevant because it can leak confidential product imagery or other sensitive material to a remote processor if users treat the example as harmless local analysis.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/policy-compliance/v1/gun-parts-search",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={"base64_image": img_b64, "type": ["gun_parts"]},
Confidence
90% confidence
Finding
This duplicate finding points to the same Python example that uploads base64-encoded image content to an external endpoint. The risk is not malicious code execution, but external transmission of potentially sensitive files and credentials without prominent contextual warning.

External Transmission

Medium
Category
Data Exfiltration
Content
with open("/path/to/image.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/policy-compliance/v1/gun-parts-search",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={"base64_image": img_b64, "type": ["gun_parts"]},
Confidence
90% confidence
Finding
This duplicate finding points to the same Python example that uploads base64-encoded image content to an external endpoint. The risk is not malicious code execution, but external transmission of potentially sensitive files and credentials without prominent contextual warning.

External Transmission

Medium
Category
Data Exfiltration
Content
print("错误:请先设置 ERIC_API_TOKEN 环境变量", file=sys.stderr)
    sys.exit(1)

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/policy-compliance/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
90% confidence
Finding
This duplicate finding points to the same Python example that sends product text to an external API. The transmission is functionally expected for this skill, but still represents a real exposure path for confidential content if users are not adequately warned.

External Transmission

Medium
Category
Data Exfiltration
Content
print("错误:请先设置 ERIC_API_TOKEN 环境变量", file=sys.stderr)
    sys.exit(1)

resp = requests.post(
    "https://saas.eric-bot.com/v1.0/eric-api/policy-compliance/v1/detection",
    headers={"Content-Type": "application/json", "Token": os.environ["ERIC_API_TOKEN"]},
    json={
Confidence
90% confidence
Finding
This duplicate finding points to the same Python example that sends product text to an external API. The transmission is functionally expected for this skill, but still represents a real exposure path for confidential content if users are not adequately warned.

Static analysis

No suspicious patterns detected.