Back to skill

Security audit

WiseDiag-Skin

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says by uploading a chosen skin photo to WiseDiag, but it should be reviewed because it handles sensitive health images and can write reports outside its advertised output folder.

Install only if you are comfortable sending skin photos and related questions to WiseDiag's cloud service. Prefer a temporary environment variable for the API key, verify WiseDiag's privacy policy independently, avoid passing untrusted --name or --output values, and consider pinning dependencies plus constraining output filenames before broader 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/skin.py:193
Finding

User-Controlled Output Name Allows File Creation Outside the Designated Directory

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded Dependency Version Prevents Reproducible and Reviewed Installations

Content
View full analysis
=2.28.0 ``` The documented installation command consumes this open-ended requirement: ```bash pip install -r requirements.txt ``` ### Technical Analysis The lower-bound-only constraint permits any current or future version of `requests` that satisfies `>=2.28.0`. It also allows dependency resolution to select changing versions of transitive packages. As a result, installations are not reproducible and can change without modifications to the audited repository. A future compromised, malicious, or behaviorally incompatible dependency release could be installed before the project has reviewed it. No evidence of a currently malicious `requests` release or an unsafe package index was identified; the issue is the absence of version and integrity controls. Python packages and their installation metadata execute within the installing user's environment. Dependency compromise can therefore affect installation or runtime with the same privileges as that user. ### Attack Path 1. A user follows the documented installation instruction: ```bash pip install -r requirements.txt ``` 2. The package resolver selects the latest available version satisfying `requests>=2.28.0`, along with compatible transitive dependencies. 3. A selected release may not be the version originally reviewed during the skill audit. 4. If a future direct or transitive dependency release is compromised, its installation or runtime code executes with the installing user's privileges. 5. The compromised component could access data available to the process, including environment variables, local files supplied to the skill, and network resources. ### Impact Assessment There is no evidence of active dependency compromise in the audited project. The immediate impact is non-reproduci ...[truncated 429 chars]
Remediation
View remediation
\ --hash=sha256: ``` All required transitive dependencies must also be included with exact versions and hashes for `--require-hashes` to provide complete integrity enforcement. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (7)

Tainted flow: 'headers' from os.environ.get (line 96, 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/skin.py (reported line 134)May include surrounding context.

python
request_part = ("request", (None, json.dumps(request_data, ensure_ascii=False), "application/json"))
            file_part = ("files", (p.name, fh, _mime(p.name)))

            with requests.post(
                url, headers=headers, files=[request_part, file_part],
                stream=True, timeout=REQUEST_TIMEOUT,
            ) as resp:

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

Temporary (current terminal session)

export WISEDIAG_API_KEY=your_api_key_here

Permanent (add to ~/.zshrc or ~/.bashrc)

echo 'export WISEDIAG_API_KEY=your_api_key_here' >> ~/.zshrc source ~/.zshrc

text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises capabilities that include reading environment variables, writing files, and making network requests, but it does not declare an explicit tool scope such as permissions or allowed-tools. This creates an authorization and transparency gap: an agent may invoke the skill without clear restrictions, while the skill can exfiltrate local image data and use API credentials to contact an external service. In this context, the risk is heightened because the skill handles sensitive medical images and sends them to a remote cloud endpoint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The request payload hard-codes the language field to "zh", which enforces a specific locale regardless of user preference. The file does not offer a language choice or explain that the tool is intentionally limited to Chinese-only operation, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill uploads a user-selected local skin image to an external medical AI API, but the code provides no explicit consent or privacy warning at the point of transmission. Because skin photos may contain sensitive health information and metadata, users may not realize that local files are leaving the device and being processed by a third party.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified as requests>=2.28.0, which allows any newer version to be installed and makes builds non-reproducible. This can unintentionally pull in vulnerable or breaking releases over time, and in a skill that uploads local image data to an external AI service, dependency drift increases supply-chain and reliability risk.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

The manifest does not pin the requests version, so it is impossible to verify whether the installed package includes fixes for known advisories affecting some releases. In this skill context, the package will likely handle outbound HTTP requests for image upload/analysis, so using an affected version could expose request metadata, credentials, or TLS verification behavior depending on the runtime-resolved release.

Content

No source excerpt is available for this finding.