You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: strip authentication secrets from private index/download URL #646
Version 4.0.0 includes additional metadata in the SBOM, one of which is the package url.
When using cyclonedx-py with the --index-url parameter, the index URL ends up in the component metadata section of the SBOM (this happen with version v4.0.0-rc.4)
This can be an issue if a private PyPI registry URL is used that contains authentication credentials, e.g. the GitLab PyPi repository, where the URL looks like:
changed the title [-]Component metadata: implicit dist url may contain private index URL with authentication secrets[/-][+]feat: url may contain private index URL with authentication secrets[/+]on Jan 9, 2024
HI @jkowalleck! Masking the password is sufficient to avoid accidentally leaking the credentials.
However I'm not sure what the primary purpose of the url field is. If those URLs should be comparable across SBOM versions it's probably best to fully strip the credentials (e.g. when running in CI the username/password might be different every time).
So that a given URL: https://gitlab-ci:[email protected]/api/v4/projects/some-project/packages/pypi/simple
Would be normalised to: https://gitlab.example.com/api/v4/projects/some-project/packages/pypi/simple
So that a given URL: https://gitlab-ci:[email protected]/api/v4/projects/some-project/packages/pypi/simple
Would be normalised to: https://gitlab.example.com/api/v4/projects/some-project/packages/pypi/simple
will go with this solution , in accordance with PEP 610. implementation in progress #647
changed the title [-]feat: url may contain private index URL with authentication secrets[/-][+]feat: strip authentication secrets from private index/download URL[/+]on Jan 10, 2024
Thanks for the quick turnaround. Seems to be working nicely now with rc5.
Just wanting to say that the rest of 4.0.0 also looks really good, it's great having the additional metadata (e.g. licenses) and the dependency tree included in the SBOM.
Activity
jkowalleck commentedon Jan 9, 2024
caused by #605
jkowalleck commentedon Jan 9, 2024
Thanks for testing the v4.0.0-rc.4.
A possible solution could be, to replace the password with
*****? Would this be sufficient, @fkleon ?the mentioned issue affects the following:
pipenvrequirementspoetrypyproject.tomlenvironmentpipenvrequirementspoetrypyproject.tomlenvironmentpipenvrequirementspoetry[-]Component metadata: implicit dist url may contain private index URL with authentication secrets[/-][+]feat: url may contain private index URL with authentication secrets[/+]fkleon commentedon Jan 9, 2024
HI @jkowalleck! Masking the password is sufficient to avoid accidentally leaking the credentials.
However I'm not sure what the primary purpose of the
urlfield is. If those URLs should be comparable across SBOM versions it's probably best to fully strip the credentials (e.g. when running in CI the username/password might be different every time).So that a given URL:
https://gitlab-ci:[email protected]/api/v4/projects/some-project/packages/pypi/simpleWould be normalised to:
https://gitlab.example.com/api/v4/projects/some-project/packages/pypi/simplejkowalleck commentedon Jan 9, 2024
will go with this solution , in accordance with PEP 610. implementation in progress #647
[-]feat: url may contain private index URL with authentication secrets[/-][+]feat: strip authentication secrets from private index/download URL[/+]jkowalleck commentedon Jan 10, 2024
a fix was published in version
4.0.0rc5.Could you test it, @fkleon ?
fkleon commentedon Jan 10, 2024
Thanks for the quick turnaround. Seems to be working nicely now with
rc5.Just wanting to say that the rest of 4.0.0 also looks really good, it's great having the additional metadata (e.g. licenses) and the dependency tree included in the SBOM.