Back to skill

Security audit

reCamera Intellisense

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed reCamera control tool, but its automatic device discovery can expose bearer tokens over unverified or plaintext transports without explicit user approval.

Install only if you own and administer the target reCamera devices. Prefer explicitly registering devices with a known protocol instead of relying on zero-config discovery with RECAMERA_TOKEN, and avoid using tokens over HTTP or unverified TLS except on a trusted LAN. Treat ~/.recamera/devices.json and exported config tarballs as sensitive, and require explicit approval before storage, delete, reboot, app lifecycle, GPIO, or model-switching actions.

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
scripts/recamera_intellisense/device.py:74
Finding

Automatic Device Discovery Exposes Bearer Tokens over Unauthenticated Transports

Content
View full analysis

Vulnerability Details

File Location: scripts/recamera_intellisense/device.py, lines 74–81 and 105–145
Vulnerability Type: Credential exposure through automatic insecure transport fallback
Risk Level: High

Vulnerable Code

python
if use_tls:
    if allow_unsecured:
        ctx = _http.insecure_ssl_context(host)
    else:
        import ssl

        ctx = ssl.create_default_context()
    conn: http.client.HTTPConnection = http.client.HTTPSConnection(
        connect_host, port, timeout=timeout, context=ctx
    )
else:
    conn = http.client.HTTPConnection(connect_host, port, timeout=timeout)
headers = {"Host": host_header}
if token:
    headers["Authorization"] = token
python
def detect_local_device(
    host: str,
    port: Optional[int] = None,
    *,
    token: str = "",
    timeout: float = _DEFAULT_PROBE_TIMEOUT,
) -> Optional[Dict[str, Any]]:
    """Probe *host* for a reCamera HTTP/HTTPS API.

    Tries HTTPS (validated), HTTPS (self-signed), then HTTP. Returns `None`
    if no reachable API is found. Auth failures count as "detected".
    """
    _config.validate_host(host)
    _config.validate_token(token)
    host = host.strip()
    token = token.strip() or ""
    if port is not None:
        port = int(port)
        if not 1 <= port <= 65535:
            raise ValueError(f"Port {port} out of range.")
    timeout = float(timeout)
    if timeout <= 0:
        raise ValueError("timeout must be positive.")

    probes = [
        ("https", port or 443, False),
        ("https", port or 443, True),
        ("http", port or 80, False),
    ]
    for protocol, probe_port, allow_unsecured in probes:
        if (
            _probe(
                host,
                probe_port,
                token,
                use_tls=(protocol == "https"),
                allow_unsecured=allow_unsecured,
                timeout=timeout,
                auth_error_is_reachable=True,
            )
            is None
        ):
          
...[truncated 2797 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not attach credentials during unauthenticated discovery. Perform initial reachability and protocol detection without the bearer token.
  2. Remove automatic insecure fallback when a token is present. If verified HTTPS fails, stop and require an explicit user decision before attempting unverified TLS or HTTP.
  3. Add an explicit insecure-transport option. Introduce an allow_unsecured parameter that defaults to false, and require it for both certificate-verification bypass and plaintext HTTP.
  4. Prefer authenticated transport selection. Select and verify the endpoint first, then transmit the token only after the transport and server identity have been established.
  5. Prohibit plaintext credential transmission by default. Refuse HTTP discovery with a non-empty token unless the user explicitly authorizes it for a trusted network.
  6. Avoid persisting insecure discovery results silently. Before saving a profile discovered through unverified TLS or HTTP, require explicit approval and clearly identify the selected protocol and associated credential risk.
  7. Separate detection from authentication. A safe design is:
    • Probe supported protocols without credentials.
    • Return the detected candidates to the caller.
    • Have the caller explicitly select a transport.
    • Authenticate only over the selected, authorized transport.
  8. Add regression tests confirming that tokens are never included in requests made over plaintext HTTP or certificate-unverified TLS unless an explicit insecure option is enabled.
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The supplied code is clearly focused on reCamera App Center administration, not the declared primary functions like onboarding devices, AI model selection, rule/trigger configuration, event polling, media capture, recording browsing, storage management, or GPIO control. While it is still within the general reCamera ecosystem, these app-management capabilities are not disclosed in the description. This is a material description/behavior mismatch because the code exposes a different operational surface—installed app inspection and lifecycle control—than the declared camera/AI workflow features.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
97% confidence
Finding

This CLI intentionally supports reading argument values from local files via the @path syntax and from stdin via @- in _load_at_value(). In an agent skill context, that creates an ambient local file read capability that is not reflected in the declared permissions, so a user or chained workflow could cause the skill to ingest secrets or arbitrary host files and then transmit them to devices or return them in output.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_write' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger guidance is very broad: it says to invoke whenever the user mentions reCamera or a registered reCamera device, including related workflow requests. That can cause the agent to invoke a high-privilege skill in ambiguous conversational contexts, exposing capabilities such as device administration, storage formatting, file retrieval, GPIO control, and network access earlier than necessary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The package exports app lifecycle control and log access functions that go beyond the user-facing skill description centered on onboarding, detection, recording, and GPIO workflows. In an agent setting, this capability mismatch is dangerous because hidden or undisclosed administrative actions can be invoked by downstream tooling or prompts, increasing the attack surface and enabling service disruption or exposure of sensitive operational logs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The SDK exposes a reboot_device capability that is not disclosed in the skill description, creating an undisclosed device-administration primitive. In this context, an agent or prompt injection that reaches the skill could cause denial of service, interrupt recording/detection pipelines, or disrupt physical security workflows by rebooting cameras unexpectedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes onboarding reCamera devices, selecting detection models, configuring triggers, polling events, capturing media, managing storage, and driving GPIO. This file adds management of arbitrary on-device applications via App Center, including starting, stopping, and restarting apps, which is a broader device-administration capability not described in the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The reference states that export_device_config downloads a full device configuration tarball to a local output path, which affects local user data and filesystem state. Although it notes overwrite protection, this section does not explicitly warn about handling sensitive exported configuration contents or local storage implications.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The top-level docstring frames the package as a stdlib-only SDK sharing a device registry file, but the module actually aggregates many high-impact control functions including app management, file deletion, storage tasks, relay control, and reboot. This is not just incomplete API listing; it creates a materially narrower impression of intent than the code’s exported capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The function performs a state-changing POST to switch the active acoustic inference head on a device, which can alter live system behavior. While the docstring describes the action, there is no user-facing confirmation, logging, or explicit warning around this change in the code path itself.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
73% confidence
Finding

The module documentation narrows scope by saying new app building is another skill’s domain, implying this module is limited to passive listing/logs. However, the code also exposes start, stop, and restart operations for installed apps, which expands from observation into active app control.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest does not mention inspecting application logs; it frames the skill around camera control, detection, event polling, capture, recordings, storage, and GPIO. Fetching recent logs for installed apps is operational introspection beyond that stated purpose.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.insecure_tls_verification

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/recamera_intellisense/_http.py:19