Skip to content

Commit

Permalink
Merge pull request #535 from nccgroup/retrieve-ec2-secgroup-tags
Browse files Browse the repository at this point in the history
Include tags in EC2 security group data
  • Loading branch information
x4v13r64 committed Sep 26, 2019
2 parents d4751c2 + cb09c38 commit ea3f59c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ScoutSuite/providers/aws/resources/ec2/securitygroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def _parse_security_group(self, raw_security_group):
security_group['description'] = raw_security_group['Description']
security_group['owner_id'] = raw_security_group['OwnerId']

if 'Tags' in raw_security_group:
security_group['tags'] = {x['Key']: x['Value'] for x in raw_security_group['Tags']}

security_group['rules'] = {'ingress': {}, 'egress': {}}
ingress_protocols, ingress_rules_count = self._parse_security_group_rules(
raw_security_group['IpPermissions'])
Expand Down

0 comments on commit ea3f59c

Please sign in to comment.