-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Private git registry for GitHub breaks any updates referencing it #6140
Comments
This might not be a bug, as this error happens with an expired token. I still think it's a bug as non-private repo dependencies weren't handled as Dependabot errored out early. |
👋 sorry for the slow response. Looking at the logs, the problem here is that Dependabot couldn't even fetch the repo to run the job against:
It doesn't have anything to do with the actual deps mentioned in the manifests--regardless of whether those are public or private, if Dependabot can't clone the repo it's trying to process, it won't have any idea what the deps even are! I'm going to close, but if for some reason I misunderstand and you still encounter this same error even after refreshing the token, then comment and we can re-open. |
@jeffwidman shouldn't Dependabot either just not use expired tokens or re-try without a custom token if the auth fails? This would reduce the blast radius of an expired token blocking all updates including ones which could be calculated without the custom token. I guess better UI feedback could also mitigate this somewhat. I'm happy to open a new issue or you could re-open this one? |
At the top of the screen where you saw the job logs, I thought it displayed an error saying that the repo was unreachable? Because we generally do try to highlight errors like this a bit more visibly than just buried in the logs. Feel free to post a screenshot of what you're seeing. And if you're not seeing an error, then maybe we need to tweak how we catch that exception. As far as not trying a failed token, Dependabot doesn't know until it tries if the token will work for that repo. IMO it's kinda pointless to validate ahead of time because we are essentially doing that when it tries to clone the repo. And we can't just look at your users access rights because there are scenarios, particularly for large companies, where they want to limit the scope of what Dependabot has access to for security reasons. I think the main issue here that I see is Dependabot should loudly notify when it fails to work, and not wait for you to go digging. There's some work already in flight to improve that, but unfortunately it's still a ways out from being publicly visible. |
@jeffwidman I had to click through to the Insights > Dependency Graph screen to get any feedback that there was an issue with Dependabot; that's not great UX to start with. Making it much clearer that there is an issue should be table stakes for a product like this or else it's essentially no better than manual checks, if I have to check on Dependabot I might as well have manually checked my dependencies as I can't trust the automation to notify me when I might be insecure. For the actual issue; are GitHub tokens opaque or are they JWTs (or similar)? If they're JWTs then expiry could easily be verified, if not it'd be easy to hit an always public repo (such as this one) using the token to see if it's valid before using it? |
Is there an existing issue for this?
Package ecosystem
github-actions, terraform
Package manager version
n/a
Language version
n/a
Manifest location and content before the Dependabot update
n/a
dependabot.yml content
version: 2
registries:
github:
type: git
url: https://github.com
username: x-access-token
password: ${{ secrets.REPO_TOKEN }}
updates:
package-ecosystem: github-actions
registries: "*"
directory: /
schedule:
interval: daily
package-ecosystem: terraform
registries: "*"
directory: /
schedule:
interval: daily
Updated dependency
n/a
What you expected to see, versus what you actually saw
I'd expect for this to work correctly, and it was 28 days ago.
I now get the following error (org and repo obfuscated).
Native package manager behavior
n/a
Images of the diff or a link to the PR, issue, or logs
n/a
Smallest manifest that reproduces the issue
n/a
The text was updated successfully, but these errors were encountered: