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

Do not abort repo scan if a commit fails to scan #267

Closed
agateau-gg opened this issue Jun 15, 2022 · 5 comments · Fixed by #301
Closed

Do not abort repo scan if a commit fails to scan #267

agateau-gg opened this issue Jun 15, 2022 · 5 comments · Fixed by #301
Assignees
Labels
type:feature Feature request

Comments

@agateau-gg
Copy link
Collaborator

agateau-gg commented Jun 15, 2022

The problem

When ggshield secret scan repo fails to scan a commit, it stops. This is annoying because it forces users to restart the full scan.

Proposed solution

The command should note all failures and carry on. At the end it should summarize all failures and exit with an error.

To be decided: in the case of JSON output, should the failure summary be part of the JSON document or should it be sent directly to stderr?

@agateau-gg agateau-gg added the type:feature Feature request label Jun 15, 2022
@pierrelalanne
Copy link
Collaborator

@agateau-gg : I think we should prioritize this and work on it in the next sprint. Do you agree ?

@agateau-gg
Copy link
Collaborator Author

@agateau-gg : I think we should prioritize this and work on it in the next sprint. Do you agree ?

Sounds good 👍

@dghowlett
Copy link

Looking forward to this feature improvement. Ideally the JSON payload should include an error properties that includes details on each commit it failed to scan and the failure. That will allow the caller to programmatically decide what action to take further on those commits including driving that decision off the type of error for each commit, thx!

@agateau-gg
Copy link
Collaborator Author

Thanks for your feedback @dghowlett.

Note however that the failures this issue is talking about are bugs in ggshield preventing it from scanning a commit. They are not incidents: incidents are already included in the JSON output.

This means the failure is likely to be of little interest to users, except for opening an issue or working around a bug. In normal usage, ggshield should not fail to scan a commit.

There is the case of the network issue though, that would cause a failure to scan which would not be a ggshield bug 🤔.

@dghowlett
Copy link

Hi @agateau-gg

Correct, they aren't incidents/secret ids that generally map to the failure, but a result of failures from other areas which could include:
Read timed out
Remote end closed connection without response
etc....

Knowing which commit SHA failed to scan and just the associated error msg itself will be helpful. Ultimately though, not having ggshield abort is the key ask here especially when scanning repos with huge histories. Looking forward to this feature coming soon, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants