Code referencing moves from preview to general availability
GitHub’s code referencing capability is now generally available in both GitHub Copilot Chat and GitHub Copilot code completions. The feature is live today in VS Code, with broader editor support slated to arrive shortly. Developers have a choice in how they want to handle suggestions that match public code: block those matches outright, or allow the suggestions and surface details about each match directly in the editor.
When public code matches are allowed and one is detected, a notification displays the matching snippet, the repository and file it originates from, and any license information found there. All matching public code identified in a model response is reported.
Expanding the reach of public code transparency
GitHub has also partnered with Microsoft to expose the code referencing API through Azure AI Content Safety. Azure customers can already tap into this functionality through the protected material detection for code filter. The stated goal is to make the same transparency mechanism available regardless of which generative AI tool a team relies on, not just for GitHub Copilot users.
This ubiquity is meant to serve a core value that has long defined open source culture: knowing where code comes from, who has worked on it, and how it is licensed. As AI-generated suggestions increasingly act as a starting point for development, surfacing that context becomes as important as the suggestion itself.
What changes for developers and businesses
For individual developers, code referencing adds a new middle ground. GitHub Copilot has always offered a filter to block suggestions matching public code; the new option lets you keep those suggestions flowing while still getting visibility into the source when a suggestion length reaches 150 characters or more and matches public code. In practice, that means the repository, location, and any detected license for each match appears in the UI whenever it shows up in a response.
Enterprise customers get a contractual dimension. Admin-level blocking of suggestions that match public code has long been available and is tied to GitHub’s indemnification commitment. With code referencing now generally available, GitHub is extending its indemnity to cover customers of GitHub Copilot Business and GitHub Copilot Enterprise who use the feature and comply with the licenses cited for the matched code. That allows organizations to turn on code referencing, retain the same contractual protections, and give their teams fuller access to the learning and context that public code matching can provide.




