-
-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's not possible to import components with PURLs with more than 255 characters #2076
Comments
I've seen the same thing happen on our end. Thankfully, the cyclonedx-npm tool supports a --short-PURLs argument which shortens the URLs at the cost of losing some information. It's a stopgap until this is fixed. |
I have the same issue with the |
Would it be useful if we trim the filepath, checksum, repository etc from the purl before saving it to database. And keep the full purl in the details field of the component, for example, saying that this is the original purl. |
Any update ? |
FWIW, if you're running Postgres, you can simply We have yet to find a good way to address this in the code, such that it works for all supported databases, and does not break any indexes. |
Just altered all |
The
|
There are actually quite a few things other than just the PURL that are currently limited to 255 characters in the database and/or in the input parsing. See this query for places where the |
Whilst this issue has now been assigned to 5.x milestone, it could make it into v4.x if someone were to submit a PR. Just as long as it works across all RDBMSs. |
We can remove the But to my knowledge MySQL requires a key length when creating indexes on text columns, and MSSQL also has some special behavior when indexing unlimited text. Because the ORM we still use does not allow us to specify specific indexes to use, per default it will create indexes that are plain useless on at least 2 of the supported RDBMSes. So the problem remains that we can't offer a general solution without breaking things for certain RDBMSes. |
Facing the same issue. this make this: -> pkg:npm/%40babel/[email protected]#packages/babel-plugin-transform-react-display-name and worked fine |
I had another look at this:
For MySQL, the above means that even the current database schema is incompatible when using Unicode collation. Even a PURL column defined as Given the MSSQL constraint, what we can do is we can increase the PURL length limit from 255 to 786, which is less than the lowest index key length limit of 900. This means that everyone except MySQL users will automatically benefit from this. 786 characters should be plenty. We can re-asses the situation if that still causes issues. |
Because PURLs are also used to populate the `TARGET` column of `COMPONENTANALYSISCACHE`, that column's length also has to be extended. Fixes DependencyTrack#2076 Signed-off-by: nscuro <[email protected]>
Because PURLs are also used to populate the `TARGET` column of `COMPONENTANALYSISCACHE`, that column's length also has to be extended. Fixes DependencyTrack#2076 Signed-off-by: nscuro <[email protected]>
Because PURLs are also used to populate the `TARGET` column of `COMPONENTANALYSISCACHE`, that column's length also has to be extended. Fixes DependencyTrack#2076 Signed-off-by: nscuro <[email protected]>
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Current Behavior:
Due to the chosen database schema, Dependency-Track is not able to import components with package URLs that have a length of 255 characters or more. See CycloneDX/cyclonedx-node-npm#224
Steps to Reproduce:
Upload a BOM that contains a component with a long (>255 characters) PURL.
Expected Behavior:
Dependency-Track should be able to import components with PURLs of arbitrary length.
Environment:
Additional Details:
The
"COMPONENT"."PURL"
column is indexed. Migrating it fromVARCHAR(255)
toMEDIUMTEXT
,TEXT
or similar data types may have a strong impact on query performance.The text was updated successfully, but these errors were encountered: