How to Generate SBOM for PHP Projects

Can Özkan
2 min readJan 10, 2024

In the dynamic realm of PHP development, where libraries and dependencies are rather complex, the need for transparency and security has never been more critical. Enter the Software Bill of Materials (SBOM), a powerful tool that unveils the composition of PHP projects, laying bare the elements that contribute to their functionality. I’ll discuss generating SBOM files for PHP projects in this blog post.

Link: https://github.com/CycloneDX/cyclonedx-php-composer

First, make sure that PHP is installed.

Then, we install the plugin.

Check whether the plugin is installed properly.

Navigate to the project folder for which you want to generate SBOM.

The plugin required a composer.lock file to run. In case you do not have a composer.lock file, then run the following command to generate one.

Upon generating the composer.lock file, we are ready to generate an SBOM file for the project.

This work has been supported in part by the Energy Transition Fund of the FPS Economy of Belgium through the CYPRESS project, and in part by the VLAIO COOCK program through the IIoT-SBOM project.

Thanks for reading.

Can Özkan

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Can Özkan
Can Özkan

Written by Can Özkan

Security Researcher, Penetration Tester, and Reverse Engineer

Responses (1)

Write a response

I think it would be helpful if you could show real world examples instead of showing how to require a composer package. I don't have any experience with this format and would love to understand why you need it, how the generated stuff looks like…

10