@aikidosec/firewall
Version:
Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.
7 lines (6 loc) • 384 B
TypeScript
/**
* Detects if the user input is a JS injection
* The sourceType is used to determine the source of the user input
* https://github.com/AikidoSec/zen-internals/blob/4b7bf2c7796155731dc2736a04e3f4d99cdc712b/src/js_injection/helpers/select_sourcetype_based_on_enum.rs#L4
*/
export declare function detectJsInjection(code: string, userInput: string, sourceType?: number): boolean;