-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
110 lines (107 loc) · 3.81 KB
/
Copy pathaction.yml
File metadata and controls
110 lines (107 loc) · 3.81 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Evaluation adapter
description: Normalize one immutable scanner invocation and its raw SARIF into the v1 Evaluation Result.
inputs:
evaluation-id:
description: Stable evaluation identifier.
required: true
tool-name:
description: Scanner name.
required: true
tool-version:
description: Exact scanner version used by the invocation.
required: true
tool-outcome:
description: success, failure, cancelled, timed-out, or skipped.
required: true
tool-exit-code:
description: Raw scanner exit code when available.
required: false
default: ""
raw-evidence:
description: Raw SARIF file produced by the scanner.
required: false
default: ""
evidence-artifact:
description: Durable GitHub artifact name containing the raw evidence.
required: false
default: ""
remediation-guidance:
description: Actionable remediation guidance shown with findings.
required: false
default: Review the reported rule, correct the affected source, and document any verified false positive.
max-summary-findings:
description: Maximum findings rendered in the job summary and annotations.
required: false
default: "20"
blocking:
description: Fail when validated evidence contains findings.
required: false
default: "false"
scope-target:
description: Human-readable evaluated target.
required: false
default: repository
coverage-included:
description: JSON array describing included scope.
required: false
default: "[]"
coverage-excluded:
description: JSON array describing excluded scope.
required: false
default: "[]"
coverage-limitations:
description: JSON array of known limitations.
required: false
default: "[]"
evaluation-result-file:
description: Destination for normalized Evaluation Result JSON.
required: false
default: ""
summary-file:
description: Destination for the readable evaluation summary.
required: false
default: ""
outputs:
completion:
description: complete, incomplete, skipped, or error.
value: ${{ steps.adapt.outputs.completion }}
findings-count:
description: Authoritative count when available.
value: ${{ steps.adapt.outputs.findings_count }}
merge-conclusion:
description: pass, fail, or not-evaluated.
value: ${{ steps.adapt.outputs.merge_conclusion }}
evaluation-result:
description: Path to the v1 Evaluation Result JSON.
value: ${{ steps.adapt.outputs.evaluation_result }}
evidence-artifact:
description: Durable artifact name containing raw evidence.
value: ${{ steps.adapt.outputs.evidence_artifact }}
summary:
description: Path to the readable evaluation summary.
value: ${{ steps.adapt.outputs.summary }}
runs:
using: composite
steps:
- id: adapt
shell: bash
env:
EVALUATION_ID: ${{ inputs.evaluation-id }}
TOOL_NAME: ${{ inputs.tool-name }}
TOOL_VERSION: ${{ inputs.tool-version }}
TOOL_OUTCOME: ${{ inputs.tool-outcome }}
TOOL_EXIT_CODE: ${{ inputs.tool-exit-code }}
RAW_EVIDENCE: ${{ inputs.raw-evidence }}
EVIDENCE_ARTIFACT: ${{ inputs.evidence-artifact }}
REMEDIATION_GUIDANCE: ${{ inputs.remediation-guidance }}
MAX_SUMMARY_FINDINGS: ${{ inputs.max-summary-findings }}
BLOCKING: ${{ inputs.blocking }}
SCOPE_TARGET: ${{ inputs.scope-target }}
COVERAGE_INCLUDED: ${{ inputs.coverage-included }}
COVERAGE_EXCLUDED: ${{ inputs.coverage-excluded }}
COVERAGE_LIMITATIONS: ${{ inputs.coverage-limitations }}
EVALUATION_RESULT_FILE: ${{ inputs.evaluation-result-file }}
SUMMARY_FILE: ${{ inputs.summary-file }}
EVALUATION_REPOSITORY: ${{ github.repository }}
EVALUATION_REF: ${{ github.sha }}
run: bash "${GITHUB_ACTION_PATH}/evaluation-adapter.sh"