SecurityZero Leakage

Sensitive Data Handling

Permanent collection exclusions, strict DTO projections, zero-leakage error sanitization, and browser header protections against data disclosure.

Permanently excluded internal collections and fields

Taicket MCP connects to Taicket databases with a curated model set in mcp/src/db/models/taicketCore.ts and taicketDedicated.ts. Internal operations tables, private evidence vaults, and administrative secrets are neither registered as Mongoose models nor reachable from any MCP tool or resource.

Excluded AssetClassificationMCP Exposure Policy
AdminStaffInternal platform staff roster & privilege flagsZero exposure; model not imported in mcp/
GlobalCoreBrain & CandidateProposalProprietary AI self-training directives and review proposalsZero exposure; model not imported in mcp/
DashboardLoginLogUser IP addresses, browser fingerprints, and email recordsZero exposure; model not imported in mcp/
PrivateEvidenceSensitive moderation proof and private case attachmentsZero exposure; model not imported in mcp/
UserSupportTicketDirect platform support conversations with Taicket staffZero exposure; model not imported in mcp/
Anonymous report submittersReporter identity fields inside Server Dashboard anonymous reportsStripped at query and DTO projection layers
AI Panel 4 & internal overridesInternal whitelist panel and hardcoded internal guild IDsNever queried, exposed, or referenced in error messages
PromoCode write pathsSubscription promo code minting and redemptionStrictly excluded; billing collections are read-only

Explicit DTO projections on every tool output

MCP tools never return raw Mongoose documents (doc.toObject() or unprojected .lean() records). Every response passes through an explicit Data Transfer Object (DTO) mapper that whitelists user-facing fields, strips MongoDB internals (_id, __v), removes webhook URLs or secret tokens where present, and applies caller RBAC projections.

Explicit DTO mapping prevents accidental field exposuretypescript
export function mapAutoBanRuleDto(rule: AutoBanRuleDoc): AutoBanRuleDto {
  return {
    ruleId: String(rule.ruleId),
    name: rule.name,
    enabled: Boolean(rule.enabled),
    triggerType: rule.triggerType,
    threshold: rule.threshold,
    action: rule.action,
  };
}

sanitizeMcpError guarantees

All uncaught exceptions, MongoDB driver faults, Discord API error bodies, and Zod parsing failures pass through sanitizeMcpError in mcp/src/security/errors.ts before leaving the server.

  • Zero infrastructure disclosure:: Stack traces, filesystem paths, MongoDB hostnames, database/collection names, environment variable names, and raw upstream response bodies are logged internally via Pino (redacted) and never returned to MCP clients.
  • Stable error code taxonomy:: Unexpected internal exceptions collapse into INTERNAL_ERROR with a plain server-owner message and an opaque request correlation ID for support troubleshooting.
  • No internal guild hints:: Tier rejection messages never reference internal whitelist guilds, test overrides, or internal Discord SKU logging channels.
Sanitized error output returned to MCP clientsjson
{
  "ok": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Something went wrong while completing that request. Please try again in a moment.",
    "requestId": "req_01JXYZ9K2M4P7Q8R"
  }
}

Transport and browser privacy headers

All sensitive routes (/mcp, /oauth/*, and /account) emit strict anti-caching and framing headers at both Express (helmet) and Nginx layers: Cache-Control: no-store, no-cache, must-revalidate, private, Pragma: no-cache, Referrer-Policy: no-referrer, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, and HSTS with preload.

Related documentation