Add guaccollect files option to set origin to blob path #1811
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.
Description of the PR
When the new
--use-blob-url
command line arg is set, the created nodes will have an origin whose value is the blob URL, instead of the source URL.To test this, I ran
go run ./cmd/guacone collect files ~/Downloads/demo.json
,go run ./cmd/guaccollect files ~/Downloads/demo.json --service-poll=false
, andgo run ./cmd/guaccollect files ~/Downloads/demo.json --service-poll=false --use-blob-url
. (guacingest
andguacgql
were running first, anddemo.json
is a small sample SPDX SBOM file.) In each case the command completed successfully and the HasSBOM node looked ok to me in the GraphQL Playground. I also expanded the File Collector automated test.(Please see #1806 which this basically is, plus changes requested during the last review. I didn't realize that if I changed the branch name using the GitHub interface it would close my old PR, but it did.)
PR Checklist
-s
flag togit commit
.make generate
has been runmake generate
has been runcollectsub
protobuf has been changed,make proto
has been run