Engineering

GitHub Copilot Adds On-Demand Secret Scanning and Adaptive Code Review for AI Agents

GitHub shipped on-demand secret scanning (500+ partner detectors plus a fine-tuned ML model) across Copilot CLI, SDK agents, and PR reviews on November 17, 2026, alongside Adaptive review effort and Repository insights. Learn the opt-in flags, billing SKUs, and governance guardrails.

By 0xScorPionSon

7 min read

GitHub Copilot Adds On-Demand Secret Scanning and Adaptive Code Review for AI Agents

GitHub Copilot Secret Scanning for Agents DevSecOps infographic

Executive Summary

On November 17, 2026, GitHub shipped a coordinated set of DevSecOps and engineering governance updates across its Secret scanning on demand, Copilot code review, and Repository insights changelogs. Most notably, Copilot's security-review specialist now executes GitHub's deterministic secret scanning detectors alongside a fine-tuned credential-detection model inside Copilot CLI, the Copilot app, Copilot SDK agent sessions, and pull request code reviews.

Crucially for security teams, secret scanning in Copilot security review is off by default. Until explicitly enabled per tool or repository, security review relies solely on its existing LLM-based check. Furthermore, the on-demand scan inspects only changed/added lines in the active diff—it does not scan historical Git commits. Alongside secret detection, GitHub introduced Adaptive review effort (auto-selecting between Lite, Balanced, and Max depth in public preview), cross-repository context for public repositories, Repository insights for measuring review effectiveness, and general availability of Copilot code review for Azure DevOps (Azure Repos).

Confidence Level: High. All feature capabilities, opt-in flags, billing SKUs, plan eligibility, and metric definitions are directly verified from three primary GitHub Changelog announcements published November 17, 2026. Independent third-party false-positive benchmarks for the fine-tuned ML model are not yet published in these release notes.

Technical Mechanics & Architecture

Traditional secret scanning operates either as a pre-receive push-protection hook or as a post-push repository alert. As engineering teams delegate multi-file edits to autonomous coding agents, credentials can be introduced into local working trees or generated connection strings long before a pull request is opened. GitHub's November 17 architecture shifts deterministic and ML-based secret detection directly into the agent loop and PR review gate.

Dual-Engine Secret Detection (Deterministic + Fine-Tuned Model)

Once opted in, Copilot's security-review specialist and Copilot code review combine two complementary detection layers on added/changed lines:

  1. Deterministic Provider Patterns: Runs GitHub's catalog of 500+ secret types built with 150+ industry partners through the secret scanning partner program, using high-confidence regex and format validators for known API keys, cloud tokens, and service credentials.
  2. Fine-Tuned ML Secret Detection: Reads surrounding code context to identify unstructured or custom credentials that lack standardized prefixes—such as hardcoded database passwords or connection-string secrets.
+-----------------------------------------------------------------------+
|                DEVELOPER & AI AGENT WORKFLOWS                         |
|                                                                       |
|  [ Copilot CLI ]          [ Copilot App ]       [ Custom SDK Agent ]  |
|  /settings aiSecret-      Settings >            SECURITY_REVIEW_      |
|  Detection on             Experimental          FINE_TUNED_MODEL=true |
+---------+------------------------+------------------------+-----------+
          |                        |                        |
          +------------------------+------------------------+
                                   |
                                   v  (Calls security-review specialist)
+-----------------------------------------------------------------------+
|              ON-DEMAND SECRET SCANNING (ACTIVE DIFF ONLY)             |
|  1. Deterministic Engine: 500+ partner patterns (150+ partners)       |
|  2. Fine-Tuned Model: Unstructured passwords & connection strings       |
|  * Off by default | Consumes Secret Protection AI Credit SKU          |
+----------------------------------+------------------------------------+
                                   |
                                   v  (Pull Request / Branch Gate)
+-----------------------------------------------------------------------+
|             COPILOT CODE REVIEW & REPOSITORY INSIGHTS                 |
|  * Adaptive Effort: Auto-selects Lite / Balanced / Max (capped by org)|
|  * Cross-Repo Context: Reads dependent public repos & custom skills   |
|  * Telemetry: Addressed rate, human follow-ups, unreviewed merges     |
+-----------------------------------------------------------------------+

Safe Opt-In Configuration Across CLI, SDK, and PRs

Because secret scanning in Copilot security review is disabled by default, engineering teams must explicitly opt in across each surface where developers or autonomous agents generate code:

# 1. Copilot CLI (interactive session): enable AI secret detection and invoke review
/settings aiSecretDetection on
/security-review

For custom internal agents built on the Copilot SDK, enable the fine-tuned model flag at session creation and delegate to the security-review specialist before returning diffs to a user or opening a PR:

// Copilot SDK session configuration (opt-in secret scanning before returning changes)
const sessionConfig = {
  featureFlags: {
    SECURITY_REVIEW_FINE_TUNED_MODEL: true,
  },
};

// Delegate to the built-in security-review specialist via RPC
await session.rpc.tasks.startAgent({
  agentType: "security-review",
});

On GitHub repositories, administrators enable the same dual-engine check under Settings > Copilot > Code review > Security > Secret scanning, and can pair it with automatic PR reviews or branch rules.

Adaptive Review Effort & Cross-Repository Context

In Copilot code review, Balanced remains the default effort level, while Adaptive (public preview) dynamically selects Lite (for low-risk changes like documentation), Balanced, or Max (for high-risk changes such as authentication logic). Critically for cost and latency governance, Adaptive never exceeds the maximum review effort level configured at the enterprise, organization, or repository tier.

For public repositories, cross-repository context (public preview) lets Copilot code review inspect related public repositories to flag breaking signature changes, downstream consumer dependencies, and external documentation or custom agent skills.

Evidence & Operational Scope

Surface-by-Surface Capability & Billing Matrix

Data from GitHub's November 17, 2026 changelog releases establishes exact availability, opt-in paths, and billing boundaries:

Surface Opt-In Mechanism Scope & Governance Notes Billing / Plan Eligibility
Copilot CLI /settings aiSecretDetection on Scans local diff via /security-review or task (agent_type: "security-review") Existing Copilot security review access; Secret Protection AI Credit SKU
Copilot App Settings > Experimental (AI secret detection) Manual /security-review or agent delegation via task Existing Copilot security review access; Secret Protection AI Credit SKU
Copilot SDK SECURITY_REVIEW_FINE_TUNED_MODEL: true session.rpc.tasks.startAgent (agentType: "security-review") Existing Copilot security review access; Secret Protection AI Credit SKU
Copilot Code Review (GitHub) Settings > Copilot > Code review > Secret scanning Flags secrets on added PR lines; Adaptive capped by org max effort Copilot Pro, Pro+, Max, Business, Enterprise
Copilot Code Review (Azure DevOps) Org/Project/Repo settings + Branch policy Generally Available; Lite or Balanced effort; audit-logged Billed in GitHub AI credits to linked Azure subscription

Measuring Governance with Repository Insights

To verify whether AI reviews actually reduce human review load or leave coverage gaps, GitHub's new Repository insights page (under each repo's Insights tab) and the repos-1-day Copilot usage metrics API expose four core signals:

  1. Comments addressed: Share of Copilot code review comments acted upon by developers.
  2. High-severity comments addressed: Action rate specifically on high-severity findings.
  3. Pull requests with no later human change request: PRs reviewed by Copilot that merged without subsequent human change requests.
  4. Merged pull requests without Copilot review: Direct visibility into repositories or branches bypassing AI review gates.

Hardening & Governance Playbook

Adopting agentic secret scanning and automated PR reviews introduces new cost, scope, and coverage risks if deployed without explicit guardrails.

1. Enforce Opt-In Secret Scanning on All Agentic Workflows

Because security-review defaults to LLM-only checks until opted in, mandate SECURITY_REVIEW_FINE_TUNED_MODEL: true in all internal Copilot SDK wrappers and enable Secret scanning under Settings > Copilot > Code review for production repositories.

2. Keep Traditional Push Protection & Full-History Scanning Active

On-demand Copilot secret scanning only inspects changed/added lines in the current diff—it does not scan Git history. Never disable repository-wide GitHub Secret Scanning or Push Protection; treat Copilot's on-demand scan as a shift-left pre-commit/pre-PR layer, not a replacement for repository-wide scanning.

3. Cap Adaptive Review Effort & Monitor AI Credit Spend

Set an explicit maximum review effort level at the organization or enterprise tier before enabling Adaptive globally, preventing trivial PRs or high-churn bot PRs from consuming unexpected AI credits. For Azure DevOps organizations, configure budget alerts in Azure Cost Management against the linked subscription and verify audit log events when Copilot review settings are toggled.

4. Audit Review Coverage via the Copilot Usage Metrics API

Ensure the Copilot usage metrics policy is enabled for your enterprise or organization, then query the repos-1-day reports (accessible to enterprise/org owners, billing managers, or custom roles with View Copilot Metrics) to flag repositories with high counts of Merged pull requests without Copilot review:

# Example read-only audit: verify organization Copilot metrics API access
# Requires a token with enterprise/org owner or 'View Copilot Metrics' permission
curl -sS -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github+json" \
  "https://api.github.com/orgs/<ORG>/copilot/metrics" | jq '.[0] | {date, total_active_users}'

5. Rollback & Exception Notes

If Adaptive review effort or AI secret detection introduces excessive latency or noisy comments on a legacy repository, toggle Secret scanning off in Settings > Copilot > Code review or revert the default review effort to Balanced or Lite at the repository level without impacting organization-wide push protection.

Frequently Asked Questions

Does Copilot's on-demand secret scanning search my entire Git history? No. GitHub explicitly states that the on-demand review checks only your current code changes (added lines in diffs or pull requests) and does not search repository history.

Is an additional GitHub Advanced Security plan required to use Copilot secret scanning? No additional plan is required if you already have access to Copilot security review or Copilot code review, though scans consume AI credits under the Secret Protection AI Credit SKU.

Can Adaptive code review override my organization's maximum effort setting? No. GitHub confirms that Adaptive never selects a review effort level (Lite, Balanced, or Max) above the maximum effort level configured for your enterprise, organization, or repository.

Does cross-repository context work for private internal repositories? In the November 17, 2026 public preview announcement, cross-repository context is available for public repositories only.

How do Azure DevOps teams enforce Copilot code review automatically? Administrators can enable Copilot code review at the Azure DevOps organization, project, or repository level and attach a branch policy to automatically request a Copilot review on pull requests targeting protected branches.

Sources

  1. GitHub Changelog — Secret scanning on demand for developers and agents (Published November 17, 2026)
  2. GitHub Changelog — Copilot code review: Adaptive effort, secret detection, and more (Published November 17, 2026)
  3. GitHub Changelog — Track Copilot code review outcomes in Repository insights (Published November 17, 2026)

More on Engineering

Engineering

Microsoft agent-framework PyPI Hijack: .pth Startup Execution & Cloud Credential Theft

On November 17, 2026, attackers published two hijacked releases (1.26.1 and 1.26.2) of Microsoft's official agent-framework PyPI package during a ~45-minute window. Both releases dropped .pth startup hooks that execute on any Python invocation—even pip—to harvest environment variables, credential files, Azure IMDS tokens, and CI OIDC credentials before exfiltrating them to webhook.site.

11 min read

Engineering

Kubernetes 1.38 Enters Code Freeze Ahead of December 16: Breaking Removals, DRA Graduations, and Gang Scheduling Status

Kubernetes 1.38 has entered code and test freeze ahead of its planned December 16, 2026 release, locking down scope around v1.38.0-beta.0. While AI workload primitives like CompositePodGroup (v1beta1) and DRA Device Binding Conditions (GA) advance, several removed feature gates and stricter JWK/kubelet validations will break unverified upgrades. Here is what actually shipped in the 1.38 changelog, how the scheduling architecture works, and how to test your clusters before December 16.

9 min read

Engineering

Cloudflare Workers VPC Adds Custom CA and mTLS Support, Ending verify_ca Workarounds for Private Origins

Previously, connecting Cloudflare Workers VPC to internal APIs or private databases signed by an enterprise CA meant downgrading TLS verification to verify_ca or disabled—and origins requiring client certificates were unreachable. On November 18, 2026, Cloudflare added custom CA and mutual TLS (mTLS) client certificate support across both HTTP and TCP VPC Services, including Hyperdrive PostgreSQL connections to Amazon RDS. Here is how the certificate architecture works, how to configure it with Wrangler 4.164.0+ or Terraform 5.29.0+, and how to audit existing services.

11 min read

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla