Always update dependencies with known security vulnerabilities to their patched versions. Dependencies with security issues can introduce vulnerabilities into your application even if your own code is secure.
Always update dependencies with known security vulnerabilities to their patched versions. Dependencies with security issues can introduce vulnerabilities into your application even if your own code is secure.
When you discover a dependency with a security vulnerability:
Consider implementing automated dependency scanning in your CI/CD pipeline to proactively identify vulnerabilities before they reach production.
Example:
// Before: Vulnerable dependency
require (
golang.org/x/net v0.36.0 // Has CVE-2025-22872 vulnerability
)
// After: Updated to patched version
require (
golang.org/x/net v0.38.0 // Fixes CVE-2025-22872
)
Enter the URL of a public GitHub repository