How SentinelIR learned to follow variable bindings, aliases and control flow instead of blindly matching code.
Imagine you're building a security analyzer.
Thanks for support..
Release: "Sentinel-IR-MCP v0.2.2 on GitLab" ( https://gitlab.com/jakubrojicek11/sentinel-ir-mcp/-/tree/v0.2.2?ref_type=tags )
Package: " [email protected] on npm" ( https://www.npmjs.com/package/sentinel-ir-mcp/v/0.2.2 )
You want to detect dangerous JavaScript functions, so you search the source code for the word "eval".
Simple, right?
Not quite.
The first trap: the same name can mean different things
Consider this:
function evaluate(code) {
return String(code);
}
Should this trigger a critical security warning?
No. The function is called "evaluate", not "eval".
Now look at this:
function run(eval) {
eval();
}
Should this trigger a warning?
Not necessarily. Here, "eval" is a function parameter.β¦