ast-guard@2.2.0
·
41 commits
to main
since this release
ast-guard v2.2.0
📦 npm: ast-guard@2.2.0
Added
- AgentScript transformer now whitelists URI encoding helpers (
encodeURI,decodeURI,encodeURIComponent,decodeURIComponent) so they survive transformation. - AgentScript preset exports security-level-specific global lists (
AGENTSCRIPT_*), agetAgentScriptGlobalshelper, and accepts a newsecurityLeveloption; the public index also re-exports the new constants andSecurityLeveltype.
Changed
- Default AgentScript allowed globals are derived from the chosen security level (falling back to STANDARD) before merging in user-specified identifiers.
Fixed
- Regex pre-scanner analyzes user patterns through the new
safePatternTest/safePatternMatchhelpers so the detector’s own regular expressions are not exploitable.
Security
- REDOS detection patterns now use bounded quantifiers and truncate inspected patterns, eliminating analyzer-driven ReDoS vectors.