Safeguard
Security Guides•

Where do credentials hide on a developer laptop? A checklist

Shell history, Docker config, cloud CLI files, kubeconfig, pgpass and more. Use this table to find and fix the places a developer machine keeps secrets.

Safeguard Security Team
4 min read

Credentials on a developer laptop usually sit in about a dozen places: shell history, Git and Docker credential files, cloud CLI caches, kubeconfig, database password files, API client variables and exported browser captures. List them, check each against the table below, and replace long-lived values with sign-in flows that expire.

Why an inventory first

Teams often talk about secrets in repositories and forget the laptop. A laptop that signs in to Git, a registry, a cloud account, a cluster and a database holds credentials for all of them, written by tools you installed and forgot. When a laptop is lost or a developer tool is compromised, the question is always the same: what was on that machine? An inventory answers it in advance.

The checklist

PlaceWhat can be thereWhat to check
Shell historyTokens typed in commandsLeading space and history settings
PowerShell historySame, on WindowsPSReadLine filter
Git credential helperPasswords in a plain text file if store is usedCache or store
GitHub CLIToken in a credential store or a plain text fallbackgh auth login
Docker config.jsonBase64 registry loginsconfig.json
SSH keys and agentPrivate keys, forwarded agentsAgent forwarding
AWS CLI filesLong-lived access keysSSO instead of keys
Google ADCKey files or login filesADC on a laptop
kubeconfigStatic tokensCredential plugins
Database password filePlain text passwordspgpass rules
API client variablesShared values that syncLocal vs shared values
Browser capturesTokens inside HAR filesHAR export
Project filestfvars and env filesTerraform and global ignore

How to run the audit in an hour

  1. Pick one laptop, your own, and open each location in the table.
  2. Write down every credential you find, what it opens, and when it was created.
  3. Mark each one as long-lived or short-lived. Long-lived ones are your fix list.
  4. Replace what you can with a sign-in that issues temporary credentials. AWS's IAM guidance recommends temporary credentials for people, and Google calls service account keys a risk, so those two are good first targets.
  5. Revoke anything unused, and rotate anything that was ever pasted into a chat, ticket or history file.
  6. Repeat for a teammate's machine, with their consent, to see whether habits differ.

Make it stick

One audit decays within months. Put the checklist into your onboarding document, so a new laptop starts clean. Add a short note on which tools give you a sign-in flow and which still need a stored token. Review the list when you adopt a new tool, since every new CLI adds another place a credential can land. Track one simple number, how many long-lived credentials remain on laptops, and watch it fall.

Where Safeguard fits

Safeguard works on the dependency and code side of your software: SBOM and dependency scanning, reachability analysis and policy gates. It does not store or manage credentials, so keep using your password manager, secrets manager or cloud identity for that. You can run a free scan of a project at gold.safeguard.sh/scan.

Try it yourself

Click through the inventory and notice how listing every component makes gaps visible, the same idea as listing every place a laptop keeps a credential.

Click through it at your own pace, or open it full screen.

Quick check

Is a full disk encryption setting enough?

It protects a lost, powered off laptop. It does not protect against malware running as you or a copied backup, so reduce what is stored.

Who should run this audit?

Each developer on their own machine, with a short guide from the security team.

What should I fix first?

Long-lived keys that open production or cloud accounts, then plain text files with passwords.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.