JavaScript, TypeScript & Hybrid Mobile Support
- Tree-sitter AST rules (
libsast[js] >= 3.2.0): Added 28 MobSF JavaScript and TypeScript rules covering React Native, Expo, Cordova / Ionic, Capacitor, and WebView apps across.js,.jsx,.ts,.tsx,.mjs,.cjs, and<script>blocks in.html,.htm,.vue, and.svelte.- Covers WebView misconfigurations (JavaScript enabled, file access, mixed content, wildcard origins, dynamic URIs, dynamic script injection, remote debugging, all-frame injection, allow-all navigation, unverified
onMessagebridges), DOM XSS sinks, dynamic code execution (eval/Function/ string timers), wildcardpostMessage('*'), unencrypted storage (AsyncStorage,MMKV, Realm, SQLite,redux-persist), hardcoded secrets and crypto keys, weak cryptography, TLS validation bypass, SQLite injection, Keychain accessibility, clipboard leaks, insecureexpo-auth-sessionOAuth, non-crypto biometrics, shared external storage, sensitive console logging outside__DEV__, client-side auth gates, and bundled debug tooling.
- Covers WebView misconfigurations (JavaScript enabled, file access, mixed content, wildcard origins, dynamic URIs, dynamic script injection, remote debugging, all-frame injection, allow-all navigation, unverified
- Hybrid configuration checks:
- Cordova / PhoneGap (
config.xml): Wildcard<access origin="*" />and<allow-navigation>origins. - Capacitor (
capacitor.config.json): Cleartext HTTP server settings and wildcardserver.allowNavigation. - Expo (
app.json,app.config.json,app.config,app.manifest): Secret-like values inextraand cleartext or unsigned OTAupdates.
- Cordova / PhoneGap (
- React Native Android bridge rules: Added Semgrep rules (Java and Kotlin) for
@ReactMethodnative module methods performing file system I/O or command execution. - CLI & suppressions:
- Added
--type javascript(--type {android,ios,javascript,auto});--type autoruns JavaScript/hybrid checks automatically alongside Android and iOS checks while skippingnode_modulesand vendor bundles. - Inline
mobsf-ignore:suppressions now also support JSX ({/* ... */}) and HTML/XML (<!-- ... -->) comments.
- Added
Rule & Engine Fixes
- Java XXE rules: Synced
xmlinputfactory_xxeandxmlinputfactory_xxe_enabledwith upstreamsemgrep-rulesto fix false positives when disabling external entities viaXMLInputFactoryconstants and catchBoolean.TRUE/SUPPORT_DTDvariants (#136). - Semgrep option-injection hardening: Requires
libsast >= 3.2.0(includeslibsast 3.1.10's--end-of-options separator before Semgrep file paths). - Refreshed GitHub Action dependencies and workflow pins.
What's Changed
- Require libsast 3.1.10 by @ajinabraham in #135
- Fix #136: sync XXE XMLInputFactory rules with upstream semgrep-rules by @Huyvux12 in #137
- Add JavaScript, TypeScript, and hybrid mobile SAST rules (v1.2.0) by @ajinabraham in #138
New Contributors
Full Changelog: 1.1.0...1.2.0