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

feat(cli): include queries filter #3431

Merged
merged 4 commits into from
May 26, 2021

Conversation

rogeriopeixotocx
Copy link
Contributor

@rogeriopeixotocx rogeriopeixotocx commented May 25, 2021

Closes #3413

Proposed Changes

  • add --include-queries or -i shorthand to include specific queries from a filesystem query source.
  • compose source.ExcludeQueries and source.IncludeQueries inside the source.QueriesSelectionFilter
  • adapt mocks and tests (WIP)

I submit this contribution under the Apache-2.0 license.

@rogeriopeixotocx rogeriopeixotocx added the go Pull requests that update Go code label May 25, 2021
@rogeriopeixotocx rogeriopeixotocx added this to the CLI/UI milestone May 25, 2021
@rogeriopeixotocx rogeriopeixotocx requested a review from a team May 25, 2021 11:01
@rogeriopeixotocx rogeriopeixotocx self-assigned this May 25, 2021
@kicsbot
Copy link
Contributor

kicsbot commented May 25, 2021

Scan submitted to Checkmarx

@kicsbot
Copy link
Contributor

kicsbot commented May 25, 2021

Logo
Checkmarx SAST - Scan Summary & Details

Cx-SAST Summary

Total of 0 vulnerabilities
High 0 High
Medium 0 Medium
Low 0 Low
Info 0 Info

Violation Summary

No policy violation found

Signed-off-by: Rogério Peixoto <[email protected]>
@rogeriopeixotocx rogeriopeixotocx marked this pull request as ready for review May 26, 2021 09:28
Copy link
Collaborator

@joaoReigota1 joaoReigota1 left a comment

Choose a reason for hiding this comment

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

LGTM

@rogeriopeixotocx rogeriopeixotocx merged commit 9d8795f into master May 26, 2021
@rogeriopeixotocx rogeriopeixotocx deleted the feature/include-queries-filter branch May 26, 2021 12:44
@mukeshpilaniya
Copy link
Contributor

Instant of include or excluding quires each times, we can do better by creating profiles. suppose a user wanted to exclude/ include only selected 100 queries than each time, user has to do the same thing which can lead to bad user experiences and bad developer practices as well. So instant of doing the same thing multiple times, if we can create a profile for this user and puts all selected quires into that profile than we can provide --profile options, which is a great in-terms of user experiences.

@rogeriopeixotocx
Copy link
Contributor Author

rogeriopeixotocx commented Jun 28, 2021

Hi @mukeshpilaniya could this --profile behavior be achieved by having multiple kics.config preset files (--config) https://docs.kics.io/latest/configuration-file/ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the option to select the queries to be run by KICS (include and not exclude)
4 participants