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(misconf): Support skipping services #4686

Merged
merged 9 commits into from
Jun 26, 2023
Merged

Conversation

simar7
Copy link
Member

@simar7 simar7 commented Jun 21, 2023

Description

Adds support for --skip-service flag.

$ trivy aws --skip-service=iam,s3

Will skip iam and s3 during the scan.

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

Fixes: #4619
Signed-off-by: Simar <simar@linux.com>
Signed-off-by: Simar <simar@linux.com>
@simar7 simar7 self-assigned this Jun 21, 2023
Signed-off-by: Simar <simar@linux.com>
Signed-off-by: Simar <simar@linux.com>
Signed-off-by: Simar <simar@linux.com>
@simar7 simar7 marked this pull request as ready for review June 22, 2023 00:19
@simar7 simar7 added this to the v0.43.0 milestone Jun 22, 2023
@simar7 simar7 added scan/misconfiguration Issues relating to misconfiguration scanning kind/feature Categorizes issue or PR as related to a new feature. labels Jun 22, 2023
pkg/cloud/aws/commands/run.go Outdated Show resolved Hide resolved
pkg/cloud/aws/commands/run.go Outdated Show resolved Hide resolved
Signed-off-by: Simar <simar@linux.com>
@knqyf263 knqyf263 added this pull request to the merge queue Jun 26, 2023
Merged via the queue into main with commit 5d73b47 Jun 26, 2023
27 checks passed
@knqyf263 knqyf263 deleted the support-skipping-services branch June 26, 2023 11:41
AnaisUrlichs pushed a commit to AnaisUrlichs/trivy that referenced this pull request Aug 10, 2023
* feat(misconf): Add support for `--skip-service` flag.

Fixes: aquasecurity#4619
Signed-off-by: Simar <simar@linux.com>

* update docs

Signed-off-by: Simar <simar@linux.com>

* update go mod

* refactor processOptions to reduce cyclo complexity

Signed-off-by: Simar <simar@linux.com>

* fix a bug with multiple skip services

Signed-off-by: Simar <simar@linux.com>

* refactor tests

Signed-off-by: Simar <simar@linux.com>

* use x/slice and x/xerrors

Signed-off-by: Simar <simar@linux.com>

* go mod tidy

* lint

---------

Signed-off-by: Simar <simar@linux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Support skipping services for cloud scanning
2 participants