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(cloudtrail): check if trails exist in service #4161

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

MrCloudSec
Copy link
Member

Description

To avoid accessing an empty dictionary and getting the following error, check if the trails exist first:

2024-06-03 16:31:23,383 [File: cloudtrail_service.py:90] [Module: cloudtrail_service] ERROR: us-east-1 -- AttributeError[40]: 'NoneType' object has no attribute 'keys'

License

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

@MrCloudSec MrCloudSec requested review from a team June 3, 2024 20:33
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Jun 3, 2024
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.64%. Comparing base (0c01cf2) to head (0976e7d).
Report is 422 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4161      +/-   ##
==========================================
- Coverage   86.67%   86.64%   -0.04%     
==========================================
  Files         817      817              
  Lines       25578    25578              
==========================================
- Hits        22169    22161       -8     
- Misses       3409     3417       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MrCloudSec MrCloudSec merged commit 366bb91 into master Jun 3, 2024
10 of 11 checks passed
@MrCloudSec MrCloudSec deleted the fix-cloudtrail branch June 3, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants