Skip to content
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

LSIF: Do not swallow errors on upload. #6648

Merged
merged 8 commits into from
Nov 18, 2019
Merged

LSIF: Do not swallow errors on upload. #6648

merged 8 commits into from
Nov 18, 2019

Conversation

efritz
Copy link
Contributor

@efritz efritz commented Nov 15, 2019

We were treating all errors from GetRepo and ResolveRev as not found. This hides errors and does not give us anything to diagnose actual issues (input or backend).

@efritz efritz added the lsif label Nov 15, 2019
@efritz efritz requested a review from a team as a code owner November 15, 2019 20:57
return
}

if conf.Get().LsifEnforceAuth {
err, status := enforceAuth(w, r, repoName)
if err != nil {
http.Error(w, err.Error(), status)
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, that's scary, can you get SECURITY comments around this please? like this: https://sourcegraph.com/github.com/sourcegraph/sourcegraph@b6eb78abaa32584aed6641ee64bf27e76025c07c/-/blob/cmd/frontend/auth/providers/providers.go#L24-25

Does this mean 3.10 is vulnerable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update. Cherry pick this fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this doesn't leak any information, only allows us to accept uploads that we haven't verified the owner of. And it's only for dot-com, no one will enable this setting in enterprise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that still warrant a security guy, or is that reserved for private data warnings?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's auth-related, so please add a security comment here anyway.

If it only affects sourcegraph.com and enterprise customers wouldn't enable this, then fine to not cherry-pick.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Could you check the comment?

@efritz efritz merged commit dd0a13c into master Nov 18, 2019
@efritz efritz deleted the lsif-upload-errors branch November 18, 2019 14:12
beyang pushed a commit that referenced this pull request Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants