suspicious.dynamic_code_execution
- Location
- server.js:74
- Finding
- Dynamic code execution detected.
AdvisoryAudited by Static analysis on May 10, 2026.
Detected: suspicious.dynamic_code_execution, suspicious.env_credential_access
Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.
If this server is running, a crafted calculation could read environment variables or local files, modify app data, or run other Node.js code with the app's privileges.
The /api/calculate route evaluates user-controlled request body content as JavaScript inside the Node.js server, not just as a restricted math expression.
const { expression } = req.body;
// 使用eval进行数学计算
const result = eval(expression);Replace eval with a safe, restricted math parser; validate allowed operators/functions; and do not expose this endpoint until it is fixed.
A browser page or network client may be able to call the local app's powerful endpoints if the server is reachable.
The app enables global CORS and exposes the calculator as an HTTP API route, making the unsafe eval-backed tool easier to invoke from other origins while the local server is running.
app.use(cors());
...
app.post('/api/calculate', async (req, res) => {Restrict CORS to the app's own origin, bind only to localhost when appropriate, and add authentication or explicit user approval for risky routes.
If you provide a HISTORY_API_KEY, the app will use it for API Ninjas history requests despite the no-authentication wording.
The code may read and send a HISTORY_API_KEY to the fallback history API, while the registry metadata declares no env vars and SKILL.md says the integrated APIs need no authentication.
'X-Api-Key': process.env.HISTORY_API_KEY || 'demo_key'
Declare the optional environment variable, document exactly where the key is sent, and use a narrowly scoped API key.
Translated text, calculator expressions, and fetched results may remain on disk and be exportable from the app.
The app persists user queries and results locally as search history, retaining up to 50 entries.
preferences.searchHistory.unshift(historyItem); // 只保留最近50条记录
Avoid entering sensitive text unless you are comfortable with local retention, and use the clear/export controls deliberately.
Installing the app will execute the normal npm dependency installation workflow for the included Node project.
The skill is presented as instruction-only with no install spec, but its own instructions require installing and running a Node.js dependency tree.
npm install ... npm start
Review package.json/package-lock.json and run the app in a contained environment, especially until the eval issue is fixed.