# Risk map — rolldown/rolldown

> Canonical page: https://codevetter.com/unpack/rolldown/risk-map

# Risk map — rolldown/rolldown

Scanned commit 37d60ff510b4b326f4b587c27f28c606d76373e8 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The main observed trust boundaries are executable configuration/plugins, output filesystem operations, worker IPC, and package acquisition. Source contains explicit protections and comments about lifecycle/deadlock constraints. The observations below identify behaviors and maintenance hazards; they do not establish exploitable vulnerabilities. Documentation and test limitations are scoped to the inspected files.
- Config loading executes imported JavaScript; default TS loading writes a hashed configuration bundle beside the original file and later unlinks it with ignored callback errors. It therefore requires filesystem and code-execution trust in the selected config. — [packages/rolldown/src/utils/load-config.ts#L47-59](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/utils/load-config.ts#L47-L59) [packages/rolldown/src/utils/load-config.ts#L77-84](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/utils/load-config.ts#L77-L84) [packages/rolldown/src/utils/load-config.ts#L173-185](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/utils/load-config.ts#L173-L185)
- cleanDir removes entries recursively from the configured output directory before generation when no output.file is set; cleanup failures become warnings. Destination selection is consequently a high-impact filesystem boundary. — [crates/rolldown/src/bundle/bundle.rs#L172-186](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown/src/bundle/bundle.rs#L172-L186) [crates/rolldown/src/utils/fs_utils.rs#L10-30](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown/src/utils/fs_utils.rs#L10-L30)
- Generated filenames are checked after generateBundle for escaping the output directory, and write rejects NUL bytes; these checks constrain bundler-emitted paths, while inspected plugin tests directly write files through Node fs. — [crates/rolldown/src/bundle/bundle.rs#L192-210](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown/src/bundle/bundle.rs#L192-L210) [crates/rolldown/src/bundle/bundle.rs#L331-338](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown/src/bundle/bundle.rs#L331-L338) [crates/rolldown/src/bundle/bundle.rs#L428-450](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown/src/bundle/bundle.rs#L428-L450) [packages/rolldown/tests/behaviors/clean-dir.test.ts#L75-88](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/tests/behaviors/clean-dir.test.ts#L75-L88)
- The WebContainer fallback uses a version-specific /tmp directory, removes/recreates it when the binding entry is missing, invokes pnpm i synchronously, and requires the installed binding. This introduces network/package-manager and outside-project filesystem effects on that branch. — [packages/rolldown/src/webcontainer-fallback.cjs#L1-21](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/webcontainer-fallback.cjs#L1-L21)
- Parallel plugin workers dynamically import supplied file URLs; their adapter currently supplies empty input/output options, fresh isolated PluginContextData, and watchMode:false, with explicit TODOs for context sharing and watch metadata. — [packages/rolldown/src/parallel-plugin-worker.ts#L13-38](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/parallel-plugin-worker.ts#L13-L38) [packages/rolldown/src/utils/initialize-parallel-plugins.ts#L26-44](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/utils/initialize-parallel-plugins.ts#L26-L44)
- Binding close deliberately uses a synchronous mutable-receiver method returning a spawned future because asynchronous NAPI mutable access is documented as unsafe; generation also pre-resolves external paths to avoid synchronous JS-callback deadlocks. — [crates/rolldown_binding/src/binding_bundler.rs#L181-196](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown_binding/src/binding_bundler.rs#L181-L196) [crates/rolldown/src/stages/generate_stage/mod.rs#L289-298](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown/src/stages/generate_stage/mod.rs#L289-L298)
- CLI prototype-key filtering occurs after cac parsing; --environment writes process.env before help/version dispatch. These are observable input boundaries, not proof of complete pollution prevention or an identified exploit. — [packages/rolldown/src/cli/arguments/index.ts#L142-180](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/cli/arguments/index.ts#L142-L180) [packages/rolldown/src/cli/index.ts#L17-39](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/cli/index.ts#L17-L39)
- Documentation drift is concrete: build() says array outputs run sequentially but uses Promise.all; the Rust bundler doc proposes removing close and describes cache-clearing behavior, whereas current close marks closed and closes the last handle. — [packages/rolldown/src/api/build.ts#L28-35](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/api/build.ts#L28-L35) [packages/rolldown/src/api/build.ts#L55-60](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/packages/rolldown/src/api/build.ts#L55-L60) [internal-docs/rust-bundler/implementation.md#L74-95](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/internal-docs/rust-bundler/implementation.md#L74-L95) [crates/rolldown/src/bundler/impl_bundler_build.rs#L55-65](https://github.com/rolldown/rolldown/blob/37d60ff510b4b326f4b587c27f28c606d76373e8/crates/rolldown/src/bundler/impl_bundler_build.rs#L55-L65)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
