@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.
9 lines (8 loc) • 464 B
TypeScript
type ZenInternalsJsSourceType = 0 | 1 | 2 | 3 | 4;
/**
* 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?: ZenInternalsJsSourceType): boolean;
export {};