-
Notifications
You must be signed in to change notification settings - Fork 1
Mitigate Agent Relay 11.3.0 credential output in docs and hosted skill #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d31ed54
008d3c6
d7f55c7
4333105
bba230f
ba34492
f825c45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||||||||||||||||||||||
| # Agent operating rules | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| These rules are repository law for every agent session in this checkout. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Safety and authority | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Agents have no production access. Do not use Cloudflare, Wrangler, | ||||||||||||||||||||||||||
| Vercel, DNS, or other live-infrastructure credentials, and do not run | ||||||||||||||||||||||||||
| commands that can deploy or mutate production. | ||||||||||||||||||||||||||
| - Production is reached only by a reviewed pull request through CI or by | ||||||||||||||||||||||||||
| a human running a prepared runbook. Deploys, previews, publishing, and | ||||||||||||||||||||||||||
| DNS remain gated on `cmo`. | ||||||||||||||||||||||||||
| - Main requires at least two recorded reviews. The author's own pass does | ||||||||||||||||||||||||||
| not count; at least one review must come from a different agent. | ||||||||||||||||||||||||||
| Check/status contexts such as CodeRabbit are not submitted reviews. | ||||||||||||||||||||||||||
| - Only humans cut releases. Any earlier agent release permission is void, | ||||||||||||||||||||||||||
| not paused. | ||||||||||||||||||||||||||
| - Never execute a command that prints or may print a credential in an | ||||||||||||||||||||||||||
| agent transcript. Never pass `--show-token` to `gh auth status`; that flag | ||||||||||||||||||||||||||
| deliberately exposes the credential. The bare command is not the | ||||||||||||||||||||||||||
| credential-printing hazard the old rule treated it as. Use | ||||||||||||||||||||||||||
| `env -u GITHUB_TOKEN -u GH_TOKEN /opt/homebrew/bin/gh <command>` for the | ||||||||||||||||||||||||||
| concrete GitHub operation; escalate if unmasked credential scope itself | ||||||||||||||||||||||||||
| must be inspected. | ||||||||||||||||||||||||||
|
Comment on lines
+19
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use an OS-neutral Line 22 requires Proposed fix- `env -u GITHUB_TOKEN -u GH_TOKEN /opt/homebrew/bin/gh <command>` for the
+ `env -u GITHUB_TOKEN -u GH_TOKEN gh <command>` for the📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| - Agent Relay 11.3.0 and earlier print the active workspace key from | ||||||||||||||||||||||||||
| `agent-relay node up` and `agent-relay node status`. Do not run either | ||||||||||||||||||||||||||
| command in an agent or other transcribed session. A human may run them | ||||||||||||||||||||||||||
| from a trusted, non-transcribed terminal; otherwise upgrade to Agent | ||||||||||||||||||||||||||
| Relay 11.3.1 or later, which masks the key in these two commands. That | ||||||||||||||||||||||||||
| version is not a guarantee about credential output from every command in | ||||||||||||||||||||||||||
| the installed dependency tree. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Session lifecycle | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Sessions are disposable. Recycle at assignment boundaries and do not | ||||||||||||||||||||||||||
| let a session run beyond roughly four hours. | ||||||||||||||||||||||||||
| - Check the Relay inbox at session start and once immediately before | ||||||||||||||||||||||||||
| going idle after completed work. Never poll on a timer. | ||||||||||||||||||||||||||
| - Remain registered unless explicitly instructed to terminate. Do not | ||||||||||||||||||||||||||
| self-remove. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Working discipline | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Inspect the tree before editing and preserve work that predates the | ||||||||||||||||||||||||||
| session. | ||||||||||||||||||||||||||
| - Use a fresh branch or worktree from current `origin/main`. | ||||||||||||||||||||||||||
| - Report `ACK`, progress, and `DONE` with evidence. | ||||||||||||||||||||||||||
| - Do not merge, deploy, preview, publish, cut a release, or change DNS | ||||||||||||||||||||||||||
| without the applicable human and `cmo` gates. | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: This rule is presented as repository law for every agent session, but it hardcodes the
ghbinary to/opt/homebrew/bin/gh, which only exists on Homebrew-installed Apple-Silicon macOS. Agents running on Linux, Intel macOS (/usr/local/bin/gh), or CI would find no executable there and the mandated command would fail. Consider locating gh portably (e.g.command -v gh) so the credential-safe invocation works regardless of the checkout's host.Prompt for AI agents