BloodHoundAD / AzureHound

Azure Data Exporter for BloodHound
GNU General Public License v3.0
538 stars 71 forks source link

feat: Add --select flag suport to list group-members #84

Closed mistahj67 closed 2 weeks ago

mistahj67 commented 2 weeks ago

Description

Part 2 of BED-4586 Closes https://github.com/BloodHoundAD/AzureHound/issues/69 Closes https://github.com/BloodHoundAD/AzureHound/pull/64

Adds --select as a flag for the list group-members command

Defaults the $select param to the following if the flag is not present:

Ensure an escape hatch for --select="" in order to return Azure default entity properties Support custom --select properties as a comma delimited list as well ex: --select="id,assignedPlans,email"

Cleaned up some duplicate logic as well

Motivation and Context

Decrease file size by defaulting to a property list that will keep file sizes low but ensure there's still an ability to pull any / all properties for group members.

This should address concerns from https://github.com/BloodHoundAD/AzureHound/issues/69 This was inspired by the efforts of @malac and PR https://github.com/BloodHoundAD/AzureHound/pull/64

How Has This Been Tested?

Ran locally in azurehound directory after go build

Also ingested into Bloodhound Enterprise and verified no apparent errors with analysis.

Updated unit tests

Types of changes

Checklist: