Skip to content

Commit caa5147

Browse files
authored
chore: add sbom generation script to generate sbom artifacts (#2)
* chore: add sbom_generation file * chore: use latest version of @cyclonedx/cyclonedx-npm * fix: switch to using cyclonedx-node-yarn * fix: add step to install node 22 and matching npm * fix: downgrade node version to 18 * fix: use @cyclonedx/cyclonedx-npm for generating sbom artifacts * chore: pre-install @cyclonedx/cyclonedx-npm as a dev dependency * fix: lock @cyclonedx/cyclonedx-npm version to 2.1.0 * fix: use correct path for outputArtifacts
1 parent 6488ffe commit caa5147

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

sbom_generation.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2025, 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+
12+
steps:
13+
- type: Command
14+
name: "Install dependencies & cyclonedx-node-npm package"
15+
command: |
16+
cd extension-api
17+
npm install && npm install --save-dev @cyclonedx/cyclonedx-npm@2.1.0
18+
- type: Command
19+
name: "Run cyclonedx-node-npm on extension-api"
20+
command: |
21+
cd extension-api
22+
# For more details, visit https://github.com/CycloneDX/cyclonedx-node-npm/blob/main/README.md
23+
npx @cyclonedx/cyclonedx-npm --omit dev --output-format JSON --output-file artifactSBOM.json --spec-version 1.4 --flatten-components
24+
outputArtifacts:
25+
- name: artifactSBOM
26+
type: BINARY
27+
location: ${OCI_PRIMARY_SOURCE_DIR}/extension-api/artifactSBOM.json

0 commit comments

Comments
 (0)