T09 · Insecure Skill Coding Practices
- Location
scripts/run_benchmark.py:183- Finding
Unrestricted PaddleOCR Endpoint Can Expose Image Data and Authentication Tokens
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This OCR benchmarking skill is mostly coherent, but it can upload user-selected images and an optional OCR token to cloud or arbitrary configured endpoints without strong disclosure or endpoint validation.
Review before installing if you may process sensitive documents, product images, personal data, or regulated content. Use only approved cloud providers and a trusted HTTPS PaddleOCR endpoint, avoid setting PADDLEOCR_TOKEN for untrusted destinations, and consider installing in an isolated virtual environment with pinned dependencies.
scripts/run_benchmark.py:183Unrestricted PaddleOCR Endpoint Can Expose Image Data and Authentication Tokens
requirements.txt:1Open-Ended Dependency Constraints Prevent Reproducible and Integrity-Verified Installation
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
img_b64 = base64.b64encode(f.read()).decode()
t0 = time.time()
resp = requests.post(
endpoint,
json={'image': img_b64},
headers={'Authorization': f'token {token}'} if token else {},
The skill documents capabilities that involve reading local files, writing results, accessing environment variables, and making outbound network requests to Bedrock, Google AI Studio, and an optional external PaddleOCR endpoint, but it does not declare any explicit tool scope or permissions. This creates a trust and containment gap: a user or platform may not have a clear, enforceable statement of what the skill is allowed to access, increasing the chance of over-broad file, secret, or network exposure.
The documentation explains setup and model usage but does not clearly warn that supplied images and extracted OCR content are transmitted to third-party services, including cloud model providers and a user-configured external PaddleOCR endpoint. Users may unknowingly send sensitive documents, packaging, or personal data off-device, creating privacy, confidentiality, and compliance risk in contexts where images contain regulated or proprietary information.
The script sends image data to Bedrock, Gemini, and optionally PaddleOCR, but it does not provide an explicit runtime warning or consent gate before transmitting potentially sensitive images off-host. In an OCR benchmarking context, users may process packaging, documents, or other images that contain confidential or regulated data, so silent external transmission creates a real privacy and compliance risk.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
img_b64 = base64.b64encode(f.read()).decode()
t0 = time.time()
resp = requests.post(
endpoint,
json={'image': img_b64},
headers={'Authorization': f'token {token}'} if token else {},
The dependency is specified with only a lower bound, which allows installation of any newer version, including versions with breaking changes or newly introduced security issues. While this file alone does not prove exploitation, unpinned dependencies reduce build reproducibility and increase supply-chain risk over time.
boto3>=1.34.0
google-genai>=1.0.0
python-pptx>=0.6.21
requests>=2.31.0
Using an unpinned version for google-genai means the environment may resolve to different package releases across installs. That creates a supply-chain and stability risk because a future release could introduce a vulnerable dependency, insecure behavior, or compatibility issue without any code change in the skill.
boto3>=1.34.0
google-genai>=1.0.0
python-pptx>=0.6.21
requests>=2.31.0
The python-pptx package is not pinned to a specific version, so installations are not reproducible and may silently pick up risky or incompatible releases. In a report-generation skill, this is mainly a supply-chain hygiene issue rather than an immediately exploitable flaw, but it is still a valid weakness.
boto3>=1.34.0
google-genai>=1.0.0
python-pptx>=0.6.21
requests>=2.31.0
Requests is declared with only a minimum version, so dependency resolution may select an affected release or a future release with undiscovered issues. Because this skill likely performs network operations against external APIs, an unsafe or vulnerable HTTP client can have more practical impact than a purely local library issue.
boto3>=1.34.0
google-genai>=1.0.0
python-pptx>=0.6.21
requests>=2.31.0
The manifest does not pin requests, and that package has multiple known advisories across historical versions, so it is impossible to verify from this file whether the installed version is safe. In a tool that communicates with cloud OCR providers over HTTP, uncertainty around the HTTP client version increases the chance of credential leakage, TLS/verification issues, or other request-handling weaknesses if an affected release is resolved.