這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WpBom

描述

This package is compatible with WordPress Coding Standards, PSR-4.

WordPress integration with OWASP CycloneDX and Dependency Track

Features:

  • Automatic BOM submission to OWASP Dependency Track
  • Manual BOM submission to OWASP Dependency Track
  • Download BOM JSON in OWASP CycloneDX format

螢幕截圖

安裝

This project uses PHP and Composer.

$ cd wp-content/plugins/ $ git clone https://gitlab.com/sepbit/wpbom.git $ cd wpbom $ composer update –no-dev

常見問題

Add CPE from BOM

add_filter(
    'wpbom_bom',
    function( $bom ) {
        foreach ( $bom['components'] as $key => $component ) {
            if ( 'woocommerce' === $component['name'] ) {
                $bom['components'][ $key ]['cpe'] = 'cpe:2.3:a:woocommerce:woocommerce:' . $component['version'] . ':*:*:*:*:wordpress:*:*';
            }
        }
        return $bom;
    }
);

We are building a feature to automate this

Remove component from BOM

add_filter(
    'wpbom_bom',
    function( $bom ) {
        foreach ( $bom['components'] as $key => $component ) {
            if ( 'woocommerce' === $component['name'] ) {
                unset( $bom['components'][ $key ] );
            }
        }
        return $bom;
    }
);

Add component from BOM

add_filter(
    'wpbom_bom',
    function( $bom ) {
        global $wpdb;
        $db_server_info      = explode( '-', $wpdb->db_server_info() );
        $bom['components'][] = array(
            'type'     => 'application',
            'bom-ref'  => 'pkg:deb/debian/' . strtolower( $db_server_info[2] ) . '@' . $db_server_info[1],
            'name'     => strtolower( $db_server_info[2] ),
            'version'  => $db_server_info[1],
            'purl'     => 'pkg:deb/debian/' . strtolower( $db_server_info[2] ) . '@' . $db_server_info[1],
            'licenses' => array(
                array(
                    'license' => array(
                        'id' => 'GPL-2.0-or-later',
                    ),
                ),
            ),
        );
        return $bom;
    }
);

評價

There are no reviews for this plugin.

貢獻者及開發者

“WpBom” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

WpBom 外掛目前已有 1 個本地化語言版本。 感謝所有譯者為這個外掛做出的貢獻。

將 WpBom 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.4.0

  • Add PHP 8.4

1.2.0

  • Add WordPress as component
  • Fix some bugs

1.1.0

  • Add CPE example
  • Fix Copyright
  • Remove purl

1.0.2

  • Add icon

1.0.0

  • First release!