Skip to content

Commit 0771d5c

Browse files
committed
cdxgen to v1 with orchestration for writing to dependency track for now
1 parent 42ea6ec commit 0771d5c

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

components/scanners/cdxgen/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# cdxgen
2+
3+
This component implements a [scanner](https://github.com/smithy-security/smithy/blob/main/sdk/component/component.go)
4+
that runs CDXGEN and puts the results in a waiting Dependency Track instance. The component does not parse or handle the produced SBOM any other way for now.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: cdxgen
2+
description: "Creates an SBOM then sends it to a remote Dependency Track"
3+
type: scanner
4+
parameters:
5+
- name: backend_server_url
6+
type: string
7+
value: ""
8+
- name: api_key
9+
type: string
10+
value: ""
11+
- name: project_name
12+
type: string
13+
value: ""
14+
- name: project_version
15+
type: string
16+
value: ""
17+
steps:
18+
- name: run-cdxgen
19+
image: ghcr.io/cyclonedx/cdxgen:latest
20+
21+
executable: "node"
22+
args:
23+
- "/opt/cdxgen/bin/cdxgen.js"
24+
- --server-url='{{.parameters.backend_server_url}}'
25+
- --skip-dt-tls-check=true
26+
- --api-key='{{.parameters.api_key}}'
27+
- --project-name='{{.parameters.project_name}}'
28+
- --project-version='{{.parameters.project_version}}'
29+
- --output={{scratchWorkspace}}/sbom.cyclonedx.json
30+
- '{{sourceCodeWorkspace}}'

examples/cdxgen/overrides.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
git-clone:
2+
- name: "repo_url"
3+
type: "string"
4+
value: ""
5+
cdxgen:
6+
- name: "backend_server_url"
7+
type: "string"
8+
value: ""
9+
- name: "api_key"
10+
type: "string"
11+
value: ""
12+
- name: "project_name"
13+
type: "string"
14+
value: ""
15+
- name: "project_version"
16+
type: "string"
17+
value: ""

examples/cdxgen/workflow.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: cdxgen based workflow
2+
name: cdxgen
3+
components:
4+
- component: file://components/targets/git-clone/component.yaml
5+
- component: file://components/scanners/cdxgen/component.yaml

0 commit comments

Comments
 (0)