prowler-cloud / prowler

Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more
https://prowler.com
Apache License 2.0
10.76k stars 1.53k forks source link

feat(aws): Add new Neptune check for cluster snapshot visibility #4709

Closed danibarranqueroo closed 2 months ago

danibarranqueroo commented 2 months ago

Context

To enhance data security and comply with best practices for database management, we are adding a new check within the Neptune framework. This check ensures that DB cluster snapshots are not publicly accessible.

The only way to create a public snapshot is by originating it from an unencrypted Neptune cluster. Initially, the snapshot will be private, but you can share it with anyone, making it publicly accessible. Internally, AWS achieves this by setting an attribute called "restore" to "all."

Description

I added neptune_cluster_public_snapshot with his respective unit test. In order to do that I have added ClusterSnapshot model to neptune_service.py with his respective unit test.

License

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

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 85.71429% with 9 lines in your changes missing coverage. Please review.

Project coverage is 89.08%. Comparing base (f746a9e) to head (2b609ff). Report is 35 commits behind head on master.

Files Patch % Lines
.../providers/aws/services/neptune/neptune_service.py 80.00% 9 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4709 +/- ## ======================================== Coverage 89.08% 89.08% ======================================== Files 910 915 +5 Lines 27737 28027 +290 ======================================== + Hits 24709 24968 +259 - Misses 3028 3059 +31 ```

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