CycloneDX / CycloneDX/cyclonedx-php-composer

better support for non-default/local/internal package sources

Open
#93 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted schema 1.3 schema 1.4
Dominant language
PHP
Stars
87
Forks
7
PR merge metrics
No merged PRs in 30d

Description

packages may come from local sources.
packages may come from alternative registries.

## acc / crit

- [ ] local components are marked with ` relative: true`, `path: /path/to/pod`
- [ ] the PURL should have a qualifier to indicate the non-default package registry
* spec via a qualifier from https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst#known-qualifiers-keyvalue-pairs
* caused https://github.com/package-url/packageurl-php/issues/54
* reminder: don't add "default" PURL qualifiers. (if such a thing exists)
- [ ] there must be a switch to have "short" PURLs - for reasons like https://github.com/CycloneDX/cyclonedx-node-npm/issues/225
- [ ] the demo for "local" is updated

## example source data

* in this case, the `composer.lock` file would look like this
```json
{
"packages": [
{
"name": "cyclonedx-demo/local-demo-dependency",
"version": "1.33.7",
"dist": {
"type": "path",
"url": "packages/local-demo-dependency",
"reference": "some-hash"
},
"type": "library",
"description": "a package that is hosted locally and required in a local demo",
"transport-options": {
"relative": true
}
}
]
}
```
* see the example from #324 which installs from an alternative registry.
Unfortunately, composer does not give any evidence for non-standard package registries, so this is currently not detectable properly. Maybe with a later version of composer -- need to investigate further.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.