-
Notifications
You must be signed in to change notification settings - Fork 189
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
Feature/added filter by severity option #295
Conversation
cloudsplaining/command/scan.py
Outdated
@@ -37,6 +37,8 @@ | |||
@click.option("-m", "--minimize", required=False, default=False, is_flag=True, help="Reduce the size of the HTML Report by pulling the Cloudsplaining Javascript code over the internet.") | |||
@click.option("-aR", "--flag-all-risky-actions", is_flag=True, help="Flag all risky actions, regardless of whether resource ARN constraints or conditions are used.") | |||
@click.option("-v", "--verbose", "verbosity", help="Log verbosity level.", count=True) | |||
@click.option("-f", "--filer-severity", "severity", help="Filter the severity of findings to be reported.", multiple=True,type=click.Choice(['HIGH', 'MEDIUM','LOW'], case_sensitive=False)) |
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.
Please add 'CRITICAL' and 'NONE' options to the choices list, to bring the possible severity settings in line with CVSS v3 (CVSS v3.1 Specification Document (first.org))
@melaniap-codsec This looks like a useful feature, thank you for adding it! I have two requests based on my organization's use of Cloudsplaining that would make this feature more broadly useful:
Our organization, for example, uses Cloudsplaining via its Thank you for your consideration, and for your contribution to the project. :) |
…nd "none" as options
@danjacobson-orbis i added what you requested, hope the changes fit your requirements. happy to contribute :) |
@kmcquade is there any chance this can PR can be merged into master? It is a cool functionality that gives value and from CI/CD we ideally would like to use the master branch. |
@melaniap-codsec wow, what a great contribution! I love what you've done. The improvements with more actions is helpful, and the updated data in the example report is so much better than the stuff that I had there before. And @danjacobson-orbis thanks for your comments and review. I left some comments in a review. I feel like it is important to set some context for my requests for changes. First of all, I am no longer working in the IAM space, and I kind of check this repository occasionally out of curiosity, and because it was a really impactful and popular project. I don't consider myself an active maintainer of this anymore. I have my own startup now (www.nightvision.net) and all of my energy is currently focused on that. However - this PR looked really cool, and I couldn't help but look at it. If I do make any changes, I have the responsibility that any changes that I or others make must be in the best interest of the security community. This package has been downloaded half a million times in the last 30 days, with over 6 million downloads. This includes several security vendors/CSPM/CNAPP tools, and it is built into IAC tools like Checkov which runs in CI/CD pipelines of many many customers. I also personally worked on the Checkov integration.
So while I would like to just accept requests immediately, I have a responsibility to not do this blindly - and right now, I don't really have capacity to test it out myself. As such, I have a few requests before this can be merged:
After the comments are addressed and the above is done, I can merge the PR. And thanks again - this looks amazing, great contribution. |
@kmcquade i have removed the dependencies as requested. Also, i ran Checkov's unit tests twice, first with their code unmodified, using cloudsplaining >=0.4.3 version and then with this version, pointing to my fork. As you can see in the images below, there are two tests that fail, but they fail using both versions, so i guess this is not a problem from my modifications to cloudsplaining. Is fixing these failed tests the goal, even if they fail without my changes? Checkov's unit tests results with cloudsplaining version >=0.4.3: Checkov's unit tests results with cloudsplaining pointing to my fork: |
@melaniap-codsec thanks for removing the python dependencies, and for running the test with Checkov. It looks like the Javascript dependencies were not reverted though. Can you revert Thanks again! |
Oh, and it looks like the unit tests are failing for Python and for NodeJS. Please fix those too. Thanks! |
@kmcquade i have removed the JavaScript dependencies and fixed the unit tests. thank you :) |
@melaniap-codsec looks like there are still some failures. The unit tests work, but there is a mypy (static type check) error. and the package-lock.json has not been reverted to the previous state yet. Sorry, I thought this would be more straightforward but I hadn't seen the static type checks failing. |
@kmcquade i fixed the mypy errors and reverted package-lock.json to its previous state. hope now all the checks will pass, let me now if there's anything else to fix. |
@melaniap-codsec this is now part of the 0.6.0 release 🚀 thanks for the contribution! I've also published a new version of Policy Sentry with the latest IAM definition updates. |
@kmcquade thank you! 😄 |
What does this PR do?
instead of only the findings list.
The severity for each risk type is now defined on the constants.py file.
What gif best describes this PR or how it makes you feel?
Completion checklist
make test
,make lint
,make security-test
,make test-js
)