Skip to content

Commit 1ce8f7a

Browse files
committed
sbom detection
Signed-off-by: Julio Jimenez <julio@clickhouse.com>
1 parent 77680f3 commit 1ce8f7a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ inputs:
2828
repository:
2929
description: 'Repository to download SBOM from (format: owner/repo)'
3030
required: true
31+
sbom-format:
32+
description: 'Final SBOM format (spdx or cyclonedx)'
33+
required: false
34+
default: 'cyclonedx'
3135
runs:
3236
using: 'docker'
3337
image: 'Dockerfile'
@@ -40,8 +44,7 @@ runs:
4044
S3_BUCKET: ${{ inputs.s3-bucket }}
4145
S3_KEY: ${{ inputs.s3-key }}
4246
REPOSITORY: ${{ inputs.repository }}
43-
SBOM_PATH: ${{ inputs.sbom-path }}
44-
REF: ${{ inputs.ref }}
47+
SBOM_FORMAT: ${{ inputs.sbom-format }}
4548
branding:
4649
icon: 'list'
4750
color: 'yellow'

entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,8 @@ main() {
178178
validate_env
179179

180180
# Set defaults for optional variables
181-
local sbom_path="${SBOM_PATH:-sbom.json}"
182-
local ref="${REF:-main}"
183181
local s3_key="${S3_KEY:-sbom.json}"
182+
local desired_format="${SBOM_FORMAT:-cyclonedx}"
184183

185184
# Set up cleanup trap
186185
trap cleanup EXIT
@@ -191,7 +190,7 @@ main() {
191190
exit 1
192191
fi
193192
local original_sbom="$temp_dir/original_sbom.json"
194-
local cyclonedx_sbom="$temp_dir/cyclonedx_sbom.json"
193+
local processed_sbom="$temp_dir/processed_sbom.json"
195194

196195
# Download SBOM
197196
download_sbom "$REPOSITORY" "$original_sbom"

0 commit comments

Comments
 (0)