Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions agents/gecko-triage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ flowchart TD
The agent never holds a Bugzilla key and never writes. It records actions; hackbot-api
applies them as `hackbot@mozilla.tld` and tags every comment `gecko-triage`.

| Mode | Model auth | Bugzilla key |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Cloud Run job | Workload Identity Federation, with no Anthropic API key. The deploy sets the `ANTHROPIC_FEDERATION_RULE_ID` and the other ids, and the runtime writes the token file (`libs/hackbot-runtime/hackbot_runtime/anthropic_wif.py`). | A shared broker secret from Secret Manager. The Hackbot deploy in mozilla/webservices-infra sets it. Only the broker holds it. |
| Local, Docker | `ANTHROPIC_API_KEY` in the root `.env` | `BUGZILLA_API_KEY` in the root `.env`, given to the broker only |
| Local, host | `ANTHROPIC_API_KEY` when the shell sets it, else the Claude Code login | `BUGZILLA_API_KEY` in the broker's terminal |
| Mode | Model auth | Bugzilla key |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Cloud Run job | Workload Identity Federation, with no Anthropic API key. The deploy sets the `ANTHROPIC_FEDERATION_RULE_ID` and the other ids, and the runtime writes the token file (`libs/hackbot-runtime/hackbot_runtime/wif.py`). | A shared broker secret from Secret Manager. The Hackbot deploy in mozilla/webservices-infra sets it. Only the broker holds it. |
| Local, Docker | `ANTHROPIC_API_KEY` in the root `.env` | `BUGZILLA_API_KEY` in the root `.env`, given to the broker only |
| Local, host | `ANTHROPIC_API_KEY` when the shell sets it, else the Claude Code login | `BUGZILLA_API_KEY` in the broker's terminal |

In every mode, the broker serves only read tools. The bot account reads only public bugs,
and later the Hackbot Bugzilla proxy controls which bugs a key can read. For a local run,
Expand Down
11 changes: 5 additions & 6 deletions docs/hackbot/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,16 @@ short-lived access token, so none needs a static key in the container.
The runtime fetches that token from the GCP metadata server, writes it to a private file the
SDK reads, and keeps refreshing it in the background — Google tokens outlive neither a long
run nor a single exchange, so the file has to stay fresh for the whole run
([hackbot_runtime/anthropic_wif.py](../../libs/hackbot-runtime/hackbot_runtime/anthropic_wif.py)).
([hackbot_runtime/wif.py](../../libs/hackbot-runtime/hackbot_runtime/wif.py)).

Federation is enabled by the presence of `ANTHROPIC_FEDERATION_RULE_ID`. An
`ANTHROPIC_API_KEY` set _alongside_ it is refused with an error, because the key would take
precedence and silently shadow federation.

OpenAI federation is enabled by the presence of `OPENAI_FEDERATION_RULE_ID`
([hackbot_runtime/openai_wif.py](../../libs/hackbot-runtime/hackbot_runtime/openai_wif.py)),
which exposes the token through `OPENAI_IDENTITY_TOKEN_FILE`. The token's audience defaults
to `https://api.openai.com/v1` and can be overridden with `OPENAI_WIF_AUDIENCE`. Here
WIF has precedence over an `OPENAI_API_KEY`, so a leftover key only logs a warning.
OpenAI federation is enabled by the presence of `OPENAI_FEDERATION_RULE_ID`, which exposes
the token through `OPENAI_IDENTITY_TOKEN_FILE`. The token's audience defaults to
`https://api.openai.com/v1` and can be overridden with `OPENAI_WIF_AUDIENCE`. Here WIF has
precedence over an `OPENAI_API_KEY`, so a leftover key only logs a warning.

## The signed upload policy

Expand Down
217 changes: 0 additions & 217 deletions libs/hackbot-runtime/hackbot_runtime/anthropic_wif.py

This file was deleted.

Loading