-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
29 lines (28 loc) · 856 Bytes
/
action.yml
File metadata and controls
29 lines (28 loc) · 856 Bytes
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
name: "Run ThirdParties scan"
description: "Run a third-party scripts scan on an URL"
inputs:
url:
description: "URL ro scan"
required: true
output:
description: "Path to output file. defaults to thirdparties.json"
default: "thirdparties.json"
required: true
outputs:
json:
description: "Third parties json as output string"
value: ${{ steps.thirdparties.outputs.json }}
runs:
using: "composite"
steps:
- uses: actions/setup-node@v4
with:
node-version: "20"
- id: thirdparties
shell: bash
run: |
cd ${{ github.action_path }}
yarn
JSON_OUTPUT=$(node src/scan ${{ inputs.url }} | tee -a ${{ github.workspace }}/${{ inputs.output }})
JSON_OUTPUT_FORMATTED=$(echo $JSON_OUTPUT | sed 's/ //g')
echo "::set-output name=json::$JSON_OUTPUT_FORMATTED"