-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
84 lines (81 loc) · 2.99 KB
/
action.yml
File metadata and controls
84 lines (81 loc) · 2.99 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Wrkr Action
description: Deterministic Wrkr scheduled, PR-mode, and SARIF execution for AI posture visibility.
author: Clyra-AI
inputs:
mode:
description: scheduled, pr, or sarif
required: false
default: scheduled
top:
description: number of top findings in report output
required: false
default: "5"
target_mode:
description: explicit scan target mode (repo|org|path)
required: false
default: ""
target_value:
description: explicit scan target value for the selected target_mode
required: false
default: ""
config_path:
description: optional wrkr config path used when no explicit target is provided
required: false
default: ""
block_threshold:
description: optional PR-mode risk delta threshold for merge block messaging
required: false
default: "0"
comment_fingerprint:
description: deterministic marker for PR comment upsert identity
required: false
default: "wrkr-action-pr-mode-v1"
sarif_path:
description: SARIF output path when mode=sarif
required: false
default: "./.tmp/wrkr.sarif"
remediation_mode:
description: scheduled-mode remediation behavior (summary_only|apply)
required: false
default: "summary_only"
remediation_max_prs:
description: maximum remediation PRs when remediation_mode=apply
required: false
default: "3"
outputs:
mode:
description: execution mode returned by the entrypoint
value: ${{ steps.run.outputs.wrkr_action_mode }}
summary_path:
description: generated markdown summary artifact path
value: ${{ steps.run.outputs.wrkr_action_summary }}
remediation_mode:
description: remediation publication mode used for this run
value: ${{ steps.run.outputs.wrkr_action_remediation_mode }}
posture_score:
description: posture score from the score command output
value: ${{ steps.run.outputs.wrkr_action_posture_score }}
trend_delta:
description: posture trend delta from the score command output
value: ${{ steps.run.outputs.wrkr_action_trend_delta }}
compliance_delta:
description: profile compliance delta from the scan output
value: ${{ steps.run.outputs.wrkr_action_compliance_delta }}
sarif_path:
description: SARIF artifact path when mode=sarif
value: ${{ steps.run.outputs.wrkr_action_sarif }}
runs:
using: composite
steps:
- id: run
name: Run wrkr action entrypoint
shell: bash
env:
WRKR_ACTION_BLOCK_THRESHOLD: ${{ inputs.block_threshold }}
WRKR_ACTION_COMMENT_FINGERPRINT: ${{ inputs.comment_fingerprint }}
WRKR_ACTION_SARIF_PATH: ${{ inputs.sarif_path }}
WRKR_ACTION_REMEDIATION_MODE: ${{ inputs.remediation_mode }}
WRKR_ACTION_REMEDIATION_MAX_PRS: ${{ inputs.remediation_max_prs }}
run: |
set -euo pipefail
"${{ github.action_path }}/scripts/action_entrypoint.sh" "${{ inputs.mode }}" "${{ inputs.top }}" "${{ inputs.target_mode }}" "${{ inputs.target_value }}" "${{ inputs.config_path }}" "${{ inputs.sarif_path }}"