# GitHub ends never-expiring tokens for new apps and gives Copilot agents short-lived ones

From Jan 5, 2027, new GitHub Apps and OAuth apps can only issue user tokens that expire after eight hours. GitHub also made short-lived app tokens for Copilot agents generally available, and Copilot code review can now flag vulnerable dependencies.

By [AI Security Times](https://aisecuritytimes.com/authors/ai-security-times) · Published 2026-12-05T06:09:00Z
Canonical: https://aisecuritytimes.com/tech/github-expiring-user-tokens-copilot-agent-tokens

GitHub announced three changes in two days that all deal with the same problem: credentials and code that are trusted for too long. New apps will lose the option of user tokens that never expire, AI agents built on Copilot get their own short-lived tokens, and Copilot code review can now warn about vulnerable packages before they are merged.

## New apps: user tokens expire after eight hours

"Starting January 5, 2027, newly registered GitHub Apps and OAuth apps support only expiring user access tokens. Tokens issued before then aren't affected," GitHub wrote on Dec 4.

Expiring tokens were already the default for new apps, but developers could opt out when registering an app and issue user tokens that never expire. GitHub explains why that option is going: "A non-expiring token stays valid until it's revoked, so a leaked token can be used indefinitely."

From Jan 5, the opt-out disappears for new registrations on GitHub.com and GHE.com. User access tokens for new apps then expire after eight hours, and the app uses a refresh token to get a new one without asking the user to sign in again. GitHub's advice to developers: "make sure your app or authentication SDK supports the refresh token flow before you register it."

Existing apps and the tokens they already issued are not affected, so organizations that rely on older integrations with non-expiring tokens should still review them on their own.

## Copilot agents get tokens of their own

On Dec 3, GitHub made server-to-server authentication for Copilot generally available, after a public preview that began in October. It "lets services and agents built with the Copilot SDK use short-lived GitHub App installation tokens to make requests on behalf of an organization without relying on a signed-in user's credentials."

That matters for anyone running AI agents in automated pipelines. An agent that borrows a person's credentials acts with all of that person's rights, and its actions are hard to tell apart from theirs. With an app token, the agent has its own identity. GitHub says usage is billed to the organization where the app is installed, the organization's model policies, budgets and spending controls still apply, and owners can see app usage in AI usage reports and "stop an app's access by suspending or uninstalling it."

## Copilot code review checks new dependencies

Also on Dec 3, GitHub added two scans to Copilot code review, both in public preview. "Copilot code review can now flag a risky dependency in the pull request that adds it, so you can fix it before you merge," GitHub says.

When a pull request adds or updates a package, Copilot checks it against the advisories GitHub has reviewed in the GitHub Advisory Database. Its comments name the advisories, their severity and the first patched version, if one exists. Low-severity advisories are not reported. A second scan comments when a package's license falls outside a built-in set of commonly allowed open-source licenses.

Both scans are off by default. They are turned on in the organization or repository settings under **Copilot** > **Code review**, are available on the Copilot Pro, Pro+, Max, Business and Enterprise plans, and use AI credits on each review.

## What to do

- **App developers:** add support for the refresh token flow now if you plan to register new GitHub Apps or OAuth apps after Jan 5, 2027.
- **Organization owners:** list the apps and integrations that still hold non-expiring user tokens; the new rule does not touch them.
- **Teams running Copilot-based agents:** move them from personal credentials to an app installation, so each agent has its own identity and can be switched off on its own.
- **Teams on supported Copilot plans:** consider turning on the dependency scan as an extra check, alongside your existing dependency checks.

## Sources

1. [GitHub Changelog: New GitHub Apps and OAuth apps require expiring user tokens (Dec 4, 2026)](https://blog.github.com/changelog/2026-12-04-require-expiring-user-tokens-for-new-github-apps-and-oauth-apps-ga-ga/) (GitHub)
2. [GitHub Changelog: GitHub Copilot server-to-server authentication is now generally available (Dec 3, 2026)](https://blog.github.com/changelog/2026-12-03-github-copilot-server-to-server-authentication-is-now-generally-available/) (GitHub)
3. [GitHub Changelog: Copilot code review: Dependency vulnerability and license compliance scans (Dec 3, 2026)](https://blog.github.com/changelog/2026-12-03-copilot-code-review-dependency-scans/) (GitHub)

Topics: [Authentication](https://aisecuritytimes.com/topics/authentication), [AI agents](https://aisecuritytimes.com/topics/ai-agents), [Supply chain](https://aisecuritytimes.com/topics/supply-chain)
