-
Notifications
You must be signed in to change notification settings - Fork 315
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
feat(cli): add new flag --max-file-size to control the max file size #6670
Conversation
ae2b50f
to
d099129
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments, other than that, and Lior's comment LGTM 😄
Keep up the good work 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tomk-orca,
how are you?
I was checking your changes and to me, they look good.
I just have a request, on the file
kics/internal/console/pre_scan.go
Line 159 in 898fa35
you can add a line more or less like this
log.Info().Msgf("Max file size: %d Mb", flags.GetIntFlag(flags.MaxFileSizeFlag))
and please write an e2e test.
Hi @tomk-orca, any update on this pull request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoaoCxMartins kindly add this new command in this file, so the users can check it in our doc webpage.
Hi @tomk-orca, could you please add an E2E test where you can scan a file larger than 5MB to ensure that the file is not scanned? You can also ensure that, when using --max-file-size flag, the file is scanned. Thank you :) |
We should add them for now, as he is probably unenviable for the E2E tests. Please don't block due to this, we can even add a task to complete those as a separate issue. |
8730faf
Closes #6306
Closes #5989
Proposed Changes
-implement a flag, control the size of the files scanned
-the flag should have as default value 5MB
I submit this contribution under the Apache-2.0 license.