forked from CycloneDX/cdxgen-plugins-bin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·46 lines (39 loc) · 1.56 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
rm -rf plugins/trivy
rm -rf plugins/osquery
rm -rf plugins/dosai
rm -rf plugins/sourcekitten
mkdir -p plugins/osquery plugins/dosai plugins/sourcekitten
oras pull ghcr.io/cyclonedx/cdxgen-plugins-bin:linux-amd64 -o plugins/sourcekitten/
sha256sum plugins/sourcekitten/sourcekitten > plugins/sourcekitten/sourcekitten.sha256
wget https://github.com/osquery/osquery/releases/download/5.14.1/osquery-5.14.1_1.linux_x86_64.tar.gz
tar -xvf osquery-5.14.1_1.linux_x86_64.tar.gz
cp opt/osquery/bin/osqueryd plugins/osquery/osqueryi-linux-amd64
upx -9 --lzma plugins/osquery/osqueryi-linux-amd64
sha256sum plugins/osquery/osqueryi-linux-amd64 > plugins/osquery/osqueryi-linux-amd64.sha256
rm -rf etc usr var opt
rm osquery-5.14.1_1.linux_x86_64.tar.gz
curl -L https://github.com/owasp-dep-scan/dosai/releases/latest/download/Dosai -o plugins/dosai/dosai-linux-amd64
chmod +x plugins/dosai/dosai-linux-amd64
sha256sum plugins/dosai/dosai-linux-amd64 > plugins/dosai/dosai-linux-amd64.sha256
for plug in trivy
do
mkdir -p plugins/$plug
pushd thirdparty/$plug
make all
chmod +x build/*
cp -rf build/* ../../plugins/$plug/
rm -rf build
popd
done
./plugins/osquery/osqueryi-linux-amd64 --help
upx -9 --lzma ./plugins/trivy/trivy-cdxgen-linux-amd64
./plugins/trivy/trivy-cdxgen-linux-amd64 -v
./plugins/dosai/dosai-linux-amd64 --help
for flavours in windows-amd64 linux-arm64 linux-arm windows-arm64 darwin-arm64 darwin-amd64 ppc64
do
chmod +x packages/$flavours/build-$flavours.sh
pushd packages/$flavours
./build-$flavours.sh
popd
done