Skip to content
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

Fix exception being thrown from unit test #817

Closed
0xdabbad00 opened this issue Dec 6, 2020 · 0 comments
Closed

Fix exception being thrown from unit test #817

0xdabbad00 opened this issue Dec 6, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@0xdabbad00
Copy link
Collaborator

$ ./tests/scripts/unit_tests.sh
......F.....................
======================================================================
FAIL: test_audit (test_audit.TestAudit)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/scottpiper/Documents/src/cloudmapper/tests/unit/test_audit.py", line 50, in test_audit
    "REQUEST_SMUGGLING"
AssertionError: Items in the first set but not the second:
'EXCEPTION'
Items in the second set but not the first:
'SQS_PUBLIC'
'SNS_PUBLIC'
'REQUEST_SMUGGLING'
-------------------- >> begin captured stdout << ---------------------
...
{"account_id": "123456789012", "account_name": "demo", "region": "us-east-1", "issue": "EXCEPTION", "resource": "'NoneType' object has no attribute 'get'", "details": {"exception": "'NoneType' object has no attribute 'get'", "traceback": "Traceback (most recent call last):\n  File \"/Users/scottpiper/Documents/src/cloudmapper/shared/audit.py\", line 1195, in audit\n    audit_elbv1(findings, region)\n  File \"/Users/scottpiper/Documents/src/cloudmapper/shared/audit.py\", line 852, in audit_elbv1\n    for attribute in attributes_json.get(\"LoadBalancerAttributes\", [])['AdditionalAttributes']:\nAttributeError: 'NoneType' object has no attribute 'get'\n"}}

Looks to be caused by the recent PR to check for request smuggling: #807

0xdabbad00 added a commit to 0xdabbad00/cloudmapper that referenced this issue Dec 6, 2020
@0xdabbad00 0xdabbad00 added the bug Something isn't working label Dec 6, 2020
@steiza steiza closed this as completed in ccd971c Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant