add debug print of full HttpPost and logs #153
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type:
Enhancement
PR Description:
This PR enhances the debugging capabilities by adding debug logs to various functions. It also adds mock vulnerability data to the
MockCVEAdapter
for testing purposes.PR Main Files Walkthrough:
files:
adapters/mockcve.go
: Added mock vulnerability data to theScanSBOM
function of theMockCVEAdapter
.adapters/v1/backend.go
: Added a new functionhttpPostDebug
that logs the full URL, headers, and body of an HTTP post request.adapters/v1/grype.go
: Enhanced the debug log in theScanSBOM
function to include the number of vulnerabilities.adapters/v1/syft.go
: Enhanced the debug log in theCreateSBOM
function to include the number of packages.