Using vault credentials in scans
Point DAST, API security, host scans and CLI scans at a shared vault entry by its handle, so the scan reads the secret when it runs and nobody pastes it into a scan target.
Using vault credentials in scans
A scan field that takes a credential can take a vault reference instead of the value:
sgvault://<handle>The scan reads the current value from the vault when it runs. Changing the secret in the vault changes it for every scan that names the handle, with no scan settings to edit. The reference is what is saved with the scan, not the secret.
Only Shared entries can be used, and only entries that have a handle. Personal entries are never readable by a scan. See Concepts.
DAST and API security (web app)
- Open the target's settings and go to the sign-in or authentication section.
- Beside a credential field, such as the sign-in password, a bearer token or an API key, choose From the vault.
- Search the shared entries and pick one. If the entry has no handle yet, you are asked to give it one. The field then holds
sgvault://<handle>. - Save the target.
Type a value instead goes back to typing the secret into the field, exactly as before.
From the vault appears beside the credential fields of DAST sign-in, DAST request headers and cookies, the DAST second test account, and API security bearer tokens and API keys sent in a header. Where the vault is not available to you, the button is not shown and the form works as it always has.
Infrastructure host scans
Where infrastructure host scanning is switched on for your workspace, the host credential is always a reference, never a typed password: pick a shared entry with From the vault or type sgvault://<handle>. These scans run on a runner in your network, which reads the value at scan time.
CLI scans
These CLI flags take a vault reference in place of the value: --git-token, --git-username, --git-password, --registry-username and --registry-password.
safeguard scan --repo https://gitlab.example.internal/payments/api.git \
--git-token sgvault://gitlab-scan-token
safeguard scan --image registry.example.internal/payments/api:1.4 \
--registry-username svc_pull --registry-password sgvault://registry-pullThe CLI reads the value as the signed-in user, uses it for that scan and discards it. Your shell history holds only the reference.
What happens at scan time
- The scan reads the value just before it starts and keeps it in memory for that scan only.
- If the scan cannot read the value, it fails with the reason. It never runs with an empty credential and never sends the reference itself to your application as if it were the password.
- Logs, error messages and uploaded results have the value replaced with
[redacted]. - Each read of the secret is recorded in the entry's history: as a scan read for a Safeguard-hosted scan, and as a reveal by the signed-in person for the CLI or a runner.
Rolling out
These are not available yet. See PAM capabilities rolling out.
- Vault references for GitHub, GitLab and Bitbucket integration access tokens.
- References to a credential held in your own PAM (
pam://...), read by a runner or a Safeguard-hosted broker. - Use without reveal for sandboxes and local commands, with check-out and leases.
Choosing a key manager for a self-hosted install
Pick the key manager that protects the Credential Vault on your own Safeguard deployment: AWS KMS, Azure Key Vault, Google Cloud KMS, HashiCorp Vault Transit, a PKCS#11 HSM, or a local master-key file. Configuration, switching, and what happens when it is down.
Import from a browser or password manager
Move saved logins exported from Chrome, Edge, Brave, Arc, Opera, Firefox, Safari, 1Password, Bitwarden, LastPass or any CSV file into your Personal store with the Safeguard CLI, with a review step before anything is saved.