Back to skill

Security audit

Image To Data

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent, but its sample analysis code can return fabricated construction, progress, and safety results without actually inspecting the image.

Review this skill carefully before installing. Its permissions are generally aligned with AI image analysis, but do not rely on the included Python sample code for real construction, safety, compliance, progress, or reporting decisions unless the simulated routines are replaced with validated image-processing backends and outputs are clearly marked with provenance and uncertainty. Redact sensitive project, personnel, and drawing details where possible before sending images to external vision APIs.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:115
Finding

Image Analysis APIs Return Fabricated Results Without Inspecting Input Images

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:115-147, SKILL.md:221-243, SKILL.md:286-305, SKILL.md:330-352
Vulnerability Type: Deterministic fabricated image-analysis and safety results
Risk Level: High

Vulnerable Code

Simulated OCR results (SKILL.md:115-147)

python
def extract_text(
    self,
    image_data: bytes,
    language: str = "en"
) -> List[TextRegion]:
    """Extract text from image"""
    # Simulated OCR extraction (use actual OCR library in production)
    # In production: pytesseract, EasyOCR, or cloud OCR services

    regions = []

    # Simulate detecting title block in drawing
    regions.append(TextRegion(
        text="PROJECT: OFFICE BUILDING",
        bbox=BoundingBox(x=100, y=50, width=300, height=30, confidence=0.95),
        confidence=0.95,
        language=language
    ))

    regions.append(TextRegion(
        text="DRAWING: A-101",
        bbox=BoundingBox(x=100, y=90, width=200, height=25, confidence=0.92),
        confidence=0.92,
        language=language
    ))

    regions.append(TextRegion(
        text="SCALE: 1:100",
        bbox=BoundingBox(x=100, y=120, width=150, height=20, confidence=0.88),
        confidence=0.88,
        language=language
    ))

    return regions

Simulated object and PPE detections (SKILL.md:221-243)

python
def detect(
    self,
    image_data: bytes,
    confidence_threshold: float = 0.5
) -> List[DetectedObject]:
    """Detect objects in image"""
    # Simulated detection (use actual model in production)
    # In production: YOLO, Faster R-CNN, etc.

    detected = []

    # Simulate detected objects
    sample_detections = [
        ("worker", 0.92, BoundingBox(200, 300, 80, 180, 0.92)),
        ("hard_hat", 0.88, BoundingBox(210, 300, 30, 25, 0.88)),
        ("safety_vest", 0.85, BoundingBox(210, 340, 60, 80, 0.85)),
        ("scaffolding", 0.78, BoundingBox(400, 100, 200, 400, 0.78)),
        ("concrete_block", 0.72, BoundingBox(50, 450, 1
...[truncated 4690 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace every simulated routine with an actual validated OCR, object-detection, table-extraction, or image-segmentation implementation before production use.
  2. If the implementation is intended only as an example, move it into clearly identified test or example code and prevent it from being exposed as a functional production API.
  3. Introduce an explicit mock-mode setting that is disabled by default. Synthetic results must include an unmistakable marker such as "synthetic": true and must never be represented as observations.
  4. In the absence of a configured analysis backend, fail closed with a clear error such as NotImplementedError rather than returning fabricated data.
  5. Validate that image input is non-empty, decodable, within supported size limits, and in an allowed format before analysis.
  6. Derive confidence scores exclusively from the configured analysis backend. Do not hardcode values that imply evidentiary certainty.
  7. Treat safety and progress conclusions as advisory. Include model version, processing provenance, uncertainty, and manual-review requirements in each result.
  8. Add automated tests proving that:
    • blank and corrupted images are rejected;
    • materially different images do not produce identical findings;
    • PPE compliance cannot be reported without image-derived worker and PPE associations;
    • progress measurements require valid visual evidence;
    • simulated data cannot be emitted when production mode is enabled.
  9. Require human verification before safety findings or progress estimates are used for compliance, reporting, or operational decisions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill processes site photos, scanned documents, and drawings, which may contain sensitive visual data, personal information, proprietary plans, or safety-relevant records, yet it provides no privacy, retention, or handling guidance. This can lead users to submit sensitive content without informed consent, redaction, or access controls, increasing the risk of unintended disclosure or noncompliant data processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The examples and data model default OCR text handling to English via language: str = "en", while the skill documentation does not explain this default or tell users they can choose another language. This creates a mild language/locale policy concern because the skill behavior is biased toward a specific language without clear opt-in in the natural-language documentation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest description focuses on extracting data from site photos, scanned documents, and drawings using AI vision. The detect_safety_compliance capability goes beyond extraction into evaluative compliance checking, which is a distinct operational purpose rather than a necessary implementation detail of data extraction.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest describes extracting data from images and analyzing photos/documents/drawings, which supports OCR and object detection. However, progress measurement and especially comparison against a plan introduce higher-level project monitoring and conformance analysis that exceed straightforward data extraction semantics.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

analyze_site_photo packages object detection together with progress estimation and safety compliance results. This presents the skill as a broader construction assessment tool, while the manifest frames it primarily as an image-to-data extraction skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.