The Simplest Way to Make Buildkite and Lastpass Work Like They Should
Teams pair buildkite and lastpass to pull stored secrets into automated build runs. This setup lets build agents fetch keys and passwords right when a job starts. Buildkite runs your test and deploy jobs on your own cloud or local servers. LastPass holds the team passwords, API keys, and tokens that those jobs need. When you link them well, engineers do not paste secrets into pipeline text files. Instead, the build agent reads the needed value from the vault during the run. Once the job finishe
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair buildkite and lastpass to pull stored secrets into automated build runs. This setup lets build agents fetch keys and passwords right when a job starts.
Buildkite runs your test and deploy jobs on your own cloud or local servers. LastPass holds the team passwords, API keys, and tokens that those jobs need. When you link them well, engineers do not paste secrets into pipeline text files. Instead, the build agent reads the needed value from the vault during the run. Once the job finishes, the agent wipes the local memory and closes the session.
How buildkite and lastpass share keys and permissions
Buildkite uses a split design where the central control plane schedules the work. Your own build agents poll that control plane and run the actual job steps. Because the agents live in your network, they can reach your secret store directly. LastPass stores items in shared folders that map to specific teams or projects.
To make this flow work, the build agent logs in to LastPass before building. The agent uses a dedicated machine account to request a specific vault item. LastPass checks the folder permissions for that account and sends back the secret. The agent then loads that value into memory for the build step to read. No secret ever travels through the cloud control plane or sits in source code.
Common failure modes and how to scope roles
Many teams take a shortcut and use one shared LastPass account for all agents. If that single account has access to every folder, any pipeline can read production keys. A bad script in a test branch could then pull database passwords without warning. Shared accounts also ruin your audit logs because every read looks the same.
Another common mistake is leaving the vault session open on the agent host. If multiple pipelines share the same machine, the next job might read old secrets. Unlogged secret reads also make it hard to trace which build used which key. You cannot fix a leak fast if you do not know what ran.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, create separate LastPass folders for each app and stage. Give your test build agents a role that only reads the test folder. Give production deploy agents a distinct role that only reads production secrets. Lock down your network paths so only trusted agent hosts can reach the vault. Always force the agent to log out and clear its state after each step.
Keeping audit logs clean across build runs
Security teams need to see who ran a build and what secrets it touched. Buildkite logs which engineer pushed the code or clicked the deploy button. LastPass logs which account opened a secret item and when that happened. When you match these two logs by time and agent name, you get clarity.
Keep your secret names clear and map them to one single service. Rotate the machine keys often so old credentials cannot open the vault later. If a build agent host gets replaced, revoke its vault access right away. Small, strict rules keep your pipeline fast while protecting your most sensitive keys.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Should Buildkite store LastPass passwords in pipeline settings?
No, you should keep actual secrets out of pipeline settings and source code. Let the build agent fetch the secret from LastPass right when the step runs.
How do we stop test pipelines from reading production secrets in LastPass?
Put production secrets in a separate LastPass folder with strict read rules. Run test jobs on separate build agents that only have access to test folders.
What happens if a build agent crashes while holding a secret?
Set up your build agents to run each job inside a clean, temporary folder. Wipe the workspace and close any open vault sessions before the next job starts.
Related guides
In this post