-
Notifications
You must be signed in to change notification settings - Fork 41
47 lines (47 loc) · 1.31 KB
/
security.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
46
47
name: security
on: [pull_request]
jobs:
truffelhog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@v3.10.3
with:
path: ./
base: ${{ github.event.pull_request.head.ref }}
head: ${{ github.event.pull_request.head.sha }}
extra_args: --debug
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
yaml-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get specific changed files
id: changed-cicd
uses: tj-actions/changed-files@v28.0.0
with:
json: "true"
files: |
cicd/**
- uses: stefanprodan/kube-tools@v1
if: steps.changed-cicd.outputs.any_changed == 'true'
with:
command: |
find cicd -type f -name '*.yaml' -print0 | while IFS= read -r -d $'\0' file; do
echo check $file;
yq e 'true' "$file" > /dev/null
done