@nodesecure/js-x-ray
Version:
JavaScript AST XRay analysis
34 lines • 1.23 kB
TypeScript
import type { ESTree } from "meriyah";
import type { ProbeContext, ProbeMainContext } from "../../ProbeRunner.ts";
declare const kUnsafeDigestVariables: unique symbol;
declare const kAmbiguousVariableNames: unique symbol;
interface UnsafePrehashContext {
[kUnsafeDigestVariables]?: Set<string>;
[kAmbiguousVariableNames]?: Set<string>;
}
type NodeValidationResult = [
false
] | [
true
] | [
true,
string[]
];
declare function validateNode(node: ESTree.Node, ctx: ProbeContext<UnsafePrehashContext>): NodeValidationResult;
declare function initialize(ctx: ProbeContext<UnsafePrehashContext>): void;
declare function markAmbiguousParams(_node: ESTree.Node, ctx: ProbeMainContext<UnsafePrehashContext>): void;
declare function bcryptHashCall(bcryptNode: ESTree.CallExpression, ctx: ProbeMainContext<UnsafePrehashContext>): 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=isUnsafePrehash.d.ts.map