Implementation Guide | Financial Services

    How to Detect Direct OpenAI API Calls With Personal Keys From a Bank Network

    No single control finds every direct call to api.openai.com. Combine network telemetry (DNS, proxy, egress firewall) to see who is reaching the endpoint, code-level secret scanning in repositories and CI to find embedded keys, and endpoint signals to cover gaps. Treat any traffic that does not originate from a sanctioned route as unsanctioned, then block it, move the developer to a sanctioned path, or escalate, and record each outcome as evidence.

    From detection to response

    1. 1

      1. Classify

      Confirm the source, the user or process, and whether a sanctioned route was involved. Apply a risk threshold so higher-risk cases go first.

    2. 2

      2. Contain

      Block the source at the egress firewall or proxy, and revoke any personal key found in code or CI.

    3. 3

      3. Redirect

      Notify the developer and point them to the sanctioned route with enterprise-owned credentials.

    4. 4

      4. Escalate

      Send cases involving possible customer or confidential data to security and privacy review for human decision.

    5. 5

      5. Record

      Store the detection, decision, owner and outcome so the case can be shown later.

    What you are actually trying to find

    A developer with a personal API key can send a request from a bank workstation straight to api.openai.com. The request carries whatever the developer pastes in: prompts, source code, perhaps customer or confidential data. The institution owns no credential for that request, cannot attribute it to a business purpose, and applied no policy to it.

    The detection problem has two parts. The first is finding traffic to the endpoint at all. The second is deciding whether that traffic is sanctioned. The second part is easier than it sounds if you define sanctioned narrowly: traffic is sanctioned when it arrives from a known route that uses enterprise-owned credentials. Everything else is a candidate finding, whether or not you can read the key.

    This framing matters because most network methods cannot see the key itself. They can see where a request came from and where it went. Build the approach around source and destination first, and treat key inspection as an additional signal where your tooling allows it.

    Detection layers and their blind spots

    Each layer answers a different question and misses something the others catch. Plan for overlap rather than relying on the strongest single source.

    • DNS logs: Show which hosts resolved the api.openai.com hostname and when. They do not show payloads, keys or whether a connection followed. Resolvers that clients bypass, such as encrypted DNS to external providers, create gaps.
    • Forward proxy and SWG logs: Show destination, user, device and volume for proxied connections. Without TLS inspection they see the destination but not the request contents. Traffic that bypasses the proxy is not recorded.
    • TLS inspection: Where permitted by policy, exposes request headers and bodies, which allows credential and content checks. Coverage is limited to inspected paths, and pinned or excluded applications may be skipped.
    • Egress firewall: Enforces which sources may reach which destinations and records denied attempts. IP-based rules for a hostname are brittle, and the firewall does not know which user or tool made the call.
    • CASB data: Adds application and user context for sanctioned and unsanctioned services. It depends on traffic reaching the CASB, so off-network devices are a typical blind spot.
    • Endpoint and IDE signals: Show which process or extension made a connection, including tools that bundle their own SDKs. They require an agent on the device and do not cover unmanaged hardware.

    Separating personal-key use from sanctioned use

    Start with source attribution. If the sanctioned route has a fixed egress address or service identity, then any request to the endpoint from another source is unsanctioned by definition. Allowlist the sanctioned source at the egress firewall or proxy, and treat hits from every other source as findings to triage.

    Where TLS inspection is in place and your privacy and legal review allows it, you can add credential-level checks: compare the credential presented in a request against a register of enterprise-issued keys. Keep the register under the same ownership as key issuance so that it stays current. Requests whose credential is not in the register are personal or otherwise unmanaged.

    Be explicit about limits. Encrypted traffic without inspection reveals the destination only. Off-network devices, such as a laptop on home broadband, never touch your egress controls. Third-party SDKs and tools may call the endpoint on a developer's behalf, so the traffic may come from a process the developer did not knowingly invoke. These cases are why endpoint and code-level layers exist.

    Code-level detection: repositories and CI

    Secret scanning is the best-supported layer in public guidance. NIST guidance on DevSecOps pipelines says committed code should be evaluated against organizational policy, including the absence of secrets such as keys and personal access tokens, and that a secrets-scanning step should be invoked to detect them. It also recommends heuristic tools for hardcoded secrets.

    Three practical points follow. First, scan at repository creation as well as on commit, since a repository can contain secrets before it is populated with code. Second, treat a found secret as possibly already leaked. Deleting the commit is not remediation; follow a documented process that includes revoking the key. Third, keep your scanner rules current with the key patterns you need to match, and test them against known samples.

    • Gate commits with a secret-scanning check tied to organizational policy.
    • Scan new repositories before they are populated.
    • Show detections on a security dashboard and generate alerts on policy violations.
    • Attach a documented remediation procedure to each finding, including revocation.
    • Monitor CI/CD servers for activity that could indicate exfiltration of sensitive data.
    • Set risk thresholds so that high-risk findings are investigated first.

    What examiners will ask, and where runtime enforcement fits

    Federal Reserve supervisors examine and monitor the information security practices and cybersecurity programs of supervised institutions. For direct API usage, the useful question is what controls operated and what evidence shows it. Detection logs, alerts and remediation records are the likely answer, because they show a finding was investigated and resolved. Third-party risk is also in view: the Interagency Guidelines (Appendix B to 12 CFR Part 30, as of November 2026) say service-provider contracts should require the provider to address unauthorized access to customer information and to notify the institution as soon as possible. A personal account sits outside the contract review that would normally address that expectation, which is a further reason to move usage onto a sanctioned path.

    Detection tells you what escaped. It does not apply policy to the AI usage you do sanction. Trussed addresses that second part. It enforces policy in the execution path of AI interactions and tool calls across models, agents, MCP servers and coding assistants: allow, redact, block, rate limit, or escalate for human approval. Enforced at runtime, not reviewed after the fact, each decision produces audit-ready evidence, mapped to frameworks including NYDFS and NIST. Trussed does not replace the egress and endpoint detection described above. It gives developers a sanctioned route where the policy and the evidence already exist.

    Trussed has run continuously in production in a regulated enterprise for more than 18 months. Its customers are in insurance, pharma, healthcare and education. It does not claim banking deployments, so a bank should evaluate fit against its own examiner and model risk management expectations.

    Layered detection for direct AI API traffic

    Network

    DNS, proxy and egress firewall records show which hosts reach the endpoint.

    Endpoint

    Host and IDE signals cover devices and tools the network cannot see.

    Code and CI

    Secret scanning finds keys committed to repositories and pipelines.

    Response

    Block, route to a sanctioned path, or escalate, with a recorded outcome.

    Give developers a sanctioned path with evidence behind it

    Talk through how policy enforcement in the execution path and audit-ready evidence can support your response to direct AI API findings.

    Talk to an Expert
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.