CycloneDX / cyclonedx-php-composer

Create CycloneDX Software Bill of Materials (SBOM) from PHP Composer projects
https://cyclonedx.org/
Apache License 2.0
49 stars 7 forks source link

streamline demo with CycloneDX/sbom-examples #58

Closed jkowalleck closed 3 years ago

jkowalleck commented 3 years ago

there is a repo https://github.com/CycloneDX/sbom-examples it hosts example output of this project as https://github.com/CycloneDX/sbom-examples/tree/master/laravel-7.12.0

there s a demo project for cyclonedx-php-composer: https://github.com/CycloneDX/cyclonedx-php-composer/tree/master/demo

goal: stream line both of them:


demo project and reproducible outcome is available here: https://github.com/CycloneDX/cyclonedx-php-composer/tree/master/demo/laravel-7.12.0

coderpatros commented 3 years ago

That’s a great idea. Looking forward to see how you tackle this. I should do the same for the .NET implementation.

jkowalleck commented 3 years ago

@coderpatros i did a demo setup before, since i found the tests insufficient. I did not want to improve the tests, since i am working on a unit-tested rewrite already. So i came up with a demo as some kind of end-t-end integration test.

this exciting demo was runable in every supported env, but therefore it's output SBOM files were not reproducible.

SO via #59 + #66 is added the demo with thee needed laravel/laravel:7.12.0 as a reproducible setup.

Since i am pinning to outdated versions in my demo, i still need to get dependabot to ignore these demo files. this was tried to do via via #60 and #63(important - see #61) without some affect:

jkowalleck commented 3 years ago

@coderpatros i wonder if i tackeled this right.

the idea: i want to have reproducible builds. therefor i need a composer.lock file. since https://github.com/laravel/laravel/tree/v7.12.0 did not have one.

i creeated a demo project that requires laravel/framework:7.12.0 - seamed far enough for me .... then i pinned the dependencies, to keep track of the versions so i get reproducible SBOM files.

anyways, i decided to require the whole laravel via #66

jkowalleck commented 3 years ago

@coderpatros addendum: added CI tests to check that reproducible files are produced without changes - via #70

jkowalleck commented 3 years ago

all done