Skip to content
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

feat: add support for CycloneDX 1.4 specification #294

Merged
merged 19 commits into from
Jan 13, 2022

Conversation

madpah
Copy link
Collaborator

@madpah madpah commented Jan 7, 2022

feat: add support for output to CycloneDX 1.4 (draft)
feat: Error with return code 2 if attempting to output in JSON and SchemaVersion < 1.2
test: Multiple tests added

Closes #293, #280

Signed-off-by: Paul Horton phorton@sonatype.com

@madpah madpah requested a review from a team as a code owner January 7, 2022 12:17
tests/base.py Outdated Show resolved Hide resolved
tests/base.py Outdated Show resolved Hide resolved
tests/base.py Outdated Show resolved Hide resolved
tests/test_cyclonedx_xml.py Outdated Show resolved Hide resolved
tests/test_cyclonedx_xml.py Outdated Show resolved Hide resolved
tests/test_cyclonedx_xml.py Outdated Show resolved Hide resolved
@madpah madpah added the enhancement New feature or request label Jan 7, 2022
@madpah madpah linked an issue Jan 7, 2022 that may be closed by this pull request
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.

i dont see why adding all the schema files to the project and doinng tests on JSON/XML is part of this project.
see #294 (comment)

cyclonedx_py/client.py Show resolved Hide resolved
@jkowalleck
Copy link
Member

jkowalleck commented Jan 8, 2022

@madpah re #294 (review)
why add the JSON/XML/proto schema to the project? why ship it in the package?

Dont see a reason why the files should be part of this package's tests, as they are part of cyclonedx-python-lib already.
you could access the resources inside a package - via importlib or pkg

Saw the files are used in tests, to check output of cyclonedx-python-lib so why not add a validate capability to cyclonedx-python-lib ? it seams to be the perfect place.


what were the cons? why did you decide to put the data-validation in a downstream CLI tool instead of the library that generates the data in the first place?

tests/base.py Outdated Show resolved Hide resolved
tests/base.py Outdated Show resolved Hide resolved
tests/base.py Outdated Show resolved Hide resolved
@madpah
Copy link
Collaborator Author

madpah commented Jan 10, 2022

@jkowalleck - fair point on the schema validation comments - will look at moving these (where required) back to cyclonedx-python-lib.

I also think this becomes clearer given #298 (after our other Slack discussions).

@madpah madpah added this to the 2.0.0 milestone Jan 10, 2022
@madpah
Copy link
Collaborator Author

madpah commented Jan 10, 2022

@madpah re #294 (review) why add the JSON/XML/proto schema to the project? why ship it in the package?

Dont see a reason why the files should be part of this package's tests, as they are part of cyclonedx-python-lib already. you could access the resources inside a package - via importlib or pkg

Saw the files are used in tests, to check output of cyclonedx-python-lib so why not add a validate capability to cyclonedx-python-lib ? it seams to be the perfect place.

❌ what were the cons? why did you decide to put the data-validation in a downstream CLI tool instead of the library that generates the data in the first place?

Totally agree - have removed as covered in cylonedx-python-lib.

feat: Error with return code 2 if attempting to output in JSON and SchemaVersion < 1.2
test: Multiple tests added

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
fix: added missing bump to dependencies

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
* doc: migration to RTD.

Signed-off-by: Paul Horton <phorton@sonatype.com>

* doc: removed references to schema version 1.4

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
* feat: BREAKING CHANGE - reloated concrete parsers from `cyclonedx-python-lib`

Signed-off-by: Paul Horton <phorton@sonatype.com>

* re-located tests for Utils

Signed-off-by: Paul Horton <phorton@sonatype.com>

* feat: BREAKING CHANGE - relocated concreate parsers from `cyclonedx-python-lib`
doc: updated to reflect breaking changes
dod: added changelog

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
madpah and others added 9 commits January 13, 2022 09:09
…ython-lib`

doc: updated to reflect breaking changes
dod: added changelog

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
… in upstream library `cyclonedx-python-lib`

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
… in upstream library `cyclonedx-python-lib`

Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <phorton@sonatype.com>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
Signed-off-by: Paul Horton <paul.horton@owasp.org>
@madpah madpah merged commit 7bb6d32 into master Jan 13, 2022
@jkowalleck jkowalleck deleted the feat/schema-version-1.4 branch February 23, 2022 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Support for version 1.4 schema [ONHOLD] fix (or disable) poetry caching
2 participants