Skip to content

updated Macie solution for Control Tower optional (#175) #157

updated Macie solution for Control Tower optional (#175)

updated Macie solution for Control Tower optional (#175) #157

Workflow file for this run

name: cfn-nag - CloudFormation Scan
on:
pull_request:
branches:
- main
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.6
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install cfn-nag
run: gem install cfn-nag
- name: Scan files in all templates folders
run: |
export deployment_dir=`pwd`
echo "$deployment_dir"
for i in $(find . -type f | grep -E '.template$|.yaml$|.yml$|.json$' | sed 's/^.\///') ; do
echo $i
if [[ "$i" == *"templates"* ]]; then
cfn_nag_scan --input-path "$deployment_dir/$i"
if [ $? -ne 0 ]; then
echo "cfn-nag failed validation - $i"
exit 1
fi
fi
done