-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.11 KB
/
pull_request.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Pull Request Workflow
on:
pull_request:
branches:
- main
- develop
jobs:
validate-template-code:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install AWS SAM CLI
run: |
pip install --user aws-sam-cli
- name: Validate SAM Templates
run: |
find . -path "./.github" -prune -o \( -name "*.yaml" -o -name "*.yml" \) -print0 | while IFS= read -r -d '' template; do
echo "Validating template: $template"
sam validate --template-file "$template" --region us-east-2 --lint
done
shell: bash
security:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run CFN Nag Security Checks
uses: stelligent/cfn_nag@master
with:
input_path: .
extra_args: -o sarif
output_path: cfn_nag.sarif
- name: Upload CFN Nag SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: cfn_nag.sarif
category: security