Is @struktoai/mirage-core safe?
- Node.js dynamic code execution
- Node.js filesystem write/delete
- Node.js network egress
@struktoai/mirage-core is an AI npm_package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 4 risky constructs are reported for review. It can: delegated authentication, dynamic code execution, filesystem write and network egress — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@struktoai/mirage-core 0.0.6
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of @struktoai/mirage-core's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (4)
The code turns strings into live code at runtime (eval / new Function / exec).
eval(code: string, opts?: {async eval(code, opts = {}) {eval(code: string, opts?: {eval(code: string, opts?: {async eval(code, opts = {}) {eval(code: string, opts?: {async eval(code, opts = {}) {_value = eval(compile(_last, '<eval>', 'eval'), _g)
const result = await runWithTimeout(evaluator.eval(source, { inputs: { [CTX_GLOBAL]: ctx } }), timeoutSeconds, label);return await bound.eval(code, { session: sessionId });Why it matters: If those strings aren't fixed and trusted, they become a way to run arbitrary code.
Fix: Avoid evaluating dynamically constructed code; if unavoidable, ensure the input is a trusted constant and never derived from external data.
The component writes or deletes files on disk.
fs.writeFile(entry.path, bytes);
Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
The component makes outbound network requests.
return await this.fetch(method, endpoint, options);
fetch(method, endpoint, options) {return fetch(url, init).finally(() => {const response = await fetch(url, init);
return fetch();
const value = await fetch();
resp = await fetch(applyProxy(url), init);
const r = await fetch(buildUrl(url, params), { headers, redirect: 'follow' });r = await fetch(url, {const r = await fetch(url, {const r = await fetch(url, { headers, redirect: 'follow' });// can seed a child listing from the same fetch (DirListing.seeds),
listed = await fetch(accessor, match, own);
response = await fetch(url, { method: 'GET', headers, signal: controller.signal });* the browser-side client knows how to dispatch via fetch().
* the browser-side client knows how to dispatch via fetch().
const resp = await fetch(url);
const resp = await fetch(url, { method: 'HEAD' });const resp = await fetch(url);
const resp = await fetch(url, {const resp = await fetch(url, { method: 'DELETE' });await fetch(url, { method: 'DELETE' });const resp = await fetch(url, {return entry.fetch(entry.config, ref);
return fetch(configModel.parse({}), ref);Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential. (3 occurrence(s) shown as evidence).
grant_type: 'refresh_token',
grant_type: 'refresh_token',
grant_type: 'refresh_token',
Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →