Does Copilot have awareness of CVE status when suggesting library versions? #192613
Replies: 1 comment
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
Copilot Agent Mode
Body
I've been auditing the library versions Copilot suggests when it generates Python code, and I'm running into a consistent pattern that I'd love to understand better.
When Copilot generates code using common packages like
requests,django, orflask. When asked to provide specific version pins, the versions it picks are often a year or more behind the current release, and several of them carry known CVEs according to OSV.For example,
requests==2.31.0keeps coming up across different projects and prompts. It has multiple CVEs documented onosv.dev. The version installs fine and the generated code runs, so there's no obvious signal that anything is wrong.My question: Does Copilot currently have any mechanism to check CVE status when recommending specific library versions? Or is the version choice purely based on what was prevalent in training data?
I ask because I noticed this isn't just Copilot-specific — I ran a broader check across several LLMs on a set of Stack Overflow programming tasks and found this pattern is consistent across model families. The same handful of versions keeps showing up.
The underlying reason seems to be a training-signal distribution effect: older versions have more representation in documentation and code on the web, so models gravitate toward them regardless of CVE status.
Would be curious whether there's a roadmap consideration here, for example, integrating an OSV or GitHub Advisory lookup into the version suggestion step. pip-audit and Dependabot can catch these downstream, but the version choice happens upstream during generation before those tools run.
Beta Was this translation helpful? Give feedback.
All reactions