/** * Pass: weak-password-encoding (CWE-261, category: security) * * Detects use of an encoding (base64 / hex) on a credential-named identifier. * Encoding is NOT encryption — base64-encoding a password before storing or * transmitting it provides no confidentiality. Common anti-pattern. * * Detection per language: * Python: * - `base64.b64encode(password)` / `.urlsafe_b64encode(...)` * - `binascii.hexlify(password)` * JS/TS: * - `Buffer.from(password).toString('base64')` / `.toString('hex')` * - `btoa(password)` * Java: * - `Base64.getEncoder().encodeToString(passwordBytes)` * - `Base64.getUrlEncoder().encodeToString(...)` * - `Hex.encodeHexString(passwordBytes)` * Go: * - `base64.StdEncoding.EncodeToString(passwordBytes)` * - `hex.EncodeToString(...)` * * FP-guard: skip when the encoded value is part of an HTTP Basic auth * header construction (`"Basic " + base64(...)`) — that IS the spec. */ import type { AnalysisPass, PassContext } from '../../graph/analysis-pass.js'; export interface WeakPasswordEncodingResult { findings: Array<{ line: number; language: string; api: string; }>; } export declare class WeakPasswordEncodingPass implements AnalysisPass { readonly name = "weak-password-encoding"; readonly category: "security"; run(ctx: PassContext): WeakPasswordEncodingResult; private detect; } //# sourceMappingURL=weak-password-encoding-pass.d.ts.map