guardry/

guardry/For AI agents/CI and runners

Use Guardry Secrets in CI and unattended runners

Give each CI job or unattended runner its own Guardry credential and inject secrets into the job with guardry secrets run.

A CI job or an unattended runner can get the secrets it needs from your Guardry vault when it runs. The runner holds one Guardry credential with a scope and a lifetime, in place of a separate copy of every key, and every value it reads is recorded in the audit log. Setup is one credential, two environment variables and one command in the job.

1. Create a credential for the runner

In the dashboard, open Agent access and choose Connect agent. Use a separate credential for each runner. Choose one environment where that is enough, read-only access unless the job must create entries, and a workload lifetime: 7 days or 30 days. The credential is shown once. If you have no account yet, Request an invite first.

2. Install the CLI on the runner

curl -fsSL https://app.guardry.ai/install.sh | sh

The installer verifies a signed release manifest before installing. It installs the CLI in ~/.local/bin and needs no administrator privileges. If the shell cannot find guardry, add this line:

export PATH="$HOME/.local/bin:$PATH"

3. Give the runner the credential

Set GUARDRY_URL and one of the two token variables in the runner's environment.

VariableValue
GUARDRY_URLhttps://app.guardry.ai
GUARDRY_TOKENThe agent credential, as a protected variable
GUARDRY_TOKEN_FILEA private file that holds the credential, used in place of GUARDRY_TOKEN
GUARDRY_PROFILESelects a saved profile, on a runner where you signed in with guardry login

The runner still holds one bootstrap credential. Protect it with your CI platform's own protected-variable feature. Never put it in source code, a command argument or a chat.

4. Run the job with secrets

guardry secrets run --secret API_KEY --secret DATABASE_URL -- python agent.py

guardry secrets run starts your program with the named values in its environment. Nothing is written to disk and the CLI does not cache secret values.

An organization-wide credential must name the project and environment for each read. For example, with a saved profile:

guardry --profile organization-reader --project billing --environment production secrets run --secret API_KEY -- python agent.py

What the agent can and cannot do

  • A runner's credential can read only what its scope and permissions allow.
  • It can create new entries if you gave it that permission. It can never edit, rotate or delete an existing entry, including one it created.
  • It cannot see members, manage credentials or approve anything.
  • You can revoke it at any moment. Revocation applies to future requests. A value the job already received stays with it.
  • A job that runs with unrestricted access to the whole OS account cannot be isolated from the other credentials that account holds.

Questions

Does the program in my job see the Guardry credential?

The CLI removes GUARDRY_* variables from the environment of the program it runs, so the program gets the entries you named with --secret and not GUARDRY_TOKEN. The credential is still on the runner, which is why it belongs in a protected variable.

What happens when the credential expires?

Every agent credential has a lifetime, and it stops working when that lifetime ends. An owner or administrator can renew it under Agent access, and the credential already on the runner works again. To replace it instead, rotate it and update the protected variable on the runner.

Can one credential serve several environments?

Yes. An organization-wide credential covers every current and future environment in the organization. Each read must then say which one, with --project and --environment. Use a credential for one environment where one is enough.