# Risk map — swc-project/swc

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

# Risk map — swc-project/swc

Scanned commit 3c46139b86b27a7b3fefcf7b19ca07a63de9db0a (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The security-sensitive surfaces are native dynamic loading, cache filesystem operations, executable configuration, plugins, subprocesses, and release automation. The observations below describe explicit source behavior and trust assumptions, not confirmed vulnerabilities. Correctness risks include panic-based input handling, feature-dependent unfinished APIs, and silent loss of AST context through ordinary serialization. This bounded inspection cannot establish repository-wide absence of other risks or tests.
- SWC_BINARY_PATH loads a caller-selected native module, and compileBundleOptions uses require on configuration paths/module names; both are executable inputs that require caller trust. — [packages/core/src/index.ts#L21-35](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/packages/core/src/index.ts#L21-L35) [packages/core/src/spack.ts#L12-22](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/packages/core/src/spack.ts#L12-L22)
- Native digest verification establishes equality with the embedded addon, not publisher identity; initialize subsequently passes the materialized pathname to libloading, so trusted installation and filesystem components remain part of the boundary. — [crates/swc_native_addon/src/lib.rs#L1-5](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_native_addon/src/lib.rs#L1-L5) [bindings/binding_native_addon/src/lib.rs#L78-98](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/bindings/binding_native_addon/src/lib.rs#L78-L98) [crates/swc_native_addon/README.md#L82-85](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_native_addon/README.md#L82-L85)
- On Unix, exact SWC_NATIVE_BINDING_CACHE_SKIP_SECURITY_CHECK=1 bypasses root/ancestor ownership, permission, and symlink checks; private directories and regular-file checks still enforce owner, mode, link count, and O_NOFOLLOW restrictions. — [crates/swc_native_addon/src/platform/unix.rs#L68-101](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_native_addon/src/platform/unix.rs#L68-L101) [crates/swc_native_addon/src/platform/unix.rs#L186-233](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_native_addon/src/platform/unix.rs#L186-L233)
- File APIs read caller paths, .swcrc discovery can traverse parents according to root mode, and source-map handling opens derived map paths; these inspected paths do not implement repository-root confinement. — [bindings/binding_core_node/src/transform.rs#L115-117](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/bindings/binding_core_node/src/transform.rs#L115-L117) [crates/swc/src/lib.rs#L1407-1420](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc/src/lib.rs#L1407-L1420) [crates/swc/src/lib.rs#L518-558](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc/src/lib.rs#L518-L558)
- MinifyTarget::Json uses expect, assert_eq!, and unwrap for input shape, including the one-file limitation; this is panic-based validation, and the workspace release profile specifies panic='abort'. — [bindings/binding_core_node/src/minify.rs#L40-55](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/bindings/binding_core_node/src/minify.rs#L40-L55) [Cargo.toml#L157-170](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/Cargo.toml#L157-L170)
- AST source context is a non-enumerable Symbol property; frozen objects may prevent attachment, and raw Programs fall back to the shared compiler rather than restored context, making object copying/serialization behavior material to later printing. — [packages/core/src/index.ts#L57-95](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/packages/core/src/index.ts#L57-L95) [packages/core/src/index.ts#L115-125](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/packages/core/src/index.ts#L115-L125) [bindings/binding_core_node/src/print.rs#L31-48](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/bindings/binding_core_node/src/print.rs#L31-L48)
- CLI bundle/lint/minify deliberately panic as unimplemented, and the non-swc_v1 Node bundle task has todo! branches; callers must distinguish advertised command/API names from the active implementation. — [crates/swc_cli_impl/src/commands/bundle.rs#L3-9](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_cli_impl/src/commands/bundle.rs#L3-L9) [crates/swc_cli_impl/src/commands/lint.rs#L3-9](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_cli_impl/src/commands/lint.rs#L3-L9) [crates/swc_cli_impl/src/commands/minify.rs#L3-9](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_cli_impl/src/commands/minify.rs#L3-L9) [bindings/binding_core_node/src/bundle.rs#L175-185](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/bindings/binding_core_node/src/bundle.rs#L175-L185)
- Plugin runtime cache loading explicitly permits trusted compiled modules without verification; privileged automation also has distinct trust gates, including default-branch-only contributor-policy code and author-association checks before the write-enabled Claude job. — [crates/swc_plugin_runner/src/runtime.rs#L60-67](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/crates/swc_plugin_runner/src/runtime.rs#L60-L67) [.github/workflows/contributor-policy.yml#L14-35](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/.github/workflows/contributor-policy.yml#L14-L35) [.github/workflows/claude.yml#L17-43](https://github.com/swc-project/swc/blob/3c46139b86b27a7b3fefcf7b19ca07a63de9db0a/.github/workflows/claude.yml#L17-L43)

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)
