Created
November 20, 2019 09:45
-
-
Save antonioned/36b77b9d8c2ae5282b45a86645dc34ab to your computer and use it in GitHub Desktop.
Script that scans ECS task definitions for a compromised AWS key. In order to run, it needs a definitions.txt file with ARNs of the task definitions that need scanning.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read d; | |
do | |
printf "\n\nName of task-definition: $d\n\n" >> ./task-definitions-results.txt | |
aws ecs describe-task-definition --task-definition $d --region us-west-2 | grep "AWS_KEY" >> ./task-definitions-results.txt | |
printf "\n\n------------------------------------------------\n\n" >> ./task-definitions-results.txt | |
done < definitions.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment