When a contract ends, a former consultant’s personal access token often lives on a CI runner that still has permission to call GitHub Copilot, and the organization has no audit trails for those calls. The runner continues to generate suggestions, push code, and retrieve repository data, all without anyone noticing. In another case, a service account created for a nightly build is granted a broad repo scope. The build job invokes Copilot to autocomplete large codebases, but the organization has no visibility into which files were touched or what data left the cluster. These situations illustrate a hidden attack surface: AI coding agents can act on behalf of the organization while leaving no trace.
Without a dedicated control point, every request from Copilot flows directly to the GitHub API. The traffic is encrypted, but the organization cannot see which endpoints were called, which prompts were sent, or whether a generated snippet contained a secret. Compliance programs that require evidence of who accessed external services, and security policies that demand real‑time detection of secret leakage, are impossible to satisfy. The gap is not the lack of identity verification – most teams already use OIDC tokens for CI – but the absence of a data‑path enforcement layer.
Why audit trails matter for GitHub Copilot
Audit trails give you a chronological record of every interaction between an AI coding agent and the GitHub service. They enable you to answer questions such as:
- Which user or service account triggered a specific suggestion?
- What repository and branch were accessed?
- Did the response contain a credential that should have been redacted?
Having this information helps you detect lateral movement, prove compliance during an audit, and perform forensic analysis after a breach. However, the mere presence of an identity provider or a scoped token does not create these records. The request still reaches the target directly, bypassing any gate that could log or alter the payload.
How hoop.dev provides audit trails
Enter hoop.dev, a Layer 7 gateway that sits between the Copilot client running inside Kubernetes and the GitHub API. The architecture follows three distinct layers.
Setup – identity and provisioning
First, you configure an OIDC or SAML identity provider (such as Azure AD, Google Workspace, or Okta). Service accounts used by CI pipelines receive short‑lived tokens that convey only the groups needed for Copilot access. These tokens are presented to hoop.dev, which validates them and extracts the caller’s identity. The setup step decides who may start a request, but it does not enforce any policy on its own.
The data path – the only place enforcement happens
Next, hoop.dev is deployed as a network‑resident agent inside the same Kubernetes cluster as the Copilot sidecar. All HTTP traffic from the Copilot process is routed through hoop.dev’s proxy endpoint. Because every request passes through this gateway, hoop.dev becomes the sole point where inspection, masking, and approval can be applied. No other component in the chain can alter the flow without breaking the connection.
Enforcement outcomes – what hoop.dev does
While the request travels through the data path, hoop.dev records the full HTTP method, URL, request body, and response headers. It stores a timestamped log that can be replayed later, satisfying the need for audit trails. If a response contains a pattern that matches a secret, hoop.dev masks it before it reaches the client, preventing accidental leakage. For high‑risk operations such as pushing to a production branch, hoop.dev can pause the request and require a human approver before allowing it to continue. It can also block commands that match a denylist, such as attempts to delete a repository.
All of these outcomes exist because hoop.dev sits in the data path. Remove hoop.dev and the same identity tokens would still reach GitHub, but none of the logging, masking, or approval steps would occur.
Implementing the solution
To adopt this model, start by provisioning a minimal OIDC client for your CI service accounts. Assign the repository read scope and any additional scopes required for Copilot. Deploy hoop.dev using the official Docker Compose quick‑start or the Helm chart for Kubernetes. Register the GitHub API as a connection in hoop.dev, supplying the service account credentials that the gateway will use. Finally, configure the Copilot client to point at the hoop.dev proxy URL instead of the raw GitHub endpoint. The detailed steps are covered in the getting‑started guide and the broader learn section.
FAQ
Does hoop.dev add noticeable latency to Copilot suggestions?
Because hoop.dev operates at the protocol layer and only inspects metadata, the added latency is typically a few milliseconds, far below the human perception threshold.
Where are the credentials stored?
hoop.dev holds the GitHub token in memory within the gateway process. The Copilot client never sees the raw credential, eliminating the risk of credential exposure in logs or environment variables.
Can I use the same gateway for other services in the cluster?
Yes. hoop.dev can proxy multiple HTTP‑based targets, so you can extend the same audit‑trail architecture to other SaaS APIs used by your workloads.
Ready to see the code and contribute? Explore the open‑source repository on GitHub.