bun-ffi

Pass

Audited by Gen Agent Trust Hub on Sep 15, 2026

Risk Level: SAFEDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The skill documents the use of dlopen from the bun:ffi module, which is a mechanism for dynamic loading and execution of native shared libraries (.so, .dylib, .dll). The examples provided demonstrate loading standard system libraries (e.g., libc, libsqlite3) and local project libraries. While FFI allows code execution outside the JavaScript sandbox, the content is restricted to educational documentation and standard implementation patterns for the Bun runtime.
  • [INDIRECT_PROMPT_INJECTION]: The skill defines a surface area for processing external data via native code (e.g., C pointers, buffers, and callbacks). It documents how to interface with external memory and native functions. Although this provides a capability for the agent to interact with lower-level system resources, the skill includes standard safety practices such as using FFIType for validation and manual memory management patterns (e.g., lib.symbols.free(cPointer)).
  • [COMMAND_EXECUTION]: The skill demonstrates how to load and execute functions from the host operating system's shared libraries. This includes standard POSIX functions (like printf) and specific database library calls (SQLite). These are legitimate uses of FFI for integrating native performance into JavaScript applications.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 15, 2026, 12:00 AM
Security Audit — agent-trust-hub — bun-ffi