Skip to content

bide-anchor command reference ​

bide-anchor verifies and exports the signed tree heads that an object-store anchor wrote to a bucket: -backend s3 for the S3 Object Lock anchor (anchor/awss3), the default, and -backend gcs for the Google Cloud Storage anchor (anchor/gcs), which takes -project (the project number) in place of -owner. It is a separate program in its own module, so that the cloud SDKs of the anchors it reads are not in bide:

sh
go install github.com/bide-ai/bide/cmd/bide-anchor@latest

How the anchor works, the bucket and IAM setup, and what each check shows and does not show, are in the anchoring guide. Flags take one dash, as in bide. Credentials come from the cloud SDK's default chain (the AWS chain, or Application Default Credentials for gcs), never from flags; a server other than AWS is selected with AWS_ENDPOINT_URL_S3 and -path-style. Exit status is 0 for success, 1 for a head or object that did not verify or a finding, 2 for a usage error, and 3 when the bucket's state is unknown: an online read was unavailable, denied or timed out, so the audit did not finish. Retry, and alert if it persists; an aborted audit is never a pass and is not a finding.

CommandWhat it does
bide-anchor verifyoffline: check every object in a directory of downloaded anchor objects
bide-anchor exportwrite the verified heads of one run or trail, one per line, for bide audit -heads
bide-anchor checkonline, read-only: verify the heads and report how they are stored

bide-anchor verify ​

Usage of bide-anchor verify:
  -backend string
    	the object store the anchor wrote to: s3, gcs (default "s3")
  -dir string
    	a directory of downloaded anchor objects
  -kind string
    	the tree kind: journal, or events for a notification or event trail (default "journal")
  -pubkey string
    	the log operator's public key (ed25519:<hex>, or a file holding it, or - for standard input, or a <(...) process substitution)
  -run string
    	only this run or trail ID (default: every one)

bide-anchor export ​

Usage of bide-anchor export:
  -backend string
    	the object store the anchor wrote to: s3, gcs (default "s3")
  -bucket string
    	read this anchor bucket (online, with read-only credentials)
  -dir string
    	read a directory of downloaded anchor objects (offline)
  -force
    	with -bucket: export even when the lock audit has findings
  -kind string
    	the tree kind: journal, or events for a notification or event trail (default "journal")
  -kms-key string
    	the KMS key the heads must be encrypted with (gcs: projects/P/locations/L/keyRings/R/cryptoKeys/K; s3: an AWS KMS key ID (UUID), an mrk- key ID or a key ARN, nothing else, not an alias; leave it out on an S3-compatible server with named keys): a bucket default or an object with another key is a finding
  -lock-mode string
    	-backend s3: the object lock mode the anchor was configured with, COMPLIANCE or GOVERNANCE: a bucket default that is weaker is a finding, and with GOVERNANCE a governance-locked object is not
  -o string
    	write to this file instead of standard output
  -owner string
    	-backend s3: the 12-digit AWS account ID that owns the bucket (with -bucket)
  -path-style
    	use path-style addressing (a non-AWS server)
  -prefix string
    	the key prefix the anchor was configured with (default bide-anchor/)
  -project string
    	-backend gcs: the number of the Google Cloud project that owns the bucket (with -bucket)
  -pubkey string
    	the log operator's public key (ed25519:<hex>, or a file holding it, or - for standard input, or a <(...) process substitution)
  -retention duration
    	the retention the anchor was configured with: a bucket retention shorter than this (and, for s3, an object retained for less from its own write) is a finding; without it only the 24 h minimum is checked. A default retention in years counts as 365 days a year (7 years: 2555 days, 61320h), so pass at most that
  -run string
    	the run or trail ID
  -timeout duration
    	with -bucket: give up after this long and exit 3 (state unknown); 0: no limit (default 5m0s)

bide-anchor check ​

Usage of bide-anchor check:
  -backend string
    	the object store the anchor wrote to: s3, gcs (default "s3")
  -bucket string
    	read this anchor bucket (online, with read-only credentials)
  -kind string
    	the tree kind: journal, or events for a notification or event trail (default "journal")
  -kms-key string
    	the KMS key the heads must be encrypted with (gcs: projects/P/locations/L/keyRings/R/cryptoKeys/K; s3: an AWS KMS key ID (UUID), an mrk- key ID or a key ARN, nothing else, not an alias; leave it out on an S3-compatible server with named keys): a bucket default or an object with another key is a finding
  -lock-mode string
    	-backend s3: the object lock mode the anchor was configured with, COMPLIANCE or GOVERNANCE: a bucket default that is weaker is a finding, and with GOVERNANCE a governance-locked object is not
  -owner string
    	-backend s3: the 12-digit AWS account ID that owns the bucket (with -bucket)
  -path-style
    	use path-style addressing (a non-AWS server)
  -prefix string
    	the key prefix the anchor was configured with (default bide-anchor/)
  -project string
    	-backend gcs: the number of the Google Cloud project that owns the bucket (with -bucket)
  -pubkey string
    	the log operator's public key (ed25519:<hex>, or a file holding it, or - for standard input, or a <(...) process substitution)
  -retention duration
    	the retention the anchor was configured with: a bucket retention shorter than this (and, for s3, an object retained for less from its own write) is a finding; without it only the 24 h minimum is checked. A default retention in years counts as 365 days a year (7 years: 2555 days, 61320h), so pass at most that
  -run string
    	the run or trail ID
  -timeout duration
    	with -bucket: give up after this long and exit 3 (state unknown); 0: no limit (default 5m0s)

Apache-2.0 licensed.