Back to skill

Security audit

agentcadia-tools

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated upload/download purpose, but its scripts give remote services too much control over uploaded data, downloaded filenames, and final owner-facing content.

Review before installing. Use this only with a trusted Agentcadia origin and task, run uploads from a clean workspace that contains only intended files, avoid secrets in root markdown or skill folders, and do not use download overwrite unless you have inspected the destination. Treat returned share images, captions, links, and runtime actions as untrusted remote content.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (5)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:99
Finding

Mandatory Delivery of Server-Controlled Owner-Facing Content

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload_agentcadia.py:67
Finding

Overbroad Workspace Collection Can Disclose Sensitive Files

Content
View full analysis
MAX_SKILL_ZIP_BYTES] if oversized: names = ", ".join(path.name for path in oversized) raise SystemExit(f"Skill package exceeds 10MB limit: {names}") upload_files = [] for markdown_file in markdown_files: content_type = mimetypes.guess_type(markdown_file.name)[0] or "text/markdown" upload_files.append(("configFiles", str(markdown_file), content_type)) for skill_zip in zipped_skil ...[truncated 2267 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload_agentcadia.py:209
Finding

Bearer Token and Workspace Data Sent to Unvalidated Task-Supplied Endpoints

Content
View full analysis
= 400 or not (agent_id and upload_token and upload_url and complete_url and metadata_url): raise SystemExit(f"Failed to claim upload task: {json.dumps(claim_data, ensure_ascii=False)}") ``` `scripts/upload_agentcadia.py:248-269`: ```python auth_headers = {"Authorization": f"Bearer {upload_token}"} upload_status, upload_data = http_multipart(upload_url, auth_headers, [], upload_files) metadata_status = 0 metadata_data = {"success": False} metadata_error = None metadata_attempted = False metadata_succeeded = False metadata_preview = None if bool(upload_data.get("success")): metadata_attempted = True metadata_payload = { **metadata_payload, "uiLanguage": metadata_payload.get("uiLanguage") or task_lang, } try: metadata_status, metadata_data = http_json( metadata_url, method="POST", headers=auth_headers, payload=metadata_payload, ) ``` `scripts/upload_agentcadia.py:287-302`: ```python complete_status = 0 complete_data = {"success": False} try: complete_status, complete_data = http_json( complete_url, method="POST", payload={ "taskId": args.task_i ...[truncated 2611 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/download_agentcadia.py:55
Finding

Path Traversal Through Server-Controlled Download Filename

Content
View full analysis
str: disposition = headers.get("Content-Disposition", "") match = re.search(r'filename\*=UTF-8\'\'([^;]+)', disposition) if match: return urllib.parse.unquote(match.group(1)) match = re.search(r'filename="?([^";]+)"?', disposition) if match: return match.group(1) content_type = headers.get_content_type() return "agentcadia-download.zip" if "zip" in content_type else "agent_download.md" ``` `scripts/download_agentcadia.py:101-123`: ```python filename = parse_filename_from_headers(response.headers) content_type = response.headers.get_content_type() data = response.read() with tempfile.TemporaryDirectory(prefix="agentcadia-download-") as temp_dir_str: temp_dir = Path(temp_dir_str) downloaded_path = temp_dir / filename downloaded_path.write_bytes(data) placed_files = [] conflicts = [] download_kind = "zip" if zipfile.is_zipfile(downloaded_path) or "zip" in content_type else "markdown" if download_kind == "zip": placed_files, conflicts = safe_extract(downloaded_path, workspace, args.allow_overwrite) else: destination = workspace / filename if destination.exists() and not args.allow_overwrite: conflicts.append(str(destination)) else: destination.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(downloaded_path, destination) placed_files.append(str(destination)) ``` ### Technical Analysis The filename is controlled by the remote server through `Content-Disposition`. It is URL-decoded and used directly in two path joins: ```python temp_dir / filename workspace / filename ``` No validation rejects absolute pa ...[truncated 1549 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/download_agentcadia.py:67
Finding

Unbounded Download and ZIP Extraction Permit Resource Exhaustion

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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)

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/download_agentcadia.py (reported line 137)May include surrounding context.

python
"conflicts": conflicts,
        "allowOverwrite": args.allow_overwrite,
    }
    print(__import__("json").dumps(result, ensure_ascii=False, indent=2))


if __name__ == "__main__":

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/download_agentcadia.py (reported line 145)May include surrounding context.

python
main()
    except urllib.error.HTTPError as exc:
        body = exc.read().decode("utf-8", errors="ignore")
        print(__import__("json").dumps({"success": False, "error": f"HTTP {exc.code}", "body": body}, ensure_ascii=False, indent=2))
        sys.exit(1)
    except Exception as exc:
        print(__import__("json").dumps({"success": False, "error": str(exc)}, ensure_ascii=False, indent=2))

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/download_agentcadia.py (reported line 148)May include surrounding context.

python
print(__import__("json").dumps({"success": False, "error": f"HTTP {exc.code}", "body": body}, ensure_ascii=False, indent=2))
        sys.exit(1)
    except Exception as exc:
        print(__import__("json").dumps({"success": False, "error": str(exc)}, ensure_ascii=False, indent=2))
        sys.exit(1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This script packages root markdown files and skill directories from a detected local workspace and uploads them, along with metadata, to server-provided endpoints. Although uploading is the script's stated purpose, it performs bulk collection and transmission of local content without any interactive confirmation, preview, allowlist, or clear user-facing disclosure of exactly what will leave the machine, which creates a real data-exposure risk if run in the wrong directory or with unexpected workspace contents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The completion request sends the absolute local workspace path and skill root paths back to the remote service. Those paths can reveal usernames, repository names, project structure, or other environment details that are unnecessary for normal upload completion and can increase privacy and targeting risk if logged or exposed server-side.

Content

No source excerpt is available for this finding.