T09 · Insecure Skill Coding Practices
- Location
scripts/_utils.sh:5- Finding
Environment-Controlled API Base Can Redirect Credentials, Tokens, and Documents
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a legitimate UNITH avatar-management skill, but it needs Review because credential-bearing API calls can be redirected by an undocumented environment override and token handling is too broad for the sensitivity involved.
Install only if you are comfortable giving the skill authority over your UNITH account and uploaded knowledge documents. Before use, unset or lock down API_BASE, consider disabling UNITH_TOKEN_CACHE or moving it to a private user-owned directory, avoid putting secrets in logged payloads or command-line fields, and require an explicit user confirmation that names the exact digital human before any delete operation.
scripts/_utils.sh:5Environment-Controlled API Base Can Redirect Credentials, Tokens, and Documents
scripts/auth.sh:45Predictable Shared Token Cache Allows Cache Poisoning and Unsafe File Replacement
scripts/update-head.sh:98Update Script Prints Credential-Bearing Payloads to Logs
references/embedding.md:38Embedding Guidance Executes an Unpinned Mutable Third-Party Script
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
---
## Delete a Digital Human — `DELETE /head/<headId>`
Permanently removes a digital human.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
Permanently removes a digital human.
DELETE /head/<headId>
Authorization: Bearer <token>
The skill instructs the agent to invoke multiple shell scripts and use tools like curl and jq, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap where an agent runtime may permit broader shell execution than intended, increasing the chance of command misuse, unintended external network access, or destructive operations like deletion through available scripts.
The document-upload instructions tell users to upload local files to the service via script or multipart API, but do not warn that uploaded documents may contain sensitive or regulated data. In an agent setting, this can lead to inadvertent exfiltration of private files to a third-party platform because the docs normalize file transmission without any privacy or data-handling caveats.
The documentation exposes a destructive delete endpoint and explicitly states it 'Permanently removes' a digital human, but provides no guidance about confirmation prompts, irreversible effects, or safeguards before invoking it. In an agent skill context, this omission increases the chance an LLM-driven workflow could delete resources from ambiguous or malicious user prompts without adequate human confirmation.
The embedding guidance explicitly requests camera and microphone permissions but does not instruct integrators to provide a user-facing privacy notice, consent flow, or justification for why those permissions are needed. In the context of a conversational avatar product, this can lead downstream adopters to deploy a widget that surprises users with access requests for sensitive sensors, increasing privacy, compliance, and trust risks.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
log_info "Authenticating with UNITH API as $UNITH_EMAIL..."
unith_curl -X POST "$API_BASE/auth/token" \
-H 'Content-Type: application/json' \
-H 'accept: application/json' \
-d "$(jq -n --arg e "$UNITH_EMAIL" --arg k "$UNITH_SECRET_KEY" '{email:$e, secretkey:$k}')"
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Write to cache
if [ -n "$TOKEN_CACHE" ]; then
printf '%s\t%s\t%s\n' "$UNITH_EMAIL" "$TOKEN" "$(date +%s)" > "$TOKEN_CACHE"
chmod 600 "$TOKEN_CACHE"
fi
log_ok "Authenticated successfully. Token stored in UNITH_TOKEN (valid 7 days)."
The script reads an arbitrary JSON payload and sends it directly to the UNITH API, and for voiceflow mode it explicitly requires a voiceflowApiKey inside that payload. This creates a real risk of transmitting third-party credentials or other sensitive fields without any explicit warning, redaction, or safer secret-handling path, which can lead to accidental disclosure to the remote service, shell history, or logs if users are not careful.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
PAYLOAD=$(cat "$PAYLOAD_FILE")
if ! unith_curl -X POST "$API_BASE/head/create" \
-H "Authorization: Bearer $UNITH_TOKEN" \
-H 'Content-Type: application/json' \
-H 'accept: application/json' \
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
#
# Usage:
# bash scripts/delete-head.sh <headId>
# bash scripts/delete-head.sh <headId> --confirm # skip confirmation prompt
set -euo pipefail
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
echo "Usage: $0 <headId> [--confirm]"
echo ""
echo " headId - The digital human ID (from list-resources.sh heads)"
echo " --confirm - Skip confirmation prompt"
echo ""
echo "WARNING: This permanently deletes the digital human and cannot be undone."
exit 1
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
log_info "Payload:"
echo "$PAYLOAD" | jq .
if ! unith_curl -X PUT "$API_BASE/head/update" \
-H "Authorization: Bearer $UNITH_TOKEN" \
-H 'Content-Type: application/json' \
-H 'accept: application/json' \
The React example sets autoStart to true without warning that the avatar may begin speaking or initiating conversation automatically. This can cause unexpected audio playback, accessibility issues, and poor user experience, especially when embedded in consumer-facing pages or environments where autoplay is disruptive.
The usage example sets both languageSpeechRecognition and language to en-US, which can implicitly steer users toward a fixed locale. There is no accompanying note that these are merely examples or that other locales are supported, so the natural-language guidance may conflict with a language-choice policy.
No suspicious patterns detected.