version: 0.2 phases: install: commands: - echo "Downloading git-secrets..." - mkdir .tools - cd .tools - git clone --depth 1 https://github.com/awslabs/git-secrets.git - export PATH=$(readlink -f .)/git-secrets:$PATH build: commands: - echo "Started" - cd $CODEBUILD_SRC_DIR - echo $(ls) - git init --quiet - git secrets --register-aws || true - git secrets --add $AWS_GIT_SECRETS_PATTERN_1 || true - git secrets --add $AWS_GIT_SECRETS_PATTERN_2 || true - git secrets --add $AWS_GIT_SECRETS_PATTERN_3 || true - git secrets --add -a '111122223333' || true - git secrets --add -a '555555555555' || true - git secrets --add -a '333333333333' || true - git secrets --add -a '444444444444' || true - git secrets --add -a '123456789012' || true - git secrets --add -a '444455556666' || true - git secrets --add -a '777788889999' || true - git secrets --add -a 'Brazil Portuguese' - git secrets --add -a '[A-Z0-9]{20}' - git secrets --scan --no-index - echo "git-secrets scan ok"