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.tsexhibit a path traversal vulnerability. - The
GETandPUThandlers interpolate theparams.namevariable directly into file system paths (e.g.,./data/${params.name}) usingBun.file()andBun.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.nameand the request bodyrequest.text()insrc/routes/api/files/[name]/+server.tsserve 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