Skip to content

Security & secrets: Access & secrets

Security & secrets commands for access & secrets (tags: #access #secrets #ssh).

Index
3 items

Trivy1

Trivy: Scan a repo for secrets and misconfigurations

Safe

Dependencies, hard-coded secrets and IaC misconfigurations in a directory.

trivy fs --scanners vuln,secret,misconfig <path>
What each part does
  1. trivy fsscan a local directory
  2. --scanners vuln,secret,misconfigdependency CVEs, hard-coded secrets, and IaC / Dockerfile misconfigurations
  3. <path>the directory, e.g. .

Also known as: leaked secret · secret scanning

Vault2

Vault: Log in with OIDC

Safe

Browser-based SSO login; stores a token in ~/.vault-token.

vault login -method=oidc role=<role>
What each part does
  1. vault loginauthenticate and store a token in ~/.vault-token
  2. -method=oidcsign in through the browser with your SSO provider
  3. role=<role>the OIDC role configured in Vault (decides your policies)

Also known as: vault login · permission denied vault

Vault: Read a KV secret

Caution

Read the latest version of a KV v2 secret. Add -field=<key> for a single value.

vault kv get -mount=<mount> <path>
What each part does
  1. vault kv getread a secret from a KV engine (v1 or v2)
  2. -mount=<mount>where the engine is mounted, e.g. secret
  3. <path>path inside the mount, e.g. myapp/db; add -field=password for one value

Also known as: vault kv · read secret

My DevOps Playbook by Angelo John Calleja

New runbook

GitHub not connected

Saving is handled by the site: the GitHub token is stored in Cloudflare, not in your browser. Enter the editor password (the EDITOR_PASSWORD secret) to unlock saving in this browser.

Saving commits to gelogrammer/My_DevOps_Playbook. Create a fine-grained token with access to only this repo andContents: Read and write, then paste it here. It is stored only in this browser.

src/content/docs/…