secure_pubspec_urls
The '{0}' protocol shouldn't be used because it isn't secure.
Description
#The analyzer produces this diagnostic when a URL in a pubspec.yaml
file is using a non-secure scheme, such as http
.
Example
#The following code produces this diagnostic because the pubspec.yaml
file contains an http
URL:
yaml
dependencies:
example: any
repository: http://github.com/dart-lang/example
Common fixes
#Change the scheme of the URL to use a secure scheme, such as https
:
yaml
dependencies:
example: any
repository: https://github.com/dart-lang/example
Was this page's content helpful?
Thank you for your feedback!
Provide details Thank you for your feedback! Please let us know what we can do to improve.
Provide details Unless stated otherwise, the documentation on this site reflects Dart 3.8.1. Page last updated on 2025-05-08. View source or report an issue.