- Create or find a gist that you own.
- Clone your gist (replace
<hash>
with your gist's hash):# with ssh git clone [email protected]:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
version: '0.2' | |
phases: | |
build: | |
commands: | |
- | | |
cat << EOF > aws_config | |
[profile test] | |
role_arn = arn:aws:iam::123456789012:role/my-role-to-assume | |
role_session_name = IntegrationTest | |
credential_source = EcsContainer |
# Create a profile (cookbook) | |
inspec init profile SQLServerSecurity | |
# check profile is valid | |
insec check SQLServerSecurity | |
# Run single inspec.rb file | |
inspec exec mytest.rb | |
# Run a profile |
<hash>
with your gist's hash):
# with ssh
git clone [email protected]:<hash>.git mygist
# with https
git clone https://gist.github.com/.git mygist
""" | |
Code adapted from and inspired by http://blog.ranman.org/cleaning-up-aws-with-boto3/. | |
""" | |
import os | |
import re | |
from datetime import datetime, timedelta | |
import boto3 | |
export GIT_SSL_NO_VERIFY=true |
@ECHO OFF | |
REM -- Automates cygwin installation | |
SETLOCAL | |
REM -- Change to the directory of the executing batch file | |
CD %~dp0 | |
REM -- Configure our paths | |
SET SITE=http://mirrors.kernel.org/sourceware/cygwin/ |