prowler icon indicating copy to clipboard operation
prowler copied to clipboard

chore(parser): add --subservices tag

Open pedrooot opened this issue 9 months ago • 4 comments

Context

Prowler allows to execute checks from a specific service using --service / --services tag

Description

This pr adds the --subservice / --subservices tag in Prowler. This feature allows you to run checks for a specific subservice(s)

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

pedrooot avatar May 13 '24 12:05 pedrooot

Good job @pedrooot ! But we will have to check all the subservices within the check's metadata. For example, in Kubernetes there are no subservices.

sergargar avatar May 15 '24 08:05 sergargar

And we need to differentiate the service for each subservice.

sergargar avatar May 15 '24 11:05 sergargar

Codecov Report

Attention: Patch coverage is 34.78261% with 30 lines in your changes missing coverage. Please review.

Project coverage is 86.51%. Comparing base (45ccd7e) to head (17c341e). Report is 784 commits behind head on master.

Files with missing lines Patch % Lines
prowler/lib/check/check.py 34.21% 25 Missing :warning:
prowler/__main__.py 0.00% 4 Missing :warning:
prowler/lib/check/checks_loader.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3981      +/-   ##
==========================================
- Coverage   86.51%   86.51%   -0.01%     
==========================================
  Files         768      777       +9     
  Lines       23899    24185     +286     
==========================================
+ Hits        20677    20924     +247     
- Misses       3222     3261      +39     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 16 '24 15:05 codecov[bot]

Are we going to allow the use of --service and --subservice in the same execution? I think it's important just to check an specific subservice instead of all.

jfagoagas avatar May 17 '24 07:05 jfagoagas

We are closing this issue. We are not sure about the subservice concept since it was crafted by us and maybe it should be replaced by the ResourceType. We will circle around this again in the future.

Thanks for your effort @pedrooot 👏

jfagoagas avatar Jul 12 '24 07:07 jfagoagas