security(v2.7.2): remediate all 3 Critical P0 & 5 High P1 audit findings (fail-closed auth, webhook hardening + replay protection, auth-first BYOK + SSRF allowlist, minimal public tracker DTO, atomic+DB idempotency, 0 npm vulnerabilities, CI gate)
This commit is contained in:
Vendored
+7
-1
@@ -34,9 +34,15 @@ export interface CourierConfig {
|
||||
};
|
||||
}
|
||||
export type EnvSource = Record<string, string | undefined>;
|
||||
export declare const ALLOWED_CARRIER_HOSTS: Record<"steadfast" | "pathao" | "redx" | "paperfly", readonly string[]>;
|
||||
/**
|
||||
* P1-01 Anti-SSRF Guard: Enforce HTTPS-only + strict official carrier hostname allowlist.
|
||||
* Blocks http:, IP literals (IPv4/IPv6), localhost/.internal, credentials-in-URL, and non-standard ports.
|
||||
*/
|
||||
export declare function validateCarrierBaseUrl(provider: "steadfast" | "pathao" | "redx" | "paperfly", candidate: string | undefined, defaultUrl: string): string;
|
||||
/**
|
||||
* Build a CourierConfig from a key/value source.
|
||||
* Defaults to process.env (used by the STDIO/npx entrypoint); the HTTP
|
||||
* entrypoint passes a per-request map built from that client's headers/query.
|
||||
* entrypoint passes a per-request map built from authenticated tenant/BYOK headers.
|
||||
*/
|
||||
export declare function loadConfig(src?: EnvSource): CourierConfig;
|
||||
|
||||
Reference in New Issue
Block a user