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:
Amirul Islam Redwan71
2026-11-27 03:24:39 +06:00
parent 5d296a82f1
commit c827fdfee6
29 changed files with 2151 additions and 482 deletions
+16 -3
View File
@@ -81,13 +81,26 @@ interface AuraSsoUser {
role: "owner" | "admin" | "client" | "team_member";
}
const OAUTH_FORBIDDEN_DEFAULTS = new Set([
"aura_live_mcp_master_key_2026",
"aura_ro_public_inspector_2026",
"aura_webhook_secret_2026",
"change_me",
"changeme",
"secret",
]);
function getRootSecret(): string {
return (
const raw = (
process.env.AURA_OAUTH_SECRET ||
process.env.AURA_API_KEY ||
process.env.COURIER_AUTH_TOKEN ||
"aura_live_mcp_master_key_2026"
);
""
).trim();
if (raw.length < 20 || OAUTH_FORBIDDEN_DEFAULTS.has(raw.toLowerCase())) {
throw new Error("AURA_OAUTH_SECRET (or strong AURA_API_KEY >=20 chars) must be configured; predictable defaults are forbidden.");
}
return raw;
}
function deriveKey(purpose: string): Buffer {