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

Add guaccollect files option to set origin to blob path #1811

Merged

Conversation

nchelluri
Copy link
Contributor

@nchelluri nchelluri commented Apr 4, 2024

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, and go run ./cmd/guaccollect files ~/Downloads/demo.json --service-poll=false --use-blob-url. (guacingest and guacgql were running first, and demo.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

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If OpenAPI spec is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

Signed-off-by: Narsimham Chelluri (Narsa) <narsa@kusari.dev>
- They are actually blob URLs, so this is slightly
  more accurate, and a touch shorter.

Signed-off-by: Narsimham Chelluri (Narsa) <narsa@kusari.dev>
Signed-off-by: Narsimham Chelluri (Narsa) <narsa@kusari.dev>
@kodiakhq kodiakhq bot merged commit 136ad62 into guacsec:main Apr 4, 2024
8 checks passed
@nchelluri nchelluri deleted the nchelluri/guaccollect-files-can-use-blob-url branch April 8, 2024 18:24
arorasoham9 pushed a commit to arorasoham9/guac that referenced this pull request May 17, 2024
* Add guaccollect files option to set origin to blob path

Signed-off-by: Narsimham Chelluri (Narsa) <narsa@kusari.dev>

* Change nomenclature: "blob path" -> "blob URL"

- They are actually blob URLs, so this is slightly
  more accurate, and a touch shorter.

Signed-off-by: Narsimham Chelluri (Narsa) <narsa@kusari.dev>

* Update field comment and CLI arg desc to be more useful

Signed-off-by: Narsimham Chelluri (Narsa) <narsa@kusari.dev>

---------

Signed-off-by: Narsimham Chelluri (Narsa) <narsa@kusari.dev>
Signed-off-by: Soham Arora <arorasoham9@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants