File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- .phony : test bench clean bundle bundle-help ci
1+ .phony : test bench clean bundle bundle-help ci sbom sbom-csv runtime-info
22
33clean :
44 rm -rf target dev-resources/bench/* .json pom.xml
@@ -65,3 +65,20 @@ bundle-help: target/bundle
6565# Generate a POM for dependency graph resolution
6666pom.xml :
6767 clojure -Acli -Spom
68+
69+ sbom : pom.xml
70+ mvn -q org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom \
71+ -DoutputFormat=json \
72+ -DoutputName=xapipe \
73+ -DschemaVersion=1.6 \
74+ -DprojectType=application
75+
76+ sbom-csv : sbom
77+ jq -r -f ./dev-resources/sbom/sbom_flat.jq ./target/xapipe.json > ./target/xapipe-sbom.csv
78+
79+ target/runtime-info.txt : bundle Dockerfile
80+ mkdir -p target
81+ docker build -t xapipe:local .
82+ docker run --rm --entrypoint sh xapipe:local -c ' set -e; echo "== OS =="; cat /etc/os-release; echo; echo "== Kernel =="; uname -a; echo; echo "== Java =="; /xapipe/runtimes/linux/bin/java -version 2>&1; echo; echo "== Packages =="; apk info -vv' > target/runtime-info.txt
83+
84+ runtime-info : target/runtime-info.txt
Original file line number Diff line number Diff line change 1+ def pkg_name (c ):
2+ if (c .group ? // "" ) != "" then "\( c .group ) /\( c .name ) " else (c .name // "" ) end ;
3+
4+ [
5+ .metadata.component ? ,
6+ .components []?
7+ ]
8+ | map (select (. != null ))
9+ | map ({
10+ package : pkg_name (. ),
11+ source : (.purl // . ["bom-ref" ] // .author // .publisher // "unknown" ),
12+ version : (.version // "unknown" )
13+ })
14+ | unique
15+ | sort_by (.package , .version )
16+ | (["package" ,"source" ,"version" ] | @csv ),
17+ (. [] | [ .package , .source , .version ] | @csv )
You can’t perform that action at this time.
0 commit comments