npm / @vitest/mocker / 5.1.0-beta.1
@vitest/mocker 5.1.0-beta.1
- Source
- https://github.com/vitest-dev/vitest
- Artifact scanned
mocker-5.1.0-beta.1.tgz- Compared with
mocker-5.0.5.tgz(0 signals introduced since)- Files
- 30 scanned, 1 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 10 info
- Scan time
- 5.5 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 5 of 5 warn and critical signals; 5 demoted to info.
- Disclude version
- 4.3.0
- Scanned (UTC)
- 2026-10-23 23:45
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
-
of Buffer?Buffer.:Uint8Array.}let D;likely benign Base64-to-bytes helper that feeds an embedded WebAssembly module compile/instantiate in a bundled automock library.Reasoning
The atob call sits in a helper that decodes a base64 blob into bytes feeding WebAssembly.compile/instantiate. This is the standard inlined WASM-loading pattern used by bundled libraries (the wasm bytes are embedded and compiled, not eval'd as text). Nothing shown is a dropper or a network fetch; the decoded data is a wasm module, a legitimate bundler output.
-
of Buffer?Buffer.:Uint8Array.;var A;};const init=WebAssembly...;likely benign Inline base64 WebAssembly initializer in a bundled JavaScript chunk.Reasoning
Same embedded-WASM loader pattern: atob converts an inline base64 string into a Uint8Array passed to WebAssembly.compile, then exports are stored. This is a typical bundled wasm initializer in a test-mocking package, with no eval of decoded text or process/network activity visible.
-
-
const actualUrl = ``; return this.likely benign Dynamic import of a computed module URL inside a test-mocker wrapper.Reasoning
This is a module loader in a mocking library that imports a computed URL with a vite-ignore hint. Dynamic import with a runtime specifier is the expected mechanism for loading mocked ES modules in Vitest-style tooling; the specifier is built from the module's own URL and query, not from untrusted remote input.
-
const query = url. ? `&t=` : `?t=`; const moduleObject = awaitlikely benign Dynamic import with a cache-busted, mock-tagged module path in a mocker.Reasoning
The import specifier is built from the module path plus a timestamp query and mock type, which is the cache-busting pattern a module mocker uses to reload a mocked module. It is consistent with the surrounding mocker logic and shows no remote or decoded source.
-
} returnlikely benign Dynamic import of a configured redirect module path in a mocker.Reasoning
Returns import() of mock.redirect, a path configured by the mock definition itself. This is a redirect-to-module feature of a mocking library, a legitimate use of dynamic import with a configured specifier rather than attacker-controlled code.
-
-
interface BaseNodeWithoutComments -
Reproduce This Scan
Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
|
&&