Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Shopify Engineering 15 min read Case study mediumAdept

The Engineering Story Behind Flex Comp

Shopify built Flex Comp, a system letting employees split total compensation between base salary, RSUs and stock options, under tight deadlines and strict privacy constraints. Access was restricted with a separate GitHub team inside the Shopify org. Sensitive Kafka event payloads were RSA-encrypted (4096-bit, or 6144-bit for larger payloads) so the existing eventing platform could carry them, with only the data team able to decrypt. In hindsight the team recommends hybrid encryption (symmetric payload key wrapped asymmetrically) and adding domain timestamps to payloads. On the front end, early API contracts, a single React Context for API data, and useReducer for interdependent slider state allowed parallel work and fast iteration.

Related posts

  • Workflow SDK 5: built for production

    Vercel mediumAdept

    Workflow SDK 5 reworks Vercel's durable async JavaScript workflow engine around security, regional placement and performance. Step payloads are now encrypted end to end with AES-256-GCM using per-run keys. On self-hosted Worlds, encryption works through a getEncryptionKeyForRun() hook. Runs are pinned to a home region chosen at start(). The engine executes multiple steps inline instead of taking a queue hop per step, replays incrementally, and streams over WebSockets. Benchmarks against v4 show p75 step-to-step overhead dropping from 618 ms to 109 ms, late-run overhead in a 1,020-step workflow falling from 1,748 ms to 70 ms, and stream delivery time improving 4.2×.

  • Why and how GitHub encrypts sensitive database columns using ActiveRecord::Encryption

    GitHub Engineering mediumAdept

    GitHub replaced its internal Encrypted Attributes library with Rails' ActiveRecord::Encryption so developers can encrypt a sensitive column with a single familiar `encrypts` call, without hand-provisioning a key per column. The customizations are a custom key provider that pulls a single primary key from HashiCorp Vault and derives per-column keys with a KDF. The salt is table_attribute, and the current year goes in the info parameter so keys rotate yearly and limit AES-256-GCM nonce-reuse risk. An overridden `encrypts` helper makes this provider the default, and compression is disabled by default because compressing before encryption leaks plaintext entropy.

  • Coding Agent Horror Stories: The 29 Million Secret Problem

    Docker mediumAdept

    The s1ngularity supply-chain attack on the Nx npm package used a post-install script to find installed AI coding CLIs (Claude Code, Gemini CLI, Amazon Q) and invoke them with permission-bypass flags like --dangerously-skip-permissions, prompting the agent to inventory secrets across the home directory before exfiltrating them to public repos under the victim's GitHub account. GitGuardian counted 2,349 stolen secrets across 1,079 repos and also found AI-assisted code leaks secrets at about twice the GitHub baseline. Docker Sandboxes is pitched as the mitigation: agents run in microVMs that see only the project workspace, and credentials stay in the host keychain and are injected by a proxy at the network boundary, so the agent only ever holds a placeholder.

  • How We Built Slack AI To Be Secure and Private

    Slack Engineering easyNovice

    Slack AI was designed around four principles: customer data never leaves Slack's trust boundary, no LLM training on customer data, the AI only sees what the requesting user can see, and all existing compliance controls still apply. Closed-source foundation models run in an AWS-hosted escrow VPC so the model provider never gets customer data. Stateless RAG over off-the-shelf models replaces fine-tuning, which raises the need for large context windows at low latency. Retrieval reuses the user's ACLs and existing fetch libraries, outputs are ephemeral where possible, and derived summaries are invalidated when source messages are tombstoned by DLP.

  • BuildRock: A Build Platform at Slack

    Slack Engineering mediumAdept

    Slack consolidated its sprawling, hand-managed "snowflake" Jenkins clusters into BuildRock, a build-as-a-service platform. Jenkins controllers run statelessly on Kubernetes, configured through the Configuration-as-Code (casc) plugin and Jinja2 templates, and every change flows through GitOps, so a cluster can be rebuilt identically from Git. State such as build history lives on EFS with automated backups, plugins come from central storage, vulnerability scanning runs on every build, and test and pre-staging clusters catch problems before production. Rollout was incremental: controllers moved to Kubernetes before agents, with static EC2 agents alongside ephemeral pods, and old clusters were kept on standby for fast rollback under a shared ownership model with service teams.

The quest for software engineering knowledge.

Look:
Layout: