Secrets people keep

A password or key a run asks for when a step needs it, uses, and keeps nowhere.


Some secrets should never be stored, by Peractor or anyone: a production password, the passphrase of a signing key, a database's root credential, the password that unlocks a vault. An asked secret lives with the people who know it. The workflow names it, the run asks for it when a step needs it, the step uses it, and it is gone.

Naming one

Only a command or check step can have secrets. No agent step is ever given one.

- type: command
  name: Sign the release
  run: ./scripts/sign.sh
  secrets:
    - name: SIGNING_PASSPHRASE
      label: Release signing passphrase
    - name: PROD_DB_URL
      as: file          # the step reads $PROD_DB_URL_FILE
      expires: 10m
FieldWhat it does
nameThe environment variable the step sees. Capitals, digits and _; not one the run already sets (PATH, HOME, GIT_*, PERACTOR_*…), and not the name of one of your organization's secrets.
labelWhat the run's card calls it.
asenv (the default), or file: a file only the step can read, at $NAME_FILE, there only while each command runs. Or stdin, piped to the step's command; one per step.
expiresHow long the run waits for it, 30 minutes unless you say. Nobody gives it in time and the step fails: "Nobody gave SIGNING_PASSPHRASE in 30m".
notifyMore people or groups to tell, on top of those the run already tells. Telling someone is not who may give it.
sourcemachine: the paired machine running the step reads it itself (below).

The value is asked when the step starts and wiped when it ends. Two steps that need the same password ask twice. A phase's gates come before it: nobody is asked for a password for work that may still be turned down, and giving one approves nothing.

Giving one

The run waits with Waiting on a secret on the step's card, and the people it notifies are told, with a link and nothing else. Anyone who can see the run can give it: roles don't decide, knowing the value does, and who gave it is recorded in the audit log. Type it in the card on the web, the desktop app, the iPhone, the iPad, the Mac or Android, or from a terminal:

peractor run secret <run id> --name SIGNING_PASSPHRASE
op read op://Ops/signing/passphrase | peractor run secret <run id>

The apps can remember a value on this device, behind Face ID, Touch ID or the fingerprint, for that organization, project and name only; the next ask is one touch. Settings lists what a device remembers, and each one can be forgotten. On the web the card says the app is the safer place to type a secret: a browser runs whatever page the host serves, and a signed app does not.

Where it goes

Your device seals the value to a key the runner made for that one ask, and the host only passes the sealed bytes on. It keeps who gave it and when, never the value. The runner opens it, hands it to that step alone, and replaces it with [secret NAME] in everything the step prints, in base64, hex and URL encoding too. A step that leaves it in a file it changed fails, and nothing it did is pushed. When the step ends, what it left running is stopped and the value is wiped.

The hiding is a safety net. A command that holds the value could encrypt it before printing it, and a very short value can blank out ordinary words. Give secrets only to steps you have read.

On your own machine

A step on a machine you paired is sealed for that machine alone, and the card says so. The machine signs each ask's key, and every app remembers each machine's identity: if it changes, nothing can be given until somebody checks why.

With source: machine nobody is asked. The machine reads the value from its owner's own store, named in ~/.peractor/runner/asked-secrets.yaml, and asks the owner first:

PROD_DEPLOY_PASSWORD: keychain:peractor/prod-deploy   # macOS Keychain
PROD_DB_URL: op://Ops/prod-db/url                     # 1Password
SIGNING_PASS:
  from: env:SIGNING_PASS
  confirm: never

Only names in that file can be read, so a workflow can't make a laptop read any Keychain item it likes. A machine lent by another organization never reads one.

Keys that never leave your computer

For an SSH key, the safest thing is not to send it at all. A step can name a key its ssh commands sign with:

- type: command
  name: Deploy to prod
  run: ssh deploy@prod ./release.sh
  keys:
    - name: prod-ssh
      kind: ssh-agent
      label: Production deploy key

The run waits with Waiting on a key. Whoever has a key the server accepts offers it from the Peractor Mac app, which reaches the ssh-agent macOS runs for you, or from a terminal, which reaches whatever agent SSH_AUTH_SOCK names: Secretive, 1Password, or the system's own.

peractor run key <run id>

The step's SSH_AUTH_SOCK then answers from your agent. Each signature it needs is sealed to your computer and passed through the host, which can read none of it. You approve each one, and you see which server it is for: "Sign in to prod.example.com as deploy?". Only the signature goes back. The private key never leaves your agent. Offering it, you can approve every signature for the step at once instead.

Your computer checks each request first. It refuses a signature for any other key, and it refuses a server whose host key didn't sign the session it named. It names the server from your own known_hosts. Keep the terminal or the app open until the step ends: if it stops answering, ssh fails from then on, and the run says your computer went offline. A step names one key, and the socket exists only while its command runs.

From the API

GET /api/v1/runs/:id lists the open asks under secretAsks, and POST /api/v1/runs/:id/secrets/:askId gives one, sealed — use sealAskedSecret or giveSecret from @peractor/client, so the value never leaves your process unsealed. A key ask has kind: "ssh-agent": offer it with offerKey, then poll GET /api/v1/runs/:id/secrets/:askId/requests and answer each with POST …/replies, or keyRequests and replyKey. See the API. MCP and the assistant can say a run is waiting on a secret or a key, but never give one.