星期一, 10月 09, 2023

Dependency Track - SBOM 產生

使用 Dependency Track 時,最麻煩的莫過於產生軟體清單。好在存在一些可從套件管理系統產生清單的軟體。

Python(PIP)

pip install cyclonedx-bom
cyclonedx-py -r -i requirements.txt.lock  --format json -o cyclonedx.json
 
requirements.txt.lock 的部份內容是
 
awscli==1.29.62
azure-core==1.29.4
azure-storage-blob==12.18.2
botocore==1.31.62

將最終產生的檔案後上傳



NPM

npm install @cyclonedx/cyclonedx-npm

./node_modules/.bin/cyclonedx-npm ../Angular/package-lock.json  --output-file cyclonedx.json

package.json 內容只有

"@angular/cli": "^16.2.5"

將最終產生的檔案後上傳

 




沒有留言: