fwdcloudsec / known_aws_accounts

List of known AWS accounts
Apache License 2.0
150 stars 21 forks source link

Remove duplicate account IDs and validate #22

Closed sam-cox-tracebit closed 10 months ago

sam-cox-tracebit commented 10 months ago

Thanks for maintaining such a useful resource!

There are some duplicate account IDs in the file due merges, mergers etc. I've found it useful to associate only a single vendor with each account ID as I nearly always want to map an account ID to a vendor rather than vice-versa. I wanted to submit a PR in case these changes would be helpful for anyone else.

I've tried to break this change down into atomic commits that can be easily verified. The summary is:

I considered adding an "aka" property to include the duplicate names but decided to keep things simple - many of these seem to be names of previously acquired or rebranded companies.

I have not added or removed any account IDs in this process (checked by comparing against main):

% yq 'collect(.[].accounts.[]) | sort | unique | length' accounts.yaml
339
% yq 'collect(.[].accounts.[]) | sort | unique' accounts.yaml | md5sum
48752592effae9aa24bcc8151a852a8f  -

An example of the github action passing: Screenshot 2023-10-04 at 18 44 52

If you submit a PR that includes duplicates or schema validation errors: Screenshot 2023-10-04 at 18 38 04

They will fail the check: Screenshot 2023-10-04 at 18 42 11

These changes were helpful for me but I completely understand if other people use this resource differently. Also very happy to submit only a subset of these changes if requested!