dx-code-analyzer-run
Audited by Socket on Aug 7, 2026
2 alerts found:
Securityx2The code is a straightforward filesystem rewrite utility with no apparent classic malware behaviors (no network, no exec/eval). However, it has a significant supply-chain integrity risk: it can read and overwrite arbitrary local files based solely on attacker-controlled JSON fields (loc.file and fixedCode), with only weak runDir prefix stripping and limited bounds checks. If the results JSON is not fully trusted and produced by the same trusted toolchain, this module can be abused to corrupt or inject code into targeted files and to overwrite sensitive files accessible to the process.
No clear evidence of intentional malware behavior (no network exfiltration, persistence, credential theft, or obfuscated payloads observed). However, the module is security-sensitive because it uses `execSync` with shell command strings that directly interpolate untrusted CLI arguments (`ruleName` and `engine`), including embedding `ruleName` into a `grep -i` pipeline. If an attacker can influence CLI arguments in the execution environment (e.g., via a wrapper/CI job), this could enable arbitrary command execution. Additionally, the provided snippet appears truncated at the end of `isSubsequence()`, so behavior completeness is slightly uncertain.