Skip to content

Check acl_bidirectional_traffic_restriction_check added#287

Open
prajwal-choudhari-comprinno wants to merge 3 commits intocomprinnotech:testcases_devfrom
prajwal-choudhari-comprinno:test_acl_bidirectional_traffic_restriction_check
Open

Check acl_bidirectional_traffic_restriction_check added#287
prajwal-choudhari-comprinno wants to merge 3 commits intocomprinnotech:testcases_devfrom
prajwal-choudhari-comprinno:test_acl_bidirectional_traffic_restriction_check

Conversation

@prajwal-choudhari-comprinno

Context

Adding unit tests for acl_bidirectional_traffic_restriction_check to improve test coverage and ensure reliability of the ACL security check.

Description

  • Implemented test cases to validate different ACL configurations:

    • Pass: ACL restricts bidirectional traffic.
    • Fail: ACL allows bidirectional traffic.
    • Fail: ACL is missing either ingress or egress rules.
    • Pass: No ACLs found (empty list).
    • Unknown: ClientError handling.
  • Used MagicMock to simulate boto3 client responses.

  • No new dependencies introduced.

Checklist

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

assert report.status == CheckStatus.FAILED
assert report.resource_ids_status[0].summary is not None
# Since there's no ACL id, no ARN assertion here
assert "Error fetching Network ACLs" in report.resource_ids_status[0].summary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Mixed Rule Sets
Add a test for an ACL that has both secure and overly permissive entries to validate correct classification.

Validate Multiple ACLs in One Response
Add a case where multiple ACLs with varying compliance statuses are returned to verify report aggregation and final check status logic.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants