Releases: NodeSecure/js-x-ray
@nodesecure/js-x-ray@11.7.0
@nodesecure/tracer@4.0.0
@nodesecure/js-x-ray@11.5.0
Minor Changes
-
#494
3686651Thanks @clemgbld! - feat(js-x-ray): detect more sync IO method for crypto module -
#505
4800d5dThanks @fraxken! - Implement i18n translation locally for warnings -
#483
996be20Thanks @clemgbld! - refactor(js-x-ray): valideProbe optimisation on CallExpressionIdentifier with tracer -
#486
4259011Thanks @clemgbld! - feat(js-x-ray): add metadata in analyzeFile and analyzeFileSync in AstAnalyzer -
#485
cf75218Thanks @fraxken! - Implement a new monkey-patch warning/probe -
#501
1c2c39fThanks @clemgbld! - feat: detect identifier sql-injection -
#491
4674d38Thanks @fraxken! - Enhance ProbeRunner runProbe readability by removing tabs and implementing a new private method #getProbeHandler
Patch Changes
@nodesecure/estree-ast-utils@4.3.0
@nodesecure/tracer@3.1.0
@nodesecure/js-x-ray@11.4.0
Minor Changes
-
#468
317d679Thanks @7amed3li! - feat(isLiteral): add email collection using CollectableSet APIImplemented email detection and collection in the isLiteral probe. The probe now identifies email addresses in string literals using the same regex pattern as the CLI and collects them via the CollectableSet API.
- Added email regex constant matching CLI implementation
- Email addresses are now collected when CollectableSet("email") is provided
- Added comprehensive test cases covering valid/invalid formats and edge cases
-
#462
ed0a637Thanks @7amed3li! - Support multiple named main handlers in probes (resolves #460)Introduces support for multiple named main entrypoints in probes, allowing probes to define different handlers for various analysis scenarios. This enables more flexible probe implementations while maintaining full backward compatibility.
Key Changes:
- Added
NamedMainHandlerstype supporting multiple handler functions with requireddefaulthandler - Extended
ProbeContextwithsetEntryPoint(handlerName: string)method for handler selection - Updated
Probeinterface to accept either singlemainfunction orNamedMainHandlersobject - Implemented handler resolution logic in
ProbeRunner#runProbewith automatic cleanup - Added comprehensive test coverage (all 14 existing tests + 8 new tests passing)
Backward Compatibility:
- Existing probes with single
mainfunction continue to work without changes setEntryPointmethod available but optional for backward-compatible probes- No breaking changes to existing API
This is the core infrastructure PR. Future work will include example probe refactoring and documentation updates.
- Added
-
#456
9f4e420Thanks @7amed3li! - Add sensitivity option to AstAnalyser for configurable warning detectionIntroduces a new sensitivity option in AstAnalyserOptions that allows users to control the strictness of warning detection:
- conservative (default): Maintains current strict behavior to minimize false positives. Suitable for scanning ecosystem libraries.
- aggressive: Detects all child_process usage for maximum visibility in local project scanning.
This change implements the sensitivity option for the isUnsafeCommand probe. Additional probes (isSerializeEnv, data-exfiltration) can be updated in future releases.
-
#480
d9e0481Thanks @clemgbld! - feat(js-x-ray): add sql-injection probe -
#467
8948caaThanks @7amed3li! - feat(isSerializeEnv): add named handler for direct process.env access detectionIntroduces a named handler pattern in the
isSerializeEnvprobe to detect directprocess.envaccess when running in aggressive sensitivity mode.Changes:
- Added
validateProcessEnvvalidator to detectprocess.envMemberExpression nodes - Added
processEnvHandlernamed handler that triggers only in aggressive mode - Converted probe export to use
NamedMainHandlerspattern withdefaultandprocess.envhandlers - Existing
JSON.stringify(process.env)detection remains unchanged (backward compatible)
Behavior:
- Conservative mode (default): Only flags
process.envwhen used withJSON.stringify - Aggressive mode: Additionally flags any direct
process.envaccess
Relates to #367
- Added
-
#454
bad3093Thanks @clemgbld! - feat(js-x-ray): isUnsafeCommand transform TemplateLiteral to Literal -
#464
18fc25aThanks @clemgbld! - feat(js-x-ray): collectable set can add metadata -
#479
8848684Thanks @clemgbld! - feat(js-x-ray): implement log-usage probe -
#471
e288c04Thanks @clemgbld! - feat: generate data-exfiltration warning on import when the sensitivity is aggressive -
#463
e621d91Thanks @clemgbld! - feat(js-x-ray): do not detect file: as shady link -
#469
c4fad05Thanks @fraxken! - Introduce new VirtualIdentifier to split inlined require() with chained MemberExpr/CallExpr -
#478
029031cThanks @clemgbld! - refactor(js-x-ray): type the type of CollectableSet
Patch Changes
@nodesecure/js-x-ray@11.3.0
Minor Changes
-
#453
0b0751aThanks @clemgbld! - feat(js-x-ray): scan and collect ip address that are not urls -
#452
a01b8e7Thanks @7amed3li! - Added detection for local IP addresses andlocalhostin URLs. These are now flagged with the existingshady-linkwarning but withInformationseverity level instead ofWarning. -
#450
3185318Thanks @fraxken! - Allow to customize warnings severity