Skip to content

feat: add rootComponentBuildSystem configuration#1349

Merged
jkowalleck merged 16 commits intoCycloneDX:masterfrom
jeremylong:build-system
Jan 8, 2025
Merged

feat: add rootComponentBuildSystem configuration#1349
jkowalleck merged 16 commits intoCycloneDX:masterfrom
jeremylong:build-system

Conversation

@jeremylong
Copy link
Contributor

Adds the configuration for rootComponentBuildSystem as discussed in #1344.

resolves #1344

resolves CycloneDX#1344

Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
@jeremylong jeremylong requested a review from a team as a code owner January 7, 2025 17:46
@jkowalleck
Copy link
Member

jkowalleck commented Jan 7, 2025

Thanks for the contribution, @jeremylong . 👍

I've done a quick review and kicked off the automated tests already.
I will give it a detailed review tomorrow.

PS: got exited by your implementation and did the review already. :D

@jeremylong
Copy link
Contributor Author

I'm a little confused about the test failures - I don't see how these are related to the proposed change.

@jkowalleck
Copy link
Member

I'm a little confused about the test failures - I don't see how these are related to the proposed change.

dont worry. if you think they are unrelated, then you are probably right.
I will check on them tomorrow.

jeremylong and others added 7 commits January 7, 2025 14:15
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Co-authored-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Copy link
Member

@jkowalleck jkowalleck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the implementation looks fantastic.
thanks a lot, @jeremylong

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck
Copy link
Member

jkowalleck commented Jan 8, 2025

oops. i've modified the test bed's package.json via ce5d852
in case this requires snapshot recreation, i will do this later.

PS: i am on it

jeremylong and others added 3 commits January 8, 2025 06:29
Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jeremylong
Copy link
Contributor Author

sorry - broke the test when I updated the author. I forgot to update the snap... but you are working on this at the same time so I'm assuming you'll fix this as I don't want to interfere with your changes.

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck
Copy link
Member

sorry - broke the test when I updated the author. I forgot to update the snap... but you are working on this at the same time so I'm assuming you'll fix this as I don't want to interfere with your changes.

no worries, it was I who broke the tests - #1349 (comment)

I am adding some docs and details here and there, and will merge the feature soon.
Thank you for all your efforts.

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck merged commit 1168236 into CycloneDX:master Jan 8, 2025
2 of 3 checks passed
@jkowalleck
Copy link
Member

jkowalleck pushed a commit that referenced this pull request Jan 29, 2025
PR #1349, for some projects, ends up creating multiple duplicate
`build-system` external references. The fix is to ensure we have not
already added an external reference of type: `build-system`.

With the current implementation, I've seen the plugin produce records
like:

```json
"externalReferences": [
        {
          "url": "https://some.build.system.internal/job/88",
          "type": "build-system",
          "comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
        },
        {
          "url": "https://some.internal.vcs/org/repo",
          "type": "vcs",
          "comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentVCS\""
        },
        {
          "url": "https://some.build.system.internal/job/88",
          "type": "build-system",
          "comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
        },
        {
          "url": "https://some.build.system.internal/job/88",
          "type": "build-system",
          "comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
        },
        {
          "url": "https://some.build.system.internal/job/88",
          "type": "build-system",
          "comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
        }
      ]
```


fixes #1356

Signed-off-by: Jeremy Long <jeremy.long@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: populate metadata.component.externalReferences VCS and build-system from common CI environment variables

2 participants

Comments