-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lint(s) for git sources #235
Comments
Is this true yet? To my limited understanding, Cargo, for now, defaults to using |
Yah you're right, I meant default more as master for now, but with cargo adding in default branch detection in the future. |
* Add UnvalidatedConfig trait * Add feature to allow github/gitlab/bitbucket orgs instead of only exact urls Resolves: #236 * Refactor and simplify tests * Add sources tests * Add gitlab/bitbucket tests * Add suppport for checking all git sources have the required minimum spec Resolves: #235 * Update sources doc * Update CHANGELOG
When using a git repository as a crate source, by default it will just pull the HEAD of the default branch from the URL given whenever the lockfile is updated, which is basically the same as having a wildcard dependency on the crate, which we recently added a check for, except it's even worse since it can pull code that hasn't even been released yet.
Cargo allows specifying
branch
,tag
, andrev
to give more control over what code to pull from the git repo, but of these, really onlyrev
is a precise identifier, asbranch
has similar problems to the default behavior, as well astag
, as tags can be moved to different commits between lockfile updates, though this is a lesser concern.For our projects we mandate that any git dependencies use a
rev
specifier, both for sanity, as well as to get the most benefit from cargo-fetcher, but we don't actually lint for this, and would fit in nicely with the existingsources
check.The text was updated successfully, but these errors were encountered: