Skip to content

[2.0]: fix unreachable cross-references #992

Closed

Description

@jkowalleck

in CycloneDX 2.0 we have unreachable cross-references

main goal

have these links fixed

additional goal

have a tool that checks all those $ref values

  • minimum: that start with a . and see if they exist - not only the file, but also the linked element
  • maximum: any value and see if the linked element exists - in the remote document (starts with ./ or ../) or the same document (start with #) ...

hm, Our validators that test weather the test cases are schema-valid should have picked this up already ...
let's see why they did not

Activity

  1. added this to the 2.0 milestone on Jul 30, 2026
  2. added
    CDX 2.0related to release v2.0
    and removed on Jul 30, 2026
  3. self-assigned this
    on Aug 3, 2026
  4. linked a pull request that will close this issue[2.0] fixes on schema and test resources #1001on Aug 5, 2026
  5. stevespringett commented on Aug 9, 2026

    @stevespringett
    Member

    These references are designed to be resolved from the 2.0 directory during bundling. They will not be resolved from the model directory. Perhaps this is an enhancement to the bundler tool to fix the resolution when schemas are bundled.

  6. jkowalleck commented on Aug 10, 2026

    @jkowalleck
    MemberAuthor

    These references are designed to be resolved from the 2.0 directory during bundling. They will not be resolved from the model directory. Perhaps this is an enhancement to the bundler tool to fix the resolution when schemas are bundled.

    well, you might be wrong here. (see the PS below)

    long story short: the bundler already knows how to reqire those paths.

    therefore, the references in source files must exist and must ,as expected, be relative to their location, not relative to the bundlers result target.


    PS: I need those "source-files" - the non-bundled files - in perfect working condition to craft the pytthon data models from them.
    The code generator i am planning to use can properly resolve $refed files and will create own pytthon modules for each file.
    The only issue coming up will be cyclic dependencies ...


    PPS: the tests i've addedin #1000 do all work from the source file - not from the compiled files. THis is since the compiler is not run every time to prevent conflicts on feature development.
    So we definitely need those source files in perfect working condition.
    See those refs fixed and all tests passing in #1001 -- while the bundled results are still intact for "external" $refs

  7. jkowalleck commented on Aug 24, 2026

    @jkowalleck
    MemberAuthor

    the bundler is aware of requireing.
    we have a test for this , now - and all tests are currently passing.

    DONE since #1000 #1001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions