-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.43 KB
/
Copy pathsecurity-gates.yml
File metadata and controls
54 lines (51 loc) · 1.43 KB
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
48
49
50
51
52
53
54
name: Shared Security Scanning
on:
workflow_call:
inputs:
trivy-scan-type:
description: 'Trivy scan type (fs, config)'
required: true
type: string
default: 'fs'
trivy-target:
description: 'Target directory for Trivy'
required: false
type: string
default: '.'
trivy-scanners:
description: 'Comma separated list of what security issues to detect'
required: false
type: string
default: 'vuln,secret,misconfig'
permissions:
contents: read
pull-requests: write
jobs:
gitleaks:
name: Secret Scan (Gitleaks)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Gitleaks
uses: gitleaks/gitleaks-action@v2.3.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false
trivy:
name: Vulnerability Scan (Trivy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@v0.35.0
with:
scan-type: ${{ inputs.trivy-scan-type }}
scan-ref: ${{ inputs.trivy-target }}
scanners: ${{ inputs.trivy-scanners }}
ignore-unfixed: true
format: 'table'
exit-code: '1'
severity: 'HIGH,CRITICAL'