cyclonedx/cyclonedx-library
Composer 安装命令:
composer require cyclonedx/cyclonedx-library
包简介
Work with CycloneDX documents.
关键字:
README 文档
README
OWASP CycloneDX is a full‑stack Bill of Materials (BOM) and system‑transparency standard that provides deep visibility into software, services, hardware, and AI components, enabling advanced supply‑chain security and cyber‑risk reduction.
This package provides functionality of CycloneDX for PHP.
Note
This package is a software library not intended for standalone use.
For generating Software Bill of Materials (SBOM), check out CycloneDX PHP Composer Plugin.
Responsibilities
- Provide a general purpose php-implementation of CycloneDX.
- Provide phpDoc3- & psalm-compatible annotations for said implementation, so developers and dev-tools can rely on it.
- Provide data models to work with CycloneDX.
- Provide a JSON- and an XML-normalizer, that...
- supports all shipped data models.
- respects any injected CycloneDX Specification and generates valid output according to it.
- can prepare data structures for JSON- and XML-serialization.
- Serialization:
- Provide a JSON-serializer.
- Provide an XML-serializer.
- Validation against CycloneDX Specification:
- Provide a JSON-validator.
- Provide an XML-validator.
- Provide composer-based autoloading for downstream usage.
Capabilities
- Enums for the following use cases:
ComponentTypeExternalReferenceTypeHashAlgorithmLicenseAcknowledgement
- Data models for the following use cases:
BomBomRef,BomRefRepositoryComponent,ComponentRepository,ComponentEvidenceExternalReference,ExternalReferenceRepositoryHashDictionaryLicenseExpression,NamedLicense,SpdxLicense,LicenseRepositoryMetadataProperty,PropertyRepositoryTool,ToolRepository
- Utilities for the following use cases:
- Generate valid random SerialNumbers for
Bom.serialNumber
- Generate valid random SerialNumbers for
- Factories for the following use cases:
- Create data models from any license descriptor string
- Implementation of the CycloneDX Specification for the following versions:
1.71.61.51.41.31.21.1
- Normalizers that convert data models to JSON structures
- Normalizers that convert data models to XML structures
- Serializer that converts
Bomdata models to JSON string - Serializer that converts
Bomdata models to XML string - Validator that checks JSON against CycloneDX Specification
- Validator that checks XML against CycloneDX Specification
Installation
Install via composer:
composer require cyclonedx/cyclonedx-library
Usage
See extended examples.
$bom = new \CycloneDX\Core\Models\Bom(); $bom->getComponents()->addItems( new \CycloneDX\Core\Models\Component( \CycloneDX\Core\Enums\ComponentType::Library, 'myComponent' ) );
API Documentation
We ship code annotations, so that your IDE and tools may pick up the documentation when you use this library downstream.
There are also pre-rendered documentations hosted on readthedocs.
Additionally, there is a prepared config for phpDoc3 that you can use to generate the docs for yourself.
Conflicts
Due to the fact that this library was split out of /src/Core of cyclonedx-php-composer (346e6200fb2f5086061b15c2ee44f540893ce97d)
it will conflict with its original source: cyclonedx/cyclonedx-php-composer:<3.5.
Contributing
Feel free to open issues, bug reports or pull requests.
See the CONTRIBUTING file for details.
License
Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.
See the LICENSE file for the full license.
cyclonedx/cyclonedx-library 适用场景与选型建议
cyclonedx/cyclonedx-library 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.86M 次下载、GitHub Stars 达 13, 最近一次更新时间为 2021 年 10 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「validator」 「serializer」 「models」 「normalizer」 「bom」 「owasp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cyclonedx/cyclonedx-library 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cyclonedx/cyclonedx-library 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cyclonedx/cyclonedx-library 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bridge between JMS Serializer Bundle and Superdesk Web Publisher.
Runn Me! Validation and Sanitization Library
Extension for Opis JSON Schema
De/normalize business objects without tightly coupling them to your normalization format
Wordpress Query Builder class library for custom models and data querying.
A Laravel package for managing model drafts.
统计信息
- 总下载量: 1.86M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 53
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-10-06