Last active
January 26, 2023 08:17
-
-
Save yannhowe/6c3de48ccbbad8a0f8219e422f9a19db to your computer and use it in GitHub Desktop.
Find out patch status of ECS tasks
This file contains hidden or 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 | |
# 'Checking for string "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" in entrypoint' | |
echo "taskDefinitionArn, patchStatus" | |
aws ecs list-task-definitions | jq --raw-output 'map(.[])| .[]' | while read -r i; do | |
echo -n "$i, " | |
if aws ecs describe-task-definition --task-definition "$i" | grep -q "/tmp/CrowdStrike/rootfs/entrypoint-ecs.sh" | |
then | |
echo patched | |
else | |
echo not patched | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment