Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ artemis-console-extension/artemis-extension/node/**/*
artemis-console-extension/artemis-extension/packages/artemis-console-plugin/node_modules/
artemis-console-extension/artemis-extension/app/node_modules/**/*

# generated SBOM
artemis-console-extension/artemis-extension/bom.cdx.json

# yarn (zero-installs)
artemis-console-extension/artemis-extension/.yarn/install-state.gz
.yarn/**
Expand Down
2 changes: 1 addition & 1 deletion artemis-console-extension/artemis-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "artemis-console-monorepo",
"version": "0",
"version": "0.0.0",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was necessary for the yarn cyclonedx plugin to work

"description": "Artemis Console Monorepo",
"license": "Apache-2.0",
"private": true,
Expand Down
36 changes: 36 additions & 0 deletions artemis-console-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,36 @@
<arguments>yarn build</arguments>
</configuration>
</execution>
<!--
Generate a CycloneDX SBOM for all npm dependencies
using the official CycloneDX Yarn plugin. Resolves
licenses from package.json in node_modules.
-->
<execution>
<id>generate-sbom</id>
<goals>
<goal>corepack</goal>
</goals>
<configuration>
<arguments>yarn workspace artemis-console-app dlx @cyclonedx/yarn-plugin-cyclonedx@3.3.3 --spec-version 1.6 --output-file ../bom.cdx.json</arguments>
</configuration>
</execution>
<!--
Enrich the SBOM:
- add SHA-512 hashes from yarn.lock;
- add evidence.identity;
- --prod-only excludes non-production dependencies entirely;
- omitting --prod-only sets scope=excluded for non-prod dependencies.
-->
<execution>
<id>enrich-sbom</id>
<goals>
<goal>corepack</goal>
</goals>
<configuration>
<arguments>yarn dlx @cyberstamp/cdx-npm-enrich@0.1.4 --prod-only bom.cdx.json</arguments>
</configuration>
</execution>
<execution>
<id>yarn test</id>
<goals>
Expand Down Expand Up @@ -117,6 +147,12 @@
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${basedir}/${extension.path}</directory>
<includes>
<include>bom.cdx.json</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
Expand Down
35 changes: 35 additions & 0 deletions artemis-console-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<id>prepare-war</id>
<phase>prepare-package</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<nonFilteredFileExtensions>
<!-- default value contains jpg,jpeg,gif,bmp,png -->
Expand All @@ -92,10 +101,36 @@
<include>**/*.*</include>
</includes>
</resource>
<resource>
<filtering>false</filtering>
<directory>${project.build.directory}</directory>
<targetPath>META-INF/sbom</targetPath>
<includes>
<include>bom.cdx.json</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>

<plugin>
<groupId>dev.cyberstamp.maven.assembly.sbom</groupId>
<artifactId>assembly-sbom-maven-plugin</artifactId>
<version>0.1.0</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<externalSboms>${project.basedir}/../artemis-console-extension/artemis-extension/bom.cdx.json</externalSboms>
<outputFile>${project.build.directory}/bom.cdx.json</outputFile>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-maven-plugin</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@
<exclude>**/tsconfig.json</exclude>
<exclude>**/artemis-extension/app/build/**</exclude>
<exclude>**/artemis-extension/packages/artemis-console-plugin/dist/**</exclude>

<!-- Generated SBOM -->
<exclude>**/bom.cdx.json</exclude>
</excludes>
</configuration>
</plugin>
Expand Down