A script asks for the operator's token instead of taking one in a command line #122

Merged
tepichord merged 1 commit from docs/agents-token-prompts into main 2026-10-22 13:59:51 -07:00
Owner

Two rounds of a Vault root token failing as the same 403, and both were the instruction rather than the operator: a command line carrying VAULT_TOKEN=PASTE_ROOT_TOKEN_HERE was pasted as written, and the read -rs VAR alternative was answered by the newline the paste had already sent, so the script proceeded with an empty value. Both arrive at Vault as "permission denied / invalid token", which reads like a wrong token and is four different fixes.

AGENTS.md gains the rule: prompt on /dev/tty when the variable is unset, reject an empty or placeholder-looking value by name, check the token shape and vault token lookup before any privileged call, and report which failure it hit plus "nothing was written". No placeholder in a command line, and no read from stdin for a secret.

Two rounds of a Vault root token failing as the same `403`, and both were the instruction rather than the operator: a command line carrying `VAULT_TOKEN=PASTE_ROOT_TOKEN_HERE` was pasted as written, and the `read -rs VAR` alternative was answered by the newline the paste had already sent, so the script proceeded with an empty value. Both arrive at Vault as "permission denied / invalid token", which reads like a wrong token and is four different fixes. `AGENTS.md` gains the rule: prompt on `/dev/tty` when the variable is unset, reject an empty or placeholder-looking value by name, check the token shape and `vault token lookup` before any privileged call, and report which failure it hit plus "nothing was written". No placeholder in a command line, and no `read` from stdin for a secret.
docs(agents): a script asks for the operator's token, it does not take one
Some checks failed
ci/woodpecker/pr/gates Pipeline was canceled
ebe4a26d4f
Two rounds of a Vault root token failing as the same `403`, and both were
the instruction rather than the operator: a command line carrying
`VAULT_TOKEN=PASTE_ROOT_TOKEN_HERE` was pasted as written, and the
`read -rs VAR` alternative was answered by the newline the paste had
already sent, so the script proceeded with an empty value. Both arrive at
Vault as "permission denied / invalid token", which reads like a wrong
token and is four different fixes.

The rule now says what the script has to do: prompt on `/dev/tty` when
the variable is unset, reject an empty or placeholder-looking value by
name, check the token's shape and `vault token lookup` before any
privileged call, and report which failure it hit plus "nothing was
written". No placeholder in a command line, and no `read` from stdin for
a secret.
tepichord force-pushed docs/agents-token-prompts from ebe4a26d4f
Some checks failed
ci/woodpecker/pr/gates Pipeline was canceled
to 88c6c09f2a
All checks were successful
ci/woodpecker/pr/gates Pipeline was successful
ci/woodpecker/pull_request_closed/cleanup Pipeline was successful
2026-10-22 13:19:53 -07:00
Compare
tepichord deleted branch docs/agents-token-prompts 2026-10-22 13:59:51 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tepichord/milner!122
No description provided.