Skip to content

Malware stole an engineer’s session, then customers’ CI secrets

Malware on an engineer’s laptop stole a signed-in session. The attacker used it to take customers’ stored secrets on 22 December 2022.2

Customers’ environment variables, tokens and keys taken; every customer told to rotate all stored secrets.2

Get 30 minutes free every day, forever.3SOC 2 Type II499.9% uptime SLA on Pro4
CircleCIJanuary 2023Refused

45 of 50

Stopped Limited: the payment went out through the bank’s own system This case: CircleCI. The gate refuses it.

What happened

A stolen session let an attacker act as a CircleCI engineer.

  1. The laptop. Malware not caught by antivirus stole an engineer’s single sign-on session, one backed by two-factor authentication.

  2. 22 December 2022. Acting as the engineer, the attacker took customers’ secrets, along with encryption keys from a running process.

  3. Afterwards. CircleCI told every customer to rotate all the secrets stored with it.2

How the gate handles it

With the sealed gate, the use of a taken secret would have been refused.

The CI service would have held only SealedBox keys, which work only through the gate, and one stop ends them all. Press Play to watch a call like it.5

A CI secret used from outside the runner after a breachSample6
  1. requestPOST /s/aws/ sts:GetCallerIdentityfrom: outside_runnerRefused403standin_bound_elsewhere
  2. requestPOST /s/github/repos/acme/api/git/refsafter: stopStopped423

RefusedA CI secret used off its runner is refused, and one stop ends every key.

How easy

A CI team could refuse any key used off its runners in three steps.

Sample
Seal a keyaws
AWS key for CI
Paste the AWS key from your CI settings
Your CI settings hold only the SealedBox key.
CI rulesaws
Deploy calls
Any other call
Only from your runnersa copy used anywhere else is refused
One stop ends every key, with no rotation at each provider.
Where approvals goAsk first
Slack
Microsoft Teams
Telegram
Email
A person approves or denies each call that asks first.

Approvals and signed records come with Pro, Gate only and Custom. On Free, a rule that asks first refuses instead.7

In code

Or in four lines of code.

The same three steps, from the terminal.

Sample
What each line does
1Seal the keysealedbox keys sealCI holds sbk_live_7Gy2…n4.
2Set the rulessealedbox rules addDeploys allowed, only from your runners.
3Connect approvalssealedbox approvals connectAsk-first calls go to #ci.
Try it

Put the gate in front of your agent today.

Run three practice calls in five minutes, then check their records on your own computer. Test mode, on every plan.

Start free$ sealedbox try5-minute practice run9
Scope

What the gate doesn’t change, and three failures like this one.

Related cases
Answers11

Questions about this case and the gate.

Still have a question?Book a callAll questions
What would the attacker have taken from the CI service?

SealedBox keys, with no secret in them. The real keys open only inside the gate, for calls your rules allow.

Could a taken key work from the attacker’s own machine?

Not with a source-address allowlist set to your runners. Without one, it works only through the gate, under your rules, until you stop it.

Would we still rotate every secret?

No. One stop ends them all on their next call, with no rotation at each provider.

What about the encryption keys taken from a running process?

Those sat in CircleCI’s own systems, outside any gate. A key sealed with SealedBox opens only inside the gate’s chip, one call at a time.

Can a CI call ask a person first?

Yes, on Pro, Gate only and Custom, in Slack, Microsoft Teams, Telegram or email. On Free, a rule that asks first refuses instead.

What changes in our CI setup?

Two settings: the SealedBox key where the library expects its key, and the gate’s base address.