Annotating metadata with guacone
The guacone annotate-metadata command adds a HasMetadata key-value entry for a package, source, or artifact in the GUAC graph. It sends the annotation to a running GUAC GraphQL service; it does not collect documents.
Command syntax
guacone annotate-metadata [flags] <type> <subject> <key> <value>
The four positional arguments identify what to annotate:
typeispackage,source, orartifact.subjectidentifies the item, using the format appropriate to its type:- Package: A package URL (PURL), such as
pkg:golang/github.com/guacsec/guac@v0.0.0. - Source: A VCS identifier, such as
git+https://github.com/guacsec/guac. - Artifact: An
algorithm:digestpair, such as a SHA-256 digest.
- Package: A package URL (PURL), such as
keyis the metadata field name.valueis the value to store for that field.
For example, annotate a package with an owner and a justification:
guacone annotate-metadata --justification "Reviewed by security team" \
package "pkg:golang/github.com/guacsec/guac@v0.0.0" owner security
Useful flags
--justificationrecords why the annotation was added. Without this flag, GUAC usesAdded by user via guacone.--gql-addrselects the GraphQL endpoint (by default,http://localhost:8080/query).--header-filesupplies HTTP request headers for the GraphQL connection.--package-namematches all versions of a package instead of only the specified version; it applies when the subject type ispackage.
The command requires a reachable GUAC GraphQL service. For metadata labels added as documents are collected, see the separate guaccollect --label option; annotate-metadata adds metadata manually through guacone.