-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
57 lines (52 loc) · 1.53 KB
/
action.yml
File metadata and controls
57 lines (52 loc) · 1.53 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
55
56
57
name: 'PyAegis SAST'
description: 'Python-first SAST with taint analysis and AI auto-fix. Lower false positives than Bandit.'
author: 'mnbplus'
branding:
icon: 'shield'
color: 'red'
inputs:
target:
description: 'Path to scan (default: current directory)'
required: false
default: '.'
format:
description: 'Output format: text, json, sarif'
required: false
default: 'sarif'
output:
description: 'Output file path'
required: false
default: 'pyaegis.sarif'
severity:
description: 'Minimum severity: LOW, MEDIUM, HIGH, CRITICAL'
required: false
default: ''
rules:
description: 'Custom rules file path'
required: false
default: ''
fail_on_findings:
description: 'Fail the action if findings are detected'
required: false
default: 'false'
outputs:
sarif_file:
description: 'Path to the generated SARIF file'
value: ${{ steps.scan.outputs.sarif_file }}
runs:
using: 'composite'
steps:
- name: Install PyAegis
shell: bash
run: pip install pyaegis
- name: Run PyAegis scan
id: scan
shell: bash
run: |
ARGS="${{ inputs.target }}"
ARGS="$ARGS --format ${{ inputs.format }}"
ARGS="$ARGS --output ${{ inputs.output }}"
[ -n "${{ inputs.severity }}" ] && ARGS="$ARGS --severity ${{ inputs.severity }}"
[ -n "${{ inputs.rules }}" ] && ARGS="$ARGS --rules ${{ inputs.rules }}"
pyaegis $ARGS || ${{ inputs.fail_on_findings }}
echo "sarif_file=${{ inputs.output }}" >> $GITHUB_OUTPUT