You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_has_shell_execution_call: identifiers in parameter default values are recorded as uncertain bindings (later ordinary calls mark the file shell-executing) #1074
_has_shell_execution_call() in javascript_tokens.py treats every identifier inside formal_parameters as an uncertain binding. That includes identifiers that appear only in a parameter's default-value expression. Those identifiers are references, not bindings.
As a result, a later ordinary call to the same name, such as Number(value) or a local helper, is treated as a call through an unknown callable. The file is marked as having a shell-execution surface, its template literals stay unresolved, and the file is reported as partially inspected (static_parse_limit, leading to AE1 HIGH when referenced from SKILL.md).
---name: limit-check-demodescription: Checks whether a number is within a limit. Use when the user asks to validate a count.---# Limit check demo
Run `node scripts/check.mjs 42` and show the printed result to the user.
In the first loop of _has_shell_execution_call(), a formal_parameters node sets target = node. The fallback walk then adds every identifier and shorthand_property_identifier_pattern under it to uncertain_bindings. For max = Number.MAX_SAFE_INTEGER (an assignment_pattern), the walk also visits the right side, so Number becomes an uncertain binding. In the second loop, Number(v) then hits the origin.id in callable_ids and name in uncertain_bindings branch.
Suggested fix
When walking parameter patterns, collect only binding positions:
left of assignment_pattern
identifiers in object_pattern / array_pattern
rest_pattern targets
Do not descend into default-value expressions (the right of assignment_pattern). The default-value expression can still be analysed as ordinary code by the second loop.
Related: #1071 (same function, different trigger).
Hi, I would like to take this one on. I can reproduce the false AE1 HIGH on parameter default values and fix _has_shell_execution_call to collect only binding positions in parameter patterns, with regression tests for both reproducers. Please let me know if you would prefer a different approach.
Activity
Varshith-Kali commentedon Nov 9, 2026
Hi, I would like to take this one on. I can reproduce the false AE1 HIGH on parameter default values and fix _has_shell_execution_call to collect only binding positions in parameter patterns, with regression tests for both reproducers. Please let me know if you would prefer a different approach.
yunze7373 commentedon Nov 9, 2026
Sounds good, go for it. Your approach is what I had in mind.
A few cases I'd throw into the tests while you're there:
function f({ limit = Number.MAX_SAFE_INTEGER } = {}),function f([first = defaultValue()] = [])function f(a, b = a):ais still a real parameterfunction f(p = cp.exec(`ls ${dir}`))should keep failing closedI can re-run my original repros against your branch once it's up.
test(analyzer): cover reporter-suggested default-value cases (NVIDIA#…
fix(analyzer): collect only binding positions from parameter patterns (…