Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Read a large MCP gateway response from a side-channel payloadPath.

      The MCP gateway returns oversized JSON-RPC results via a file path pointer ({ "payloadPath": "/tmp/.../mcp-payload-โ€ฆ.json" }) instead of inlining megabytes of text in the JSON-RPC envelope. That path is controlled by the MCP gateway, so a compromised or buggy gateway could direct us at arbitrary local files (e.g. /etc/passwd, ~/.copilot/mcp-config.json) and exfiltrate their contents back into RawDocument records.

      Defence-in-depth โ€” the path is accepted only when ALL of the following hold:

      • it is a non-empty string;
      • it ends in .json;
      • it contains no NUL byte;
      • it resolves (after path.resolve) inside an allowed temp root โ€” either os.tmpdir() or /tmp.

      On any policy violation, null is returned and the original inline parsed object is surfaced to the caller as a graceful degradation.

      Parameters

      • rawPath: string

      Returns Promise<Record<string, unknown>>