A credential can slip into a pull request even when an AI assistant writes most of the code. GitHub’s November 17, 2026 public preview adds its secret-scanning detectors to Copilot’s security-review specialist, letting developers and agents inspect changes before merge. It is useful precisely because it is a narrow, timely check—not because it replaces repository-wide monitoring or secret rotation.
What changed on November 17
According to the GitHub changelog, the review can combine provider patterns for more than 500 secret types with a fine-tuned detector for less structured credentials such as passwords in connection strings. The public preview is available in Copilot CLI and app sessions, Copilot SDK integrations, and Copilot code review. Secret scanning is off by default for this review; the existing LLM-based review continues until an administrator or user opts in. GitHub says scans consume AI credits under its Secret Protection AI Credit SKU.
Scope: current changes, not history
The review checks changes, and Copilot code review can flag added pull-request lines. It does not search repository history. That distinction matters: a clean result does not mean an old token is absent from earlier commits, an artifact registry, a workflow log, or a previously merged branch. Keep organization-wide secret scanning, push protection, and history response processes in place.
Enable it in the right surface
- Copilot CLI: in an interactive session, run
/settings aiSecretDetection on, then invoke/security-reviewor delegate to thesecurity-reviewspecialist. - Copilot app: turn on AI secret detection under Settings → Experimental, then request a security review.
- Copilot SDK: set the
SECURITY_REVIEW_FINE_TUNED_MODELfeature flag totruewhen creating a session and request the specialist. - Copilot code review: enable Secret scanning under repository Settings → Copilot → Code review → Security, then request or automate a pull-request review.
These are the documented preview paths as of November 17; UI labels and billing can change. The separate GitHub MCP secret-scanning workflow is another integration with different persistence behavior, not an interchangeable name for the Copilot security-review feature.
Practical impact for security teams
A pre-merge detector gives fast feedback at the moment a developer can still remove a credential from a diff. That is especially useful when an agent has generated configuration, integration tests, sample environment files, or a copied connection string. Security teams should establish who can enable the preview, how findings are triaged, and what happens if a real credential appeared in a branch—even briefly.
Safe hands-on lab: review a disposable change
Prerequisites and isolation
Use a throwaway repository with Copilot CLI access and the preview enabled for your account. Do not put a real password, token, customer key, or cloud credential in the lab. Create a text-only placeholder that is explicitly not a working credential, then review the change and the tool’s scope. This lab exercises a review workflow, not the efficacy of a secret detector; a dummy string may produce no alert.
Workflow
mkdir copilot-review-lab && cd copilot-review-lab
git init
printf 'SERVICE_TOKEN=PLACEHOLDER_NOT_A_REAL_SECRET\n' > sample.env
# In an interactive Copilot CLI session:
# /settings aiSecretDetection on
# /security-reviewExpected result: the CLI performs a security review of the current changes if your preview access and setting are active. A non-secret placeholder should not be interpreted as a test of detection coverage, and the review may have no findings. Check the tool’s current documentation and settings if the command is unavailable. Inspect results manually; do not paste any real findings containing credentials into public tickets or chat.
Cleanup
cd ..
rm -r copilot-review-labRun cleanup only after confirming the directory is the disposable lab you just created. If a real credential is discovered during normal work, remove it from the change, revoke or rotate it at its issuer, assess exposure, and review history and logs. Deleting a line alone does not invalidate a leaked token.
A review policy that does not overpromise
Put the on-demand review before PR creation and again in code review for added lines. Treat findings as signals requiring human validation. Keep a separate control for historic secrets and use issuer-side revocation as the decisive response to confirmed exposure. For a related CI trust-boundary discussion, see VigilSecureInfo’s OIDC trusted publishing guide.
Conclusion
The preview is a useful extra checkpoint for agent-assisted coding, provided teams understand its opt-in setting and change-only scope. The best outcome is not a green review badge; it is a short feedback loop from detection to rotation, remediation, and verification.







