JOURNAL

GitHub Secret Scanning for Agents: What the Preview Does and Skips

Copilot security review can now run GitHub secret scanning on your changes. How to turn it on, what it misses, and what it bills.

Conceptual illustration of coordinated workers, routing, state storage and security checks.

Read with AI

Choose content to copy and paste into your AI assistant. Nothing is sent automatically. CMS content is converted to Markdown; original Markdown is used when available.

On November 17, 2026, GitHub announced that Copilot’s security review specialist can run secret scanning on demand, for developers and for agents. An editor’s note added November 18 clarified SDK authentication. The feature is in public preview and it is off by default.

If you let coding agents open pull requests, this one is worth ten minutes. Agents write a lot of code quickly, and a pasted API key in a config file is the kind of mistake they make as easily as people do.

What it checks

Per the changelog, security review now runs GitHub’s secret scanning detectors alongside its existing LLM-based review. Two parts do the detecting. Provider patterns cover more than 500 secret types, built with over 150 partners in GitHub’s secret scanning partner program. A fine-tuned model reads the surrounding code to catch likely secrets with no recognizable format, such as passwords and credentials in connection strings.

The limit is stated plainly: it checks your changes only. It does not search repository history. A key committed last year is not found by this feature.

Where it runs

Flow from a code change to the Copilot security-review specialist, which applies provider patterns and a fine-tuned model, then returns findings before merge.
Flow as described in GitHub's changelog: a change goes to the security-review specialist, which applies provider patterns and a fine-tuned model before merge.

The diagram shows the flow. A code change, from a person or an agent, goes to the security-review specialist. That specialist uses two detectors: provider patterns and the fine-tuned model. Findings come back before the change merges. GitHub lists four ways to trigger it:

  • Copilot CLI: run /settings aiSecretDetection on in an interactive session, then delegate with the task tool using agent_type: "security-review", or run /security-review.
  • Copilot app: turn on AI secret detection under Settings, Experimental, then delegate or run /security-review.
  • Copilot SDK: set the SECURITY_REVIEW_FINE_TUNED_MODEL feature flag to true and configure GitHub authentication on the client.
  • Copilot code review: in repository Settings, Copilot, Code review, turn on Secret scanning, then request a review on a pull request or enable automatic reviews.

VS Code is not included in this release.

The details that will bite

Three of them. First, the SDK path: “A model-provider API key alone is not sufficient.” Tokens issued by your own integration’s OAuth app are not supported for this yet. A GitHub CLI sign-in token is one supported approach. If you build a custom agent harness on the SDK, plan for this before you promise anyone a rollout date.

Second, billing. Scans consume AI credits under the Secret Protection AI Credit SKU. The changelog gives no per-scan price, so I cannot tell you what a busy repository would cost. Find out on a small repo before enabling it org-wide.

Third, default behavior. Until someone opts in, security review keeps using LLM-based detection only. Nothing changes on its own, which also means nothing improves on its own. Somebody has to flip the setting.

A hypothetical scenario

This is an invented example, not something I measured. An agent is asked to add a payment webhook. To test it locally it writes a signing secret into a .env.example file, and a database URL with an inline password into a test config. A human skimming a 400-line diff can miss both. A pattern detector matches the first if the secret has a known provider format. The fine-tuned model is the part meant for the second, where the password sits inside a connection string with no prefix to match.

Notice what that scenario does not cover. If the same secret had been committed to the repo three months earlier, this feature would not see it. History scanning, push protection and key rotation are still separate jobs. The new check narrows one gap: the diff that is about to merge.

There is also a question of who sees the result. In the CLI and the app, the person running the session sees it. In code review, it lands on the pull request. The changelog does not say who is notified when an autonomous agent session finds something, so decide that routing yourself before you rely on it.

My read

This is useful, and it is not a replacement for push protection or a history scan. Think of it as one more gate on the diff, placed where agent-written code gets reviewed anyway. The pairing of fixed provider patterns with a model for formatless secrets is sensible: patterns are precise for known token formats, the model covers the messy rest. The cost of the model half is false positives, and GitHub does not publish rates in this entry, so measure them yourself.

A practical rollout, based on what the page states: enable it in code review on one active repository, let it run through a normal week of pull requests, count the findings that were real, then decide. Keep your existing scanning for history. And if agents on your team commit directly, confirm the check runs on their path, not only on human pull requests.

Source: GitHub Changelog, “Secret scanning on demand for developers and agents” (Nov 17, 2026, updated Nov 18). Docs: secret scanning concepts.

Discussion

Comments are reviewed before publication. Your email is kept private.

← Back to allĐọc tiếng Việt