forked from apisec-inc/AI-Surface
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
51 lines (48 loc) · 1.78 KB
/
Copy pathaction.yml
File metadata and controls
51 lines (48 loc) · 1.78 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
name: 'AI Surface Check'
description: 'Map AI attack surfaces in pull requests and gate new high-risk findings before merge.'
author: 'APIsec'
branding:
icon: 'eye'
color: 'blue'
inputs:
path:
description: 'Directory to scan, relative to the repository root.'
required: false
default: '.'
comment-on-pr:
description: 'Post (or update) a PR comment with the AI surface report. Set to "false" to disable.'
required: false
default: 'true'
fail-on-risk:
description: 'Exit non-zero if any risk indicators are detected. Aggressive; prefer fail-on for a severity threshold.'
required: false
default: 'false'
fail-on:
description: 'Severity-threshold gate: fail the build if a finding is at or above this severity (critical|high|medium|low). On PRs with a base ref, gates only on NEWLY introduced findings. Recommended: high.'
required: false
default: ''
write-inventory:
description: 'Write .ai-inventory.md back to the workspace.'
required: false
default: 'false'
github-token:
description: 'Token used to post PR comments. Defaults to the workflow GITHUB_TOKEN.'
required: false
default: ${{ github.token }}
outputs:
surfaces-count:
description: 'Number of production AI surfaces detected.'
risk-count:
description: 'Number of risk indicators detected.'
json-report:
description: 'Path to the JSON report file (inside the runner workspace).'
runs:
using: 'docker'
image: 'Dockerfile'
env:
AI_SURFACE_INPUT_PATH: ${{ inputs.path }}
AI_SURFACE_COMMENT_ON_PR: ${{ inputs.comment-on-pr }}
AI_SURFACE_FAIL_ON_RISK: ${{ inputs.fail-on-risk }}
AI_SURFACE_FAIL_ON: ${{ inputs.fail-on }}
AI_SURFACE_WRITE_INVENTORY: ${{ inputs.write-inventory }}
AI_SURFACE_GITHUB_TOKEN: ${{ inputs.github-token }}