@nodesecure/js-x-ray
Version:
JavaScript AST XRay analysis
25 lines • 1.23 kB
TypeScript
import type { ESTree } from "meriyah";
import { type Literal } from "../estree/index.ts";
import type { ProbeContext } from "../ProbeRunner.ts";
import { type SourceArrayLocation } from "../utils/toArrayLocation.ts";
type DataExfiltrationContextDef = Record<string, SourceArrayLocation[]>;
declare function validateJSONStringify(node: ESTree.Node, ctx: ProbeContext): [boolean, any?];
declare function sensitiveLiteralHandler(node: Literal<string>, ctx: ProbeContext<DataExfiltrationContextDef>): void;
declare function sensitiveMethodsHandler(node: ESTree.CallExpression, ctx: ProbeContext<DataExfiltrationContextDef>): void;
declare function initialize(ctx: ProbeContext<DataExfiltrationContextDef>): void;
declare function finalize(ctx: ProbeContext<DataExfiltrationContextDef>): void;
declare const dateExifiltration: {
name: string;
nodeTypes: string[];
validateNode: (typeof validateJSONStringify)[];
initialize: typeof initialize;
finalize: typeof finalize;
main: {
default: typeof sensitiveMethodsHandler;
literal: typeof sensitiveLiteralHandler;
};
breakOnMatch: boolean;
context: {};
};
export default dateExifiltration;
//# sourceMappingURL=data-exfiltration.d.ts.map