Repository navigation
Conversation
Adds c1i decoys list/get/search/create/update/rotate/delete for managing decoy credentials (honeytokens). create takes exactly one selector flag (user-client-credential-user-id, access-token-subject-user-id, connector-client, or workload-fed-provider-id+condition) or a complete --body-file. create/rotate print the vended secret material under .material exactly once; it is never logged and cannot be retrieved again. update's --annotation key=value follows the server's per-key PATCH semantics. Wires into the shared mutation table, dry-run parity, user-ref check, and flag-doc coverage test suites. Fixes #298
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds a first-class
c1i decoyscommand group:list,get,search,create,update,rotate,delete, covering/api/v1/decoys,/api/v1/decoys/search,/api/v1/decoys/{id}and/api/v1/decoys/{id}/rotate.createtakes exactly one decoy type:--user-client-credential-user-id,--access-token-subject-user-id[+--access-token-expires],--connector-client, or--workload-fed-provider-id+--workload-fed-condition. It also accepts a verbatim--body-file. User ids are checked to exist before sending.createandrotateprint the one-time credential under.materialexactly once. It is never logged, and the help states it cannot be retrieved again.update --annotation key=valuefollows the server's per-key PATCH semantics.Why
Planting and managing decoys required raw
c1i apicalls (observed while building a Decoys demo on 2026-11-23).Bead: global-w291.5
Fixes #298
Verification
go build ./...,go vet ./...,gofmt -l .,go mod tidy(no diff): cleangolangci-lint run(v2.15.0): 0 issues;gosec: cleango test -p 1 -parallel 1 ./...: all packages pass. A parallel run on the shared dev host hit pre-existing ephemeral-port-exhaustion failures that reproduce identically on bare origin/main; they are unrelated to this change.go test ./cmd -run Decoysand the shared mutation-table, dry-run-parity, user-ref and flag-docs suites pass. The decoys commands are wired into those cross-command suites.Limitation: the generic dry-run preview row uses the workload-federation variant. The existing
redact.IsSecretKeyrule masks theuserClientCredentialandaccessTokenfield names in--dry-runpreviews. This is pre-existing over-redaction: those objects hold ids, not secrets. Real requests are unaffected and covered indecoys_cmd_test.go.