Skip to content

GitHub action to generate a CycloneDX SBOM for PHP Composer

License

Notifications You must be signed in to change notification settings

CycloneDX/gh-php-composer-generate-sbom

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Note

This GitHub Action is considered deprecated.
Instead, you may use the underlying tool directly: cyclonedx/cyclonedx-php-composer

# setup you PHP and composer first - here is an example:
- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
    extensions: dom,json,libxml
    tools: 'composer:v2'

- name: Install SBOM composer plugin 
  run: |-
    composer global config --no-plugins allow-plugins.cyclonedx/cyclonedx-php-composer true
    composer global require cyclonedx/cyclonedx-php-composer
- name: Create SBOM step
  # see for usage: https://packagist.org/packages/cyclonedx/cyclonedx-php-composer
  run: composer CycloneDX:make-sbom --help

GitHub action to generate a CycloneDX SBOM for PHP Composer projects

Website Slack Invite Group Discussion Twitter

Example usage

uses: CycloneDX/gh-php-composer-generate-sbom@v1

Internals

This action utilizes cyclonedx/cyclonedx-php-composer:<4. See cyclonedx/cyclonedx-php-composer on Packagist.