Safeguard Docs
Credentials Vault

Set up the vault

Open the Credentials Vault in the web app or the CLI, add your first shared credential with a handle, and check that a scan can read it.

Set up the vault

There is nothing to install. The vault is part of your Safeguard workspace, and the encryption keys are managed by Safeguard.

Before you start

  • In the web app, the vault is under Settings > Credentials Vault. Safeguard switches this page on per workspace. If you do not see it, ask your Safeguard contact or write to hi@safeguard.sh. Every member of the workspace can open it; you do not need to be an administrator.
  • In the CLI, install the Safeguard CLI and sign in with safeguard login. The safeguard vault commands work for every workspace.

If the page says "Credentials cannot be stored on this deployment yet.", the vault has no encryption key on that deployment. It refuses to store anything rather than store it unprotected. Contact Safeguard.

Add a shared credential (web app)

  1. Go to Settings > Credentials Vault and choose Shared.
  2. Choose Add a credential.
  3. Fill in Name, Type, and the Secret. Add the Username and Address if the credential is a login.
  4. In Handle for automated scans, give it a short name such as staging-login. Scans use it as sgvault://staging-login.
  5. Choose Save. The secret is encrypted before it is stored, and the list never shows it again.

To store something only you should see, choose Personal in step 1 instead. Personal entries cannot be used by scans.

Add a shared credential (CLI)

safeguard vault add --name "Staging login" --ref staging-login \
  --username qa-bot --category LOGIN

The CLI asks for the secret at a hidden prompt. To pipe it in, add --secret-stdin:

printf '%s' "$STAGING_PASSWORD" | safeguard vault add --name "Staging login" \
  --ref staging-login --username qa-bot --secret-stdin

--scope personal adds the entry to your Personal store instead. Shared is the default.

Check it

safeguard vault list
safeguard vault test staging-login

vault test reads the entry the way a scan on this machine would and prints OK or the reason it could not, never the value. The read is recorded in the entry's history as a reveal by you.

Next

On this page