@nodesecure/js-x-ray
Version:
JavaScript AST XRay analysis
27 lines • 1.21 kB
TypeScript
import type { ESTree } from "meriyah";
import type { ProbeContext, ProbeMainContext } from "../../ProbeRunner.ts";
declare const kShuckingVariables: unique symbol;
declare const kAmbiguousVariableNames: unique symbol;
interface PasswordShuckingContext {
[kShuckingVariables]?: Set<string>;
[kAmbiguousVariableNames]?: Set<string>;
}
type NodeValidationResult = [false] | [true] | [true, string[]];
declare function validateNode(node: ESTree.Node, ctx: ProbeContext<PasswordShuckingContext>): NodeValidationResult;
declare function initialize(ctx: ProbeContext<PasswordShuckingContext>): void;
declare function markAmbiguousParams(_node: ESTree.Node, ctx: ProbeMainContext<PasswordShuckingContext>): void;
declare function bcryptHashCall(bcryptNode: ESTree.CallExpression, ctx: ProbeMainContext<PasswordShuckingContext>): void;
declare const _default: {
name: string;
nodeTypes: string[];
validateNode: typeof validateNode;
main: {
default: typeof bcryptHashCall;
markAmbiguousParams: typeof markAmbiguousParams;
};
initialize: typeof initialize;
breakOnMatch: boolean;
context: {};
};
export default _default;
//# sourceMappingURL=isPasswordShucking.d.ts.map