inspec / inspec-aws

InSpec AWS Resource Pack https://www.inspec.io/
Other
136 stars 105 forks source link

fixing 'secure transport' function definition #874

Closed Rohit1509 closed 2 years ago

Rohit1509 commented 2 years ago

Signed-off-by: Rohit Joshi rohit.prasad.joshi@sap.com

Description

This function defined: 'has_secure_transport_enabled?' checks that effect == 'Deny' and condition block is ''Bool' => { 'aws:SecureTransport'=>'false' }'. However, if there are multiple parameters defined in condition block this function returns false even if 'Bool' => { 'aws:SecureTransport'=>'false' } parameter is present which ideally it should return true. This happens because the current function definition enforces the condition block to only include 'Bool' => { 'aws:SecureTransport'=>'false' }' and does not take into consideration the test case where multiple parameters are defined inside condition block. Hence, the current bugfix just checks for that particular parameter defined in the condition block irrespective of multiple parameters present.

Issues Resolved

List any existing issues this PR resolves, or any Discourse or StackOverflow discussion that's relevant

Check List

Please fill box or appropriate ([x]) or mark N/A.