forked from aws-solutions-library-samples/data-lakes-on-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidate.sh
More file actions
executable file
·20 lines (16 loc) · 748 Bytes
/
Copy pathvalidate.sh
File metadata and controls
executable file
·20 lines (16 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
set -ex
shopt -s globstar
# python
ruff format --check .
ruff check .
# pylint $(git ls-files --exclude-standard '*.py') # pylint is disabled for now
trivy fs --scanners vuln .
# shell
find . -type f \( -name '*.sh' -o -name '*.bash' -o -name '*.ksh' \) -print0 \
| xargs -0 shellcheck -x --format gcc
# cloudformation
cfn-lint ./**/*.yaml
## unfortunately cfn_nag doesn't support fn::foreach so we exclude files using it: https://github.com/stelligent/cfn_nag/issues/621
find . -not \( -type f -name 'template-glue-job.yaml' -o -type f -name 'template-lambda-layer.yaml' \) -type f -name '*.yaml' -print0 \
| xargs -0 -L 1 cfn_nag_scan --fail-on-warnings --ignore-fatal --deny-list-path .cfn-nag-deny-list.yml --input-path