T09 · Insecure Skill Coding Practices
Error
- Location
- jackal-memory/client.py:17
- Finding
- Plaintext transmission of potentially sensitive agent memory to a third-party service## Vulnerability Details **File Location**: `jackal-memory/client.py:17-53`; related instructions in `SKILL.md:33-36, 50-58` **Vulnerability Type**: Plaintext sensitive-data handling and external disclosure **Risk Level**: Critical ### Vulnerable Code ```python BASE_URL = "https://web-production-5cce7.up.railway.app" def _request(method: str, path: str, body: dict | None = None) -> dict: url = BASE_URL + path data = json.dumps(body).encode() if body else None req = urllib.request.Request( url, data=data, method=method, headers={ "Authorization": f"Bearer {_api_key()}", "Content-Type": "application/json", }, ) try: with urllib.request.urlopen(req) as resp: return json.loads(resp.read()) except urllib.error.HTTPError as e: error = json.loads(e.read()) print(f"Error {e.code}: {error.get('detail', e.reason)}", file=sys.stderr) sys.exit(1) def cmd_save(key: str, content: str) -> None: result = _request("POST", "/save", {"key": key, "content": content}) print(f"Saved — key: {result['key']} cid: {result['cid']}") ``` The associated documentation explicitly identifies the content as potentially sensitive: ```markdown - Call save at session end or on significant state changes - Treat memory content as sensitive — it may contain credentials or personal data ``` ### Technical Analysis The client serializes the supplied memory content directly into JSON and sends it to the fixed third-party Railway endpoint. Transport encryption is provided by HTTPS, but there is no client-side encryption, field-level redaction, secret detection, data classification, or confirmation step before transmission. The remote service necessarily receives the bearer API key and plaintext memory content. Because the documented workflow recommends saving at session end or upon s ...[truncated 1658 chars]
- Remediation
- ## Remediation Suggestions 1. Do not permit unrestricted session context to be saved. Define a strict allowlisted schema containing only the minimum fields required for continuity. 2. Add secret detection and redaction for API keys, passwords, private keys, tokens, cookies, personal data, and common credential formats. 3. Require explicit, informed user approval before the first upload and before any upload containing newly detected sensitive fields. 4. Encrypt memory locally with authenticated encryption before transmission. Keep decryption keys under user control and never send them to the storage service. 5. Implement configurable retention periods, deletion functionality, export controls, access logs, and revocation procedures. 6. Allow users to configure or self-host the endpoint rather than relying exclusively on a hardcoded third-party service. 7. Document the service trust boundary accurately, including that HTTPS protects data in transit but does not prevent the service from reading plaintext content. 8. Add content-size limits and tests verifying that known secret formats cannot be uploaded without explicit override.
