PHP code example of mteu / sbom-parser
1. Go to this page and download the library: Download mteu/sbom-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mteu / sbom-parser example snippets
use mteu\SbomParser\Parser\CycloneDxParser;
$parser = new CycloneDxParser();
$bom = $parser->parseFromFile('/path/to/sbom.json');
// Access components and vulnerabilities
$components = $bom->getAllComponents();
$vulnerabilities = $bom->vulnerabilities;