How to Configure Windsurf Kubernetes Audit Log

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a windsurf kubernetes audit log by turning on API server audit policies. You also bind each coding agent user to a distinct cluster role. On June 2, 2026, Cognition renamed Windsurf to Devin Desktop while keeping the same IDE features. Its agent runs terminal commands on its own with user permission. The agent uses a dedicated terminal that loads the user shell setup. This gives the agent all local aliases, variables, and cluster keys. When teams share broad cluster roles, the agent i

Audit Log Integrity + Kubernetes Audit Logs: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up a windsurf kubernetes audit log by turning on API server audit policies. You also bind each coding agent user to a distinct cluster role. On June 2, 2026, Cognition renamed Windsurf to Devin Desktop while keeping the same IDE features. Its agent runs terminal commands on its own with user permission. The agent uses a dedicated terminal that loads the user shell setup. This gives the agent all local aliases, variables, and cluster keys. When teams share broad cluster roles, the agent inherits too much power.

How a windsurf kubernetes audit log tracks agent calls

The IDE agent runs commands in a dedicated terminal on the developer machine. It uses zsh on macOS and bash on Linux. Because the shell loads user settings, the agent uses the developer cluster config. When the agent runs a cluster command, it talks to the API server.

The API server checks role rules before it runs the request. A Role sets rules inside one namespace. A ClusterRole sets rules across the whole cluster. A RoleBinding grants rules inside a single namespace. A ClusterRoleBinding grants rules across every namespace in the cluster.

All role rules in the cluster are additive. There are no deny rules in native cluster access control. After the API server checks the role, it writes an entry to the audit log. This log records the user identity, the target resource, and the API verb.

Some API calls use subresources like pod logs or pod exec sessions. In role rules, you write these subresources with a slash. The API server logs when a user starts a pod exec call or reads pod logs. Teams ship these log files to a central store for security checks.

Why native roles and logs leave a runtime gap

Native roles and API audit logs solve the first layer of cluster tracking. They tell you which user key talked to the API server. They also block requests when a role lacks the right resource verb. This works well for basic API calls like listing pods in a namespace.

Still, native setup leaves a wide gap during active agent sessions. First, the coding agent uses the developer shell and local keys. The API log shows the human user name, not the AI agent. Auditors cannot tell if a human or the agent ran a destructive command.

Audit Log Integrity + Kubernetes Audit Logs: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Second, role rules only check who starts an action, not what happens inside it. When the agent opens a pod exec session, the API log records the start event. It does not inspect the shell commands that run inside the container. If the agent reads pod logs or database rows, native logs do not mask the output. Sensitive emails, phone numbers, card numbers, and national IDs flow straight into the agent terminal.

Scoping roles for coding agents

Teams can reduce risk by giving the agent a separate service account. You can bind this account to a small Role inside one test namespace. You should avoid ClusterRoleBindings for local agent accounts whenever you can.

Because rules are only additive, you must start with zero permissions. Add only the specific resources and subresources the task needs. Even with tight roles, native logs still miss the exact commands inside exec sessions. They also cannot rewrite sensitive fields like card numbers or emails in command output.

Add request guardrails and response masking beside Kubernetes

Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev sits inline beside the API server as a sidecar for your Kubernetes API. For every production API call an agent or human sends, hoop.dev decides whether to pass, mask, block, or escalate it for review alongside RBAC.

With hoop.dev Kubernetes controls, guardrails allow listing Secret names while refusing reads of Secret data before execution, and data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.

Frequently asked questions

Is Windsurf the same tool as Devin Desktop?

Yes, on June 2, 2026, Cognition renamed Windsurf to Devin Desktop. The IDE keeps the same features, and old doc links redirect to the new site.

How does the agent get access to my cluster?

The agent runs commands in a dedicated terminal with your permission. That terminal loads your shell setup, so it uses your local cluster keys and variables.

Can native Kubernetes RBAC deny specific commands inside a pod exec session?

No, native role rules are purely additive and have no deny rules. They only control who can open the exec subresource, not which shell commands run inside.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.