Repository navigation
v0.1.7
A third language, a second lens over MCP, and two TypeScript front-end defects found by pointing the benchmark at real packages.
Added
- Java front-end —
modscan detect --language java. Java maps onto the model more directly than any front-end so far:class/interface/abstract classare already its vocabulary,extends/implementsare bases, annotations play the decorator role, and visibility comes from the explicitpublicmodifier. Generic bases are reduced to their bare name, annotation arguments dropped, and nested classes deliberately not emitted as top-level seams. Optional:pip install modscan[java]. - The security lens over MCP —
modscan-mcpgainsaudit_attack_surfacebesidedetect_extension_points, returning exactly the payloadmodscan-audit --jsonemits so the non-coverage disclaimer travels with the data. - The security lens covers TypeScript/JavaScript —
modscan-audit --language typescriptmapseval,Function, thevmmodule,child_process, dynamicrequire/importand string-bodied timers. Modelled oneslint-plugin-security: a computedrequire(name)is a sink, a literalrequire('fs')is not. - More process sinks, and
shell=Trueraises severity —os.popen,os.startfile, theos.exec*/os.spawn*family andcommands.getoutput, found by cross-checking the lens against Bandit. Asubprocess.*call passing a literalshell=Truenow rates high.
Fixed
- CommonJS exports are recognised. The TS/JS front-end marked symbols public only from the ESM
exportkeyword, so every CommonJS file — most of npm — reported zero public symbols and contributed no extension points at all. .d.tsdeclaration files are no longer scanned. A declaration file declares types for code defined elsewhere, so scanning it produced a phantom copy of every symbol and let declaration-only option bags outrank the classes a project's documentation tells you to subclass.
Note
A modscan upgrade that adds catalogue entries can make the attack-surface gate report sinks that were always in the code — new to the detector, not to the codebase. Pin the Action's modscan-version for a baseline that only moves when you choose.
Full diff: v0.1.6...v0.1.7