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.53k stars 1.51k forks source link

fix(aws): handle AWS key-only tags #4845

Closed sergargar closed 2 weeks ago

sergargar commented 3 weeks ago

Description

Handle AWS Tags that only have keys and non-existing values so no KeyError can raise.

>>> tags = [{"Key": "name"}]
>>> unroll_tags(tags)
{'name': ''}

Checklist

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 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.16%. Comparing base (c2552ee) to head (a0bc742). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4845 +/- ## ======================================= Coverage 89.16% 89.16% ======================================= Files 933 933 Lines 28567 28567 ======================================= Hits 25473 25473 Misses 3094 3094 ```

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

github-actions[bot] commented 2 weeks ago

💚 All backports created successfully

Status Branch Result
✅ v4.3

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details