AGENTS.md: a token on a curl command line is world-readable
Checking whether a download was still running with pgrep -a curl printed the whole argv, Authorization header included, into the session transcript. The token is not in the repo and nothing was committed, but the practice is wrong: secrets belong in a -K config file or the environment, not in argv, and no pgrep -a should ever target a command carrying an auth header.
This commit is contained in:
1 parent
f917a2ef55
commit
a04a2c27a9
1 file changed
+7
@@ -156,6 +156,13 @@ See `serverAppConfigs-docs/Architecture/Testing Policy.md`.
|
|||||||
credentials).
|
credentials).
|
||||||
- Do not document passwords anywhere in the repo. SSH keys are the auth
|
- Do not document passwords anywhere in the repo. SSH keys are the auth
|
||||||
mechanism; `FRANK_SUDO_PW` covers headless sudo and never enters the repo.
|
mechanism; `FRANK_SUDO_PW` covers headless sudo and never enters the repo.
|
||||||
|
- **A token passed as `curl -H "Authorization: Bearer …"` is world-readable.**
|
||||||
|
It lands in `/proc/<pid>/cmdline`, so any `ps`/`pgrep -a` on the host prints
|
||||||
|
it — that leaked an HF token into a session transcript on 2026-09-16, while
|
||||||
|
merely checking whether a download was still running. Pass secrets out of
|
||||||
|
band (`curl -K <mode-600 file>` carrying the header, or `HF_TOKEN` in the
|
||||||
|
environment for `hf`/`hf_transfer`) and never `pgrep -a` a fetch command that
|
||||||
|
carries an auth header.
|
||||||
|
|
||||||
## External Exposure Policy (MANDATORY)
|
## External Exposure Policy (MANDATORY)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user