Back to skill

Security audit

Guardian Compliance

Security checks for vulnerabilities and agentic risk

Overview

This Guardian skill is mostly coherent, but it can send a sensitive bearer token and compliance questions to any API URL placed in its environment.

Review before installing. Only configure GUARDIAN_TOKEN for an account you intend this skill to access, avoid setting GUARDIAN_API_URL unless you fully trust the endpoint, and assume questions about immigration, tax, business compliance, deadlines, risks, and documents may be sent to Guardian's remote service.

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/guardian-ask.sh:5
Finding

Unrestricted API URL Override Can Disclose Guardian Bearer Tokens and Sensitive User Data

Content
View full analysis
/dev/null) || { ``` `scripts/guardian-deadlines.sh:5-6, 13`: ```bash API_URL="${GUARDIAN_API_URL:-https://guardian-compliance.fly.dev}" TOKEN="${GUARDIAN_TOKEN:-}" timeline=$(curl -sf -H "Authorization: Bearer $TOKEN" "$API_URL/api/dashboard/timeline" 2>/dev/null) || { ``` `scripts/guardian-documents.sh:5-6, 13`: ```bash API_URL="${GUARDIAN_API_URL:-https://guardian-compliance.fly.dev}" TOKEN="${GUARDIAN_TOKEN:-}" docs=$(curl -sf -H "Authorization: Bearer $TOKEN" "$API_URL/api/dashboard/documents" 2>/dev/null) || { ``` `scripts/guardian-risks.sh:5-6, 13`: ```bash API_URL="${GUARDIAN_API_URL:-https://guardian-compliance.fly.dev}" TOKEN="${GUARDIAN_TOKEN:-}" timeline=$(curl -sf -H "Authorization: Bearer $TOKEN" "$API_URL/api/dashboard/timeline" 2>/dev/null) || { ``` `scripts/guardian-status.sh:5-6, 13, 18`: ```bash API_URL="${GUARDIAN_API_URL:-https://guardian-compliance.fly.dev}" TOKEN="${GUARD ...[truncated 3477 chars]
Remediation
View remediation
&2 exit 1 ;; esac ``` 3. **Require HTTPS at both the shell-validation and curl layers.** Add curl protocol restrictions: ```bash curl --proto '=https' --proto-redir '=https' ... ``` Hostname allowlisting is still required because HTTPS alone does not prevent sending the token to an attacker-controlled HTTPS server. 4. **Reject unexpected URL components.** Disallow user information, query strings, fragments, unapproved ports, deceptive hostname suffixes, and alternate schemes. Prefer parsing the URL with a reliable URL parser rather than substring or prefix checks. 5. **Avoid forwarding credentials across redirects.** Keep redirects disabled unless the API explicitly requires them. If redirects are enabled later, ensure bearer credentials are never forwarded to a different origin. 6. **Use narrowly scoped and short-lived credentials.** The Guardian service should issue tokens with only the API permissions needed by this Skill, enforce expiration and revocation, and avoid using one broad token for unrelated account operations. 7. **Minimize transmitted question data.** Before invoking `guardian-ask.sh`, inform users that their question is sent to Guardian. Avoid including unnecessary identifiers or document contents, and provide clear consent for transmission of sensitive compliance information. 8. **Do not suppress all curl diagnostics during security failures.** Preserve sanitized error information for troubleshooting while e ...[truncated 64 chars]
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to send user compliance questions to Guardian's external API, including queries that may reveal immigration status, tax obligations, and document-derived context, but it does not clearly warn users about that data flow. In this context, the data is highly sensitive, so lack of transparent disclosure meaningfully increases privacy and confidentiality risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes shell scripts but does not declare any explicit tool scope or permissions boundary. That makes execution capability less transparent to the platform and user, increasing the risk of overbroad execution or future unsafe script changes going unnoticed.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are very broad and generic, including terms like "deadlines," "documents," and "findings," which can match unrelated user requests. This can cause unintended invocation of the skill and accidental transmission of sensitive immigration, tax, or business data to the external Guardian service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/guardian-ask.sh (reported line 22)May include surrounding context.

sh
# Escape question for JSON
JSON_QUESTION=$(printf '%s' "$QUESTION" | jq -Rs .)

result=$(curl -sf -X POST \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"message\": $JSON_QUESTION, \"history\": []}" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code sends the provided question to a remote API and includes an authorization bearer token, which is a safety-relevant network operation. While there is a brief file header comment, the script provides no runtime notice, confirmation, or explicit disclosure to the user that their input will be transmitted to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code performs outbound HTTP requests using a bearer token from the environment, which is a safety-relevant network operation involving credentials. Although failures are reported, there is no user-facing warning, prompt, or explanatory comment disclosing that the script will transmit the token to a remote service.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.