Skip to content

Commit 35b07ce

Browse files
committed
Adding required SBOM configuration.
Signed-off-by: Stephen Brennan <[email protected]>
1 parent 832a9bc commit 35b07ce

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

sbom_generation.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
2+
3+
# This OCI DevOps build specification file [1] generates a Software Bill of Materials (SBOM) of the repository.
4+
# The file is needed to run checks for third-party vulnerabilities and business approval according to Oracle's GitHub policies.
5+
# [1] https://docs.oracle.com/en-us/iaas/Content/devops/using/build_specs.htm
6+
7+
version: 0.1
8+
component: build
9+
timeoutInSeconds: 1000
10+
shell: bash
11+
env:
12+
variables:
13+
PYTHON_CMD: "python3"
14+
CDXGEN_DEBUG_MODE: "debug"
15+
16+
steps:
17+
- type: Command
18+
name: "Download the version 10.10.0 of cdxgen globally"
19+
command: |
20+
npm install -g @cyclonedx/[email protected]
21+
- type: Command
22+
name: "Workaround to let cdxgen run on nodejs 16"
23+
command: |
24+
# cdxgen relies on a fourth-party dependency that cannot be executed in a Node.js environment running version 16
25+
# (as installed on the build runner instance)
26+
# This is a workaround to ensure cdxgen functions correctly, even in an older Node.js environment.
27+
cd /node/node-v16.14.2-linux-x64/lib/node_modules/@cyclonedx/cdxgen && \
28+
npm install [email protected]
29+
- type: Command
30+
name: "Generate SBOM for Python "
31+
command: |
32+
cdxgen -t python -o artifactSBOM.json --spec-version 1.4 \
33+
--exclude "*{requirements,dev,test}*{requirements,dev,test}*.txt" --project-name "$(basename $OCI_PRIMARY_SOURCE_URL)" --no-recurse --filter setuptools
34+
outputArtifacts:
35+
- name: artifactSBOM
36+
type: BINARY
37+
location: ${OCI_PRIMARY_SOURCE_DIR}/artifactSBOM.json

0 commit comments

Comments
 (0)