
JSON, XML, Protobuf, CSV और SPDX प्रारूपों में CycloneDX SBOMs उत्पन्न करने, विश्लेषण करने, विलय करने, तुलना करने, सत्यापित करने, हस्ताक्षर करने और परिवर्तित करने के लिए CLI।
______ __ ____ _ __ ________ ____
/ ____/_ _______/ /___ ____ ___ / __ \ |/ / / ____/ / / _/
/ / / / / / ___/ / __ \/ __ \/ _ \/ / / / / / / / / / /
/ /___/ /_/ / /__/ / /_/ / / / / __/ /_/ / | / /___/ /____/ /
\____/\__, /\___/_/\____/_/ /_/\___/_____/_/|_| \____/_____/___/
/____/
Usage:
cyclonedx [command] [options]
Options:
--version Show version information
-?, -h, --help Show help and usage information
Commands:
add Add information to a BOM (currently supports files)
analyze Analyze a BOM file
convert Convert between different BOM formats
diff <from-file> <to-file> Generate a BOM diff
keygen Generates an RSA public/private key pair for BOM signing
merge Merge two or more BOMs
sign Sign a BOM or file
validate Validate a BOM
verify Verify signatures in a BOM
CycloneDX CLI उपकरण वर्तमान में BOM विश्लेषण, संशोधन, डिफिंग, विलय, प्रारूप रूपांतरण, हस्ताक्षर करना और सत्यापन का समर्थन करता है।
CycloneDX XML, JSON, Protobuf, CSV, और SPDX JSON v2.3 के बीच रूपांतरण समर्थित है।
बाइनरी रिलीज़ पृष्ठ से डाउनलोड की जा सकती हैं।
नोट: CycloneDX CLI उपकरण स्वचालन उपयोग मामलों के लिए बनाया गया है। जिन कमांडों में --input-file विकल्प होता है वे stdin से इनपुट देने का भी समर्थन करते हैं। इसी तरह, जिन कमांडों में --output-file विकल्प होता है वे stdout पर आउटपुट का समर्थन करते हैं। हालाँकि, आपको इनपुट/आउटपुट प्रारूप प्रदान करने होंगे।
उदाहरण के लिए:
cat bom.json | cyclonedx-cli convert --input-format json --output-format xml > bom.xml
files
Add files to a BOM
Usage:
cyclonedx add files [options]
Options:
--input-file <input-file> Input BOM filename.
--no-input Use this option to indicate that there is no input BOM.
--output-file <output-file> Output BOM filename, will write to stdout if no value provided.
--input-format <autodetect|json|protobuf|xml> Specify input file format.
--output-format <autodetect|json|protobuf|xml> Specify output file format.
--base-path <base-path> Base path for directory to process (defaults to current working directory if omitted).
--include <include> Apache Ant style path and file patterns to specify what to include (defaults to all files, separate patterns with a space).
--exclude <exclude> Apache Ant style path and file patterns to specify what to exclude (defaults to none, separate patterns with a space).
Git रिपॉज़िटरी निर्देशिका को छोड़कर, स्रोत कोड BOM उत्पन्न करना:
cyclonedx-cli add files --no-input --output-format json --exclude /.git/**
मौजूदा BOM में, bin निर्देशिका से बिल्ड आउटपुट फ़ाइलें जोड़ना:
cyclonedx-cli add files --input-file bom.json --output-format json --base-path bin
analyze
Analyze a BOM file
Usage:
cyclonedx analyze [options]
Options:
--input-file <input-file> Input BOM filename, will read from stdin if no value provided.
--input-format <autodetect|json|protobuf|xml> Specify input file format.
--output-format <json|text> Specify output format (defaults to text).
--multiple-component-versions Report components that have multiple versions in use.
विभिन्न संस्करणों के साथ कई बार शामिल किए गए घटकों पर रिपोर्ट करना:
cyclonedx-cli analyze --input-file sbom.xml --multiple-component-versions
convert
Convert between different BOM formats
Usage:
cyclonedx convert [options]
Options:
--input-file <input-file> Input BOM filename, will read from stdin if no value provided.
--output-file <output-file> Output BOM filename, will write to stdout if no value provided.
--input-format <autodetect|csv|json|protobuf|spdxjson|xml> Specify input file format.
--output-format <autodetect|csv|json|protobuf|spdxjson|xml> Specify output file format.
--output-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5|v1_6|v1_7> Specify output BOM specification version. (ignored for CSV and SPDX formats)
XML से JSON प्रारूप में रूपांतरण करना:
cyclonedx-cli convert --input-file sbom.xml --output-file sbom.json
XML से JSON प्रारूप में रूपांतरण करना और आउटपुट को अतिरिक्त उपकरणों में पाइप करना:
cyclonedx-cli convert --input-file sbom.xml --output-format json | grep "somthing"
CSV प्रारूप BOM में घटकों की सूची का एक सीमित प्रतिनिधित्व है।
इसका उद्देश्य उपयोगकर्ताओं को सरल उपयोग मामलों के लिए BOM बनाने और उपभोग करने का एक सरल तरीका प्रदान करना है। सरल डेटा माइग्रेशन उपयोग मामलों सहित।
केवल आवश्यक फ़ील्ड घटक name और version फ़ील्ड हैं। अन्य को खाली छोड़ा जा सकता है या कॉलम हटाए जा सकते हैं।
SPDX और CycloneDX प्रारूपों के बीच रूपांतरण के परिणामस्वरूप कुछ जानकारी नष्ट हो सकती है। रूपांतरण कार्यक्षमता CycloneDX.Spdx.Interop लाइब्रेरी द्वारा प्रदान की जाती है, जो CycloneDX .NET लाइब्रेरी परियोजना का हिस्सा है।
कौन सी जानकारी नष्ट होती है इसके अधिक विवरण के लिए CycloneDX .NET Library परियोजना पृष्ठ देखें।
diff
Generate a BOM diff
Usage:
cyclonedx diff <from-file> <to-file> [options]
Arguments:
<from-file> From BOM filename.
<to-file> To BOM filename.
Options:
--from-format <autodetect|json|protobuf|xml> Specify from file format.
--to-format <autodetect|json|protobuf|xml> Specify to file format.
--output-format <json|text> Specify output format (defaults to text).
--component-versions Report component versions that have been added, removed or modified.
संस्करण परिवर्तन वाले घटकों पर रिपोर्ट करना:
cyclonedx-cli diff sbom-from.xml sbom-to.xml --component-versions
keygen
Generates an RSA public/private key pair for BOM signing
Usage:
cyclonedx keygen [options]
Options:
--private-key-file <private-key-file> Filename for generated private key file (defaults to "private.key")
--public-key-file <public-key-file> Filename for generated public key file (defaults to "public.key")
merge
Merge two or more BOMs
Usage:
cyclonedx merge [options]