bun-sveltekit

Pass

Audited by Gen Agent Trust Hub on Sep 14, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The code examples for handling file operations in src/routes/api/files/[name]/+server.ts exhibit a path traversal vulnerability.
  • The GET and PUT handlers interpolate the params.name variable directly into file system paths (e.g., ./data/${params.name}) using Bun.file() and Bun.write().
  • This allows an attacker to supply a malicious filename containing directory traversal sequences (such as ../../) to read or overwrite files outside the intended directory.
  • Ingestion points: The URL parameter params.name and the request body request.text() in src/routes/api/files/[name]/+server.ts serve as entry points for untrusted data.
  • Boundary markers: There are no markers or instructions provided to the agent to treat this data as untrusted or to enforce boundaries.
  • Capability inventory: The skill demonstrates both file reading (Bun.file) and file writing (Bun.write) capabilities within the same module.
  • Sanitization: The provided code snippets do not include any logic to sanitize, escape, or validate the path before execution.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 14, 2026, 11:59 PM
Security Audit — agent-trust-hub — bun-sveltekit