---
title: "OpenCode Console Goes Keyless: What OIDC Fixes for AI in CI, and What It Leaves on the Laptop | Anomity Blog"
description: "OpenCode Console service accounts can now call models from CI with short-lived OIDC tokens instead of stored API keys. What changes, what does not, and what to audit."
url: "https://anomity.ai/blog/opencode-console-keyless-oidc-auth-ci/"
source: html
---

OpenCode Console Goes Keyless: What OIDC Fixes for AI in CI, and What It Leaves on the Laptop

Contents

- What OpenCode shipped
- Why this matters: the key in the CI secret
- Keyless is not the fix for the October breach
- Set the trust up narrower than the key it replaces
- The part keyless cannot reach: the laptop
- The Console controls to turn on alongside it
- How Anomity helps
- Frequently asked questions

0%

8 min read

Share

- X.com

- LinkedIn

- Email

- Copy URL

- Copy markdown

[← Back to blog](https://anomity.ai/blog/)

- Home

- Blog

- OpenCode Console Goes Keyless: What OIDC Fixes for AI in CI, and What It Leaves on the Laptop

![Anomity robot illustrating OpenCode Console Goes Keyless: What OIDC Fixes for AI in CI, and What It Leaves on the Laptop]

Insights

# OpenCode Console Goes Keyless: What OIDC Fixes for AI in CI, and What It Leaves on the Laptop

Anomity Research
Anomity Research
·
Nov 21, 2026
·
8 min read

Share: Copied

TL;DR

- OpenCode Console now supports keyless auth. A new service account asks "Where will it run?" and offers GitHub Actions , Custom OIDC (GitLab, CircleCI, Kubernetes or any OIDC issuer) and, as the fallback, a classic API key .
- The promise, in OpenCode's own words: short-lived tokens from your workload, with no secret to store or leak. A pipeline proves who it is to Console at run time instead of carrying an oc_sk_ key in a CI secret.
- This lands a month after OpenCode disclosed a breach of a legacy Console system that exposed provider keys saved in Console workspaces. Keyless is a different fix: it removes the Console key in your pipeline , not the provider keys you saved in Console .
- Classic keys are not going away. They still default to whatever expiry you pick, and Never is one of the options. Every existing key in a CI secret, a .env file or a shell profile stays valid until someone revokes it.
- An OIDC trust is only as tight as the claims you match. Bind it to a specific repository and branch or environment , not a whole organisation, and keep it away from workflows that run untrusted pull-request code.
- Keyless solves the pipeline. The developer laptop is where long-lived AI keys actually accumulate, and no CI feature reaches it.
- OpenCode Console also ships Providers and Tools policies that apply to every connected OpenCode client within about a minute, and a managed configuration that outranks user and project files. Those are the controls to turn on alongside keyless.

On November 21, OpenCode announced that **OpenCode Console now supports keyless auth**. Calling models from CI, or from anywhere that supports OIDC, no longer requires a long-lived API token. It is a small screen in the Console and a meaningful change in how AI usage in pipelines can be secured, and it is worth understanding precisely, because the obvious reading ("OpenCode fixed its key problem") is not quite what it does.

This post covers what the feature does, how it relates to the Console breach OpenCode disclosed in October, how to set the trust up so it is actually narrower than the key it replaces, and the part of the problem no CI feature can reach. For the broader argument against static credentials in agent workflows, see our guide to [secrets management for AI agents](https://anomity.ai/blog/secrets-management-for-ai-agents/).

## What OpenCode shipped

When you add a **service account** in OpenCode Console, the dialog now asks one question: **Where will it run?** The subtitle states the design goal plainly: "Short-lived tokens from your workload, with no secret to store or leak." There are three answers:

- GitHub Actions - workflows in a repository. The workflow presents the OIDC token GitHub issues to each run, and Console exchanges it for short-lived access.
- Custom OIDC - GitLab, CircleCI, Kubernetes, or any OIDC issuer. The same pattern, for any platform that can mint a signed identity token for a workload.
- API key - "a secret key for anywhere else." The existing model, now presented as the fallback rather than the default.

A **service account** in Console is, per OpenCode's documentation, a non-human member of the workspace with its own API keys, usage and budget. Its usage counts against its own budget rather than a person's, and its keys cannot invite members, manage billing, or create and remove service accounts, even with full permissions. Keyless auth gives that non-human member a way to authenticate without a stored secret at all.

At the time of writing, the Console documentation describes service accounts and API keys in detail but does not yet document the OIDC configuration itself, so the exact claims Console lets you match on are something to check in the product before you rely on them.

## Why this matters: the key in the CI secret

The pattern keyless replaces is familiar. Someone creates an API key, pastes it into the CI platform's secret store, and a workflow reads it as an environment variable. That key now lives in at least three places - the vendor, the CI platform, and the memory of every job that ran - and it is valid for as long as its expiry says. Console keys use the `oc_sk_` prefix, are shown in full only once, and offer expiry options of 1, 7 or 30 days, a custom period up to 365 days, or **Never**.

Long-lived model keys are a theft target in their own right. Stolen inference keys are monetised directly, as we covered in [LLMjacking and stolen-key cost abuse](https://anomity.ai/blog/llmjacking-stolen-key-cost-abuse/), and CI is where they get stolen: a poisoned dependency or a prompt-injected workflow reads the environment and ships it out, which is the chain in [the Cline GitHub Actions token theft](https://anomity.ai/blog/cline-github-actions-npm-token-theft-unauthorized-release/). An OIDC token issued for one job run, valid for minutes and useless outside that job, removes most of what makes that attack worthwhile.

Stored API key Keyless (OIDC)

Where the secret lives Vendor, CI secret store, job environment Nowhere long-term; minted per run

Lifetime Whatever was chosen at creation, including Never Short-lived, per workload

What a thief gets A key that works from anywhere until revoked A token that expires shortly after the job

Rotation burden Manual, and usually skipped None for the pipeline

What decides access Possession of the string The identity claims of the workload

## Keyless is not the fix for the October breach

On October 17, OpenCode disclosed unauthorized access to a legacy Console system that exposed **third-party provider keys** saved in Console workspaces - the OpenAI and Anthropic keys customers linked for bring-your-own-key use. We covered what was confirmed and how to rotate in [our advisory on the OpenCode Console breach](https://anomity.ai/blog/opencode-console-breach-ai-provider-keys-rotation/).

It is tempting to read keyless auth as the response, and the timing invites it. But the two are different credentials. Keyless changes how **your pipeline authenticates to Console**. It does not change the fact that a provider key you link to a Console workspace is stored by Console. If your concern after October is provider keys held by a third party, the answer is still to rotate at the provider, scope and spend-cap those keys, and decide deliberately which keys any gateway is allowed to hold.

What keyless does do is shrink a different blast radius. A pipeline that uses OIDC has no Console key to leak, so a compromised build or a leaked CI log no longer hands an attacker free inference billed to your workspace.

## Set the trust up narrower than the key it replaces

OIDC moves the security decision from "who holds the string" to "which workload identities are trusted". That decision can be made badly. A trust that accepts any workflow in an organisation is, in practice, a key that every repository and every contributor's branch can use. The general rules for workload identity federation apply here:

- Match the repository, not the organisation. Trust the one repository that needs model access.
- Match the branch or deployment environment. A trust limited to the default branch or a protected environment cannot be exercised from a feature branch someone pushed five minutes ago.
- Keep it away from untrusted pull-request code. Workflows that run code from forks or from unreviewed pull requests should not be able to obtain the token at all.
- One service account per pipeline purpose. Separate budgets and separate audit trails beat one shared account that every workflow uses.
- Use Restricted or Read-only permissions where the job only needs inference. A key, and by extension a service account, never has more access than the member it acts as, so keep the service account itself minimal.
- Revoke the old key the same day. Keyless only removes risk once the stored key it replaced is gone. Leaving it in the CI secret store "just in case" keeps the original exposure and adds a new path.

This is ordinary [non-human identity governance](https://anomity.ai/blog/non-human-identity-governance-guide/) applied to a new vendor: an owner for each service account, a scope written down, and a lifecycle that ends.

## The part keyless cannot reach: the laptop

Pipelines are the easy case, because they already have a verifiable identity to federate. A developer running OpenCode, Claude Code or Codex on a laptop does not, and that is where long-lived AI keys actually pile up: in shell profiles, `.env` files, MCP server configs and agent settings files, often copied between projects and rarely revoked. The keyless option is also labelled for exactly this case: the API key is for "anywhere else", and a laptop is anywhere else.

So the realistic end state for most organisations is mixed for a long time: some pipelines on OIDC, older pipelines on stored keys, and a long tail of personal and workspace keys on developer machines. A key with no expiry that nobody remembers creating is the one that gets used in the next LLMjacking incident. The pipeline is now solvable. The fleet is an inventory problem.

## The Console controls to turn on alongside it

Keyless is not the only governance feature in OpenCode Console, and it is worth pairing with the ones that reach developer machines. Per OpenCode's policies documentation, a connected Console workspace turns its **Providers** and **Tools** policies into allow and deny statements applied to every connected OpenCode client. Changes take effect on the next fetch, roughly once a minute, and if Console is unreachable the last statements stay in effect.

Above the Console sits **managed configuration**: a macOS managed preferences file or a system-level `opencode.json`, which outranks both the Console and every user and project file, so a repository cannot re-enable a provider the organisation denied. Managed policies can deny providers, MCP servers, skills, plugins and specific tool permission checks, and can limit users to a single Console workspace, blocking personal accounts and the free tier. OpenCode is also explicit about the limits: policies do not configure credentials, and they do not sandbox plugin code.

That is a strong set of controls for the OpenCode clients you know about and have connected. The open question for a security team is the same one every vendor control leaves: which machines run OpenCode, or any other agent, that are not connected to your workspace at all.

## How Anomity helps

Anomity is built for the part of this problem that vendor controls do not see. The **Endpoint Sensor** inventories the AI agents on every managed machine, OpenCode CLI and OpenCode Desktop among them, along with their MCP servers, plugins, skills and hooks, and finds credentials sitting in AI tool configs and dotfiles. Secrets are redacted on the endpoint before anything leaves the device, so the inventory says where a key is without ever holding it.

The **Browser Sensor** shows which AI web services people use and whether they are signed in with a corporate or a personal account, which is how a personal OpenCode workspace next to the company one becomes visible. **Cloud discovery** covers the GitHub OAuth grants AI applications hold, and at the agent hook, Anomity can allow, deny or log a tool call before it runs. Findings route to your SIEM, Slack, email or Jira, with a 90-day metadata-only audit trail.

Keyless auth makes the pipeline the easy part. If you want to see where long-lived AI keys and unmanaged agents still live on your fleet, [book a 30-minute demo](https://anomity.ai/#early-access).

Docker made a similar move at the runtime layer the same week, launching sandboxes and central governance for coding agents. We look at what that boundary covers in [Docker AI Governance and Sandboxes](https://anomity.ai/blog/docker-ai-governance-sandboxes-agent-visibility/).

Share: Copied

## Frequently asked questions

What is OpenCode Console keyless auth?
It lets an OpenCode Console service account authenticate with short-lived tokens from the workload it runs in, instead of a stored API key. When you create a service account, Console offers GitHub Actions, Custom OIDC for platforms such as GitLab, CircleCI and Kubernetes, or a classic API key for anywhere else.

Does keyless auth protect the provider keys exposed in the October 2026 Console breach?
No. The October breach exposed third-party provider keys, such as OpenAI and Anthropic keys, that customers had saved in Console workspaces. Keyless auth changes how your pipeline authenticates to Console. Provider keys linked to Console are still stored by Console, so rotation at the provider and spend limits remain the right response to that incident.

Are OpenCode Console API keys going away?
No. The API key option remains for environments that cannot present an OIDC token. Console keys use the oc_sk_ prefix, are shown in full only once, and can be created with an expiry of 1, 7 or 30 days, a custom period up to 365 days, or never.

How should we configure an OIDC trust for CI?
Make it narrower than the key it replaces. Trust a specific repository rather than a whole organisation, limit it to a protected branch or deployment environment, keep it unavailable to workflows that run untrusted pull-request code, give each pipeline purpose its own service account, and revoke the stored key it replaced on the same day.

Does keyless auth help with API keys on developer laptops?
Not directly. Keyless works where a workload already has a verifiable identity, such as a CI job. A developer laptop does not, which is why long-lived AI keys accumulate there in shell profiles, .env files and agent configs. That is an inventory problem across the fleet rather than something a CI feature can solve.

What other OpenCode Console controls should security teams use?
Providers and Tools policies, which apply to every connected OpenCode client within about a minute, and managed configuration through macOS managed preferences or a system-level opencode.json, which outranks user and project files. Managed policies can deny providers, MCP servers, skills, plugins and tool permission checks, and can restrict users to one Console workspace.

How does Anomity help with this?
Anomity's Endpoint Sensor inventories AI agents such as OpenCode on every managed machine, with their MCP servers, plugins, skills and hooks, and finds credentials in AI tool configs and dotfiles, redacted on the endpoint. The Browser Sensor shows corporate versus personal sign-ins on AI web services, and cloud discovery covers GitHub OAuth grants held by AI applications.

## Related posts

[Advisory High ### Cline GitHub Actions Compromise and Unauthorized npm Release - cline@2.3.0 On February 17, 2026 an attacker stole the Cline CLI's npm publish token via a prompt-injection-and-cache-poisoning chain in its GitHub Actions workflows and shipped an unauthorized cline@2.3.0 release (with an openclaw-installing postinstall script). The VS Code extension was not affected. No CVE (tracked as GHSA-9ppg-jx86-fqw7). Anomity Research · Feb 18, 2026 · No CVE; supply-chain incident](https://anomity.ai/blog/cline-github-actions-npm-token-theft-unauthorized-release/)

[Advisory Critical ### Shai-Hulud 2.0 npm Worm Backdoors 796 Packages - Preinstall Credential Theft and Home-Directory Wiper Shai-Hulud 2.0, identified November 24 2025, is a self-replicating npm worm that backdoored 796 packages and runs a credential stealer during preinstall. Anomity Research · Nov 24, 2025 · Shai-Hulud 2.0 (no single CVE; npm supply-chain worm campaign)](https://anomity.ai/blog/shai-hulud-2-npm-worm-credential-stealer/)

[Advisory High ### OpenCode Console Breach - Exposed AI Provider Keys and How to Rotate Them OpenCode says a breach of a legacy Console system exposed provider keys for 1.4% of Console users. What is confirmed, who is affected, and how to rotate keys. Anomity Research · Oct 18, 2026 · OpenCode Console breach, disclosed October 17, 2026 (no CVE or GHSA)](https://anomity.ai/blog/opencode-console-breach-ai-provider-keys-rotation/)

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "OpenCode Console Goes Keyless: What OIDC Fixes for AI in CI, and What It Leaves on the Laptop",
  "description": "OpenCode Console service accounts can now call models from CI with short-lived OIDC tokens instead of stored API keys. What changes, what does not, and what to audit.",
  "datePublished": "2026-11-21",
  "dateModified": "2026-11-21",
  "author": {
    "@type": "Person",
    "name": "Anomity Research",
    "jobTitle": "Anomity Research"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Anomity",
    "url": "https://anomity.ai/",
    "sameAs": [
      "https://www.linkedin.com/company/anomity",
      "https://github.com/Anomity-ai",
      "https://www.wikidata.org/wiki/Q140763940"
    ],
    "logo": {
      "@type": "ImageObject",
      "url": "https://anomity.ai/anomity-logo.png"
    }
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://anomity.ai/blog/opencode-console-keyless-oidc-auth-ci/",
    "relatedLink": [
      "https://anomity.ai/blog/cline-github-actions-npm-token-theft-unauthorized-release/",
      "https://anomity.ai/blog/shai-hulud-2-npm-worm-credential-stealer/",
      "https://anomity.ai/blog/opencode-console-breach-ai-provider-keys-rotation/"
    ]
  },
  "image": {
    "@type": "ImageObject",
    "url": "https://anomity.ai/assets/blog/covers/audit-compliance.jpg",
    "width": 1200,
    "height": 630
  },
  "articleSection": "Insights",
  "wordCount": 1574,
  "timeRequired": "PT8M",
  "inLanguage": "en",
  "url": "https://anomity.ai/blog/opencode-console-keyless-oidc-auth-ci/",
  "keywords": "OpenCode keyless auth, OpenCode, keyless authentication, OIDC, CI/CD security, AI API keys, non-human identity, agentic AI security"
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is OpenCode Console keyless auth?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It lets an OpenCode Console service account authenticate with short-lived tokens from the workload it runs in, instead of a stored API key. When you create a service account, Console offers GitHub Actions, Custom OIDC for platforms such as GitLab, CircleCI and Kubernetes, or a classic API key for anywhere else."
      }
    },
    {
      "@type": "Question",
      "name": "Does keyless auth protect the provider keys exposed in the October 2026 Console breach?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No. The October breach exposed third-party provider keys, such as OpenAI and Anthropic keys, that customers had saved in Console workspaces. Keyless auth changes how your pipeline authenticates to Console. Provider keys linked to Console are still stored by Console, so rotation at the provider and spend limits remain the right response to that incident."
      }
    },
    {
      "@type": "Question",
      "name": "Are OpenCode Console API keys going away?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "No. The API key option remains for environments that cannot present an OIDC token. Console keys use the oc_sk_ prefix, are shown in full only once, and can be created with an expiry of 1, 7 or 30 days, a custom period up to 365 days, or never."
      }
    },
    {
      "@type": "Question",
      "name": "How should we configure an OIDC trust for CI?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Make it narrower than the key it replaces. Trust a specific repository rather than a whole organisation, limit it to a protected branch or deployment environment, keep it unavailable to workflows that run untrusted pull-request code, give each pipeline purpose its own service account, and revoke the stored key it replaced on the same day."
      }
    },
    {
      "@type": "Question",
      "name": "Does keyless auth help with API keys on developer laptops?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Not directly. Keyless works where a workload already has a verifiable identity, such as a CI job. A developer laptop does not, which is why long-lived AI keys accumulate there in shell profiles, .env files and agent configs. That is an inventory problem across the fleet rather than something a CI feature can solve."
      }
    },
    {
      "@type": "Question",
      "name": "What other OpenCode Console controls should security teams use?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Providers and Tools policies, which apply to every connected OpenCode client within about a minute, and managed configuration through macOS managed preferences or a system-level opencode.json, which outranks user and project files. Managed policies can deny providers, MCP servers, skills, plugins and tool permission checks, and can restrict users to one Console workspace."
      }
    },
    {
      "@type": "Question",
      "name": "How does Anomity help with this?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Anomity's Endpoint Sensor inventories AI agents such as OpenCode on every managed machine, with their MCP servers, plugins, skills and hooks, and finds credentials in AI tool configs and dotfiles, redacted on the endpoint. The Browser Sensor shows corporate versus personal sign-ins on AI web services, and cloud discovery covers GitHub OAuth grants held by AI applications."
      }
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://anomity.ai/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Blog",
      "item": "https://anomity.ai/blog/"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "OpenCode Console Goes Keyless: What OIDC Fixes for AI in CI, and What It Leaves on the Laptop",
      "item": "https://anomity.ai/blog/opencode-console-keyless-oidc-auth-ci/"
    }
  ]
}
```
