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

replace deprecated ioutil functions #44

Merged
merged 11 commits into from
Jun 29, 2023

Conversation

ajistrying
Copy link
Contributor

No description provided.

schema/schema_formats.go Outdated Show resolved Hide resolved
schema/schema_formats.go Outdated Show resolved Hide resolved
schema/schema_formats.go Outdated Show resolved Hide resolved
@mrutkows
Copy link
Contributor

For G304, see:

// #nosec G304 (suppress warning)

Also, you need to use the -s option on git commit to sign your commit (assure you have set your email in your got config file).

$ git config --global user.name "<Name>"
$ git config --global user.email "<Email Address>"

ajistrying and others added 6 commits June 28, 2023 23:00
Signed-off-by: ajistrying <ajistrying@gmail.com>
Signed-off-by: ajistrying <ajistrying@gmail.com>
Signed-off-by: ajistrying <ajistrying@gmail.com>

Signed-off-by: ajistrying <ajistrying@gmail.com>
…stom format flags (CycloneDX#40)

* Create a framework for validation error special case handling

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Create a framework for validation error special case handling

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Adjust JSON output formatting as an array

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Use an ordered map to control JSON output marshaling order

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Use an ordered map to control JSON output marshaling order

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Use an ordered map to control JSON output marshaling order

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Use an ordered map to control JSON output marshaling order

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Separate format related functions into their own file

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Separate format related functions into their own file

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Format value for unique item error

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Consolidate validation flags and use on top-level API call

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Adjust JSON error result output prefix and indent

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Add validation test case for bad iri-format

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Add validation test case for bad iri-format

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Consolidate persistent command flags into a struct

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* represent array type, index and item as a map in json error results

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Support flag  true|false on validate command

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Fix even more Sonatype errors that seem to chnage every time I touch an old file

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Adjust help for validate given new formats/flags

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Update README to show validate JSON output and new flags

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* buffer JSON output for unit tests

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Update the text format logic to mirror new json formatting

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Update the text format logic to mirror new json formatting

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Update the text format logic to mirror new json formatting

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Streamline json and text formatting paths

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Adjust colorized indent to match normal indent

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Add additional test assertions to validate # errs and error conext

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Assure forced schema file tests reset to default schema

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

---------

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>
* Add CycloneDX v1.5 JSON schema and update resource config

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Add minimal tests for 1.5 schema

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

* Add minimal tests for 1.5 schema

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>

---------

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>
Signed-off-by: ajistrying <ajistrying@gmail.com>
Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>
Signed-off-by: ajistrying <ajistrying@gmail.com>
@ajistrying
Copy link
Contributor Author

ajistrying commented Jun 29, 2023

I took the advice to resign all of the previous commits I made by rebasing and then force pushing, which inevitably brought in some of your recent changes, but I think this looks to be in good shape. Apologies for the messy first PR, lessons learned!

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>
Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>
@mrutkows
Copy link
Contributor

sonatype-lift is reporting underlying Go language issues (which have no bearing on our usage) on the call to io.ReadAll() which have no fixes available at this time in a released (stable) version of Go.

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>
@mrutkows
Copy link
Contributor

@ajistrying In the future, rebase from the main branch would be preferred.

Signed-off-by: Matt Rutkowski <mrutkows@us.ibm.com>
go.mod Show resolved Hide resolved
@mrutkows
Copy link
Contributor

@ajistrying Pardon my commits on your PR, but wanted this to cross the finish line for the release I will tag/create today. Thanks for your work and hopefully you feel more familiar with the code and I will have the pleasure of collaborating with you again!

@mrutkows mrutkows merged commit 176b7b3 into CycloneDX:main Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants