File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ audit_length=$(jq 'length' $output_file)
21
21
22
22
if [[ " ${audit_length} " -gt " 0" ]]; then
23
23
echo " Actionable vulnerabilities found in the following packages:"
24
- jq -r ' .[] | "\u001b[1m\(.package)\u001b[0m vulnerable in \u001b[31m\(.vulnerable)\u001b[0m fixed in \u001b[32m\(.fixed_in)\u001b[0m"' $output_file | while read -r line; do echo -e " $line " ; done
24
+ audit_output= $( jq -r ' .[] | "\u001b[1m\(.package)\u001b[0m vulnerable in \u001b[31m\(.vulnerable)\u001b[0m fixed in \u001b[32m\(.fixed_in)\u001b[0m"' $output_file | while read -r line; do echo -e " $line " ; done)
25
25
echo " Output written to ${output_file} "
26
+ echo " {audit_output}={$audit_output }" >> $GITHUB_OUTPUT
26
27
exit 1
27
28
else
28
29
echo " No actionable vulnerabilities"
Original file line number Diff line number Diff line change @@ -34,13 +34,12 @@ jobs:
34
34
run : ./.github/workflows/audit-dependencies.sh ${{ inputs.audit-level }}
35
35
36
36
- name : Failure output
37
- id : failure_output
38
37
if : failure()
39
38
run : |
40
39
echo "Vulnerabilities found."
41
40
cat audit_output.json
42
- # Output json content to GitHub Actions output
43
- echo "audit_output=$(cat audit_output.json)" >> $GITHUB_OUTPUT
41
+ # echo audit_dependencies.outputs.audit_output
42
+ echo ${{ steps.audit_dependencies.outputs.audit_output }}
44
43
45
44
- name : Slack notification on failure
46
45
if : failure()
54
53
- type: "section"
55
54
text:
56
55
type: "mrkdwn"
57
- text: "Actionable vulnerabilities found: ${{ steps.failure_output .outputs.audit_output }}"
56
+ text: "Actionable vulnerabilities found: ${{ steps.audit_dependencies .outputs.audit_output }}"
58
57
- type: "section"
59
58
text:
60
59
type: "mrkdwn"
You can’t perform that action at this time.
0 commit comments