1Password and Secrets Hygiene for Developers interview questions

27 questions from the 1Password and Secrets Hygiene for Developers course, each with the correct answer and an explanation. Try to answer before you open the answer.

Why Secrets Need Hygiene

1. Which of these is a secret?

  1. The app's display name
  2. A cloud API access token
  3. The HTTP port number
  4. The log level
Show answer

Answer: A cloud API access token

A token grants access to a service. Names, ports and log levels do not.

Lesson: What Counts as a Secret

2. A key was committed and then deleted in the next commit. What should you do?

  1. Nothing, it is gone
  2. Wait to see whether anyone notices
  3. Rotate the key, because history still contains it
  4. Rename the repository
Show answer

Answer: Rotate the key, because history still contains it

Old commits keep the value. Treat the key as compromised and replace it.

Lesson: How Secrets Leak

3. Which practice best limits the damage of a leaked key?

  1. One admin key shared with the whole team
  2. Giving the key narrow permissions and an expiry
  3. Using the same key in every environment
  4. Storing the key in the README
Show answer

Answer: Giving the key narrow permissions and an expiry

Narrow scope and short life reduce what an attacker can do and for how long.

Lesson: A Simple Threat Model

How a Password Manager Works

4. What is the Secret Key in 1Password?

  1. Your email address
  2. A random value that works with the master password to unlock the account
  3. A password for Wi-Fi
  4. A backup of every item in plain text
Show answer

Answer: A random value that works with the master password to unlock the account

It is added to the master password so a stolen database cannot be cracked by guessing the password alone.

Lesson: How 1Password Protects You

5. What does `op://Dev/Database/password` point to?

  1. The password field of the item "Database" in vault "Dev"
  2. A website URL
  3. A Git branch
  4. A local file path
Show answer

Answer: The password field of the item "Database" in vault "Dev"

The format is vault, then item, then field.

Lesson: Vaults, Items and Fields

6. Why is reusing a password across sites dangerous?

  1. Sites slow down
  2. A breach on one site exposes your other accounts
  3. Browsers forbid it
  4. It uses more storage
Show answer

Answer: A breach on one site exposes your other accounts

Attackers replay leaked credentials on other services, so every account needs its own password.

Lesson: Strong, Unique Passwords

Two-Factor Authentication and Passkeys

7. Why is SMS the weakest second factor?

  1. It needs the internet
  2. It never works abroad
  3. Codes expire in a year
  4. Numbers can be hijacked by SIM swapping
Show answer

Answer: Numbers can be hijacked by SIM swapping

An attacker who takes over your number receives your codes. App-based or hardware factors avoid that.

Lesson: One-Time Codes (TOTP)

8. What is stored on the website when you use a passkey?

  1. Your private key
  2. Your public key
  3. Your master password
  4. A copy of your fingerprint
Show answer

Answer: Your public key

Only the public key is stored. The private key stays on your device or in your manager.

Lesson: Passkeys

9. Your manager will not autofill on a site that looks like your bank. What is the safest reading?

  1. The manager is broken, type the password by hand
  2. The domain may not be the real one, so check it
  3. The bank changed its logo
  4. Your internet is slow
Show answer

Answer: The domain may not be the real one, so check it

Autofill is tied to the saved domain, so a mismatch is a signal worth investigating.

Lesson: Spotting Phishing

10. Which is the best response to an urgent email asking you to "verify your account" via a link?

  1. Click quickly before it expires
  2. Forward it to colleagues
  3. Open the site yourself from a saved bookmark
  4. Reply with your password
Show answer

Answer: Open the site yourself from a saved bookmark

Go to the service directly instead of through the message, and report the email.

Lesson: Spotting Phishing

Sharing Secrets with a Team

11. What is the safest way to give a teammate the production database password?

  1. Paste it in the team chat
  2. Email it with the subject "password"
  3. Share the vault that holds it
  4. Write it on a sticky note
Show answer

Answer: Share the vault that holds it

Sharing the vault keeps one source of truth and lets you revoke access later.

Lesson: Shared Vaults and Groups

12. Which setup follows least privilege?

  1. Everyone can manage every vault
  2. Developers get read-only on staging; production is limited to SRE
  3. One shared admin login
  4. Access is never reviewed
Show answer

Answer: Developers get read-only on staging; production is limited to SRE

Each group has only the access its work requires.

Lesson: Least Privilege for Vault Access

13. A developer with production vault access has left. What else should you do besides removing access?

  1. Nothing more
  2. Rotate the production secrets they could read
  3. Rename the vault
  4. Delete the audit log
Show answer

Answer: Rotate the production secrets they could read

They may have copied values, so rotation closes that gap.

Lesson: Offboarding and Revocation

The 1Password CLI (op)

14. What is the recommended way to sign in to op on your own laptop?

  1. Type the master password in every script
  2. Commit a token to the repo
  3. Email yourself the Secret Key
  4. Desktop app integration with biometric approval
Show answer

Answer: Desktop app integration with biometric approval

It keeps the master password out of the terminal and files.

Lesson: Install and Sign In

15. What does `op run --env-file=.env.1p -- npm start` do?

  1. Uploads .env.1p to GitHub
  2. Resolves op:// references and starts the app with real values in its environment
  3. Deletes the vault
  4. Prints all secrets to the terminal
Show answer

Answer: Resolves op:// references and starts the app with real values in its environment

The values exist only in the child process environment while it runs.

Lesson: op read and op run

16. Which file should be committed to Git?

  1. config.yml with real passwords
  2. The generated output of op inject
  3. config.yml.tpl with op:// placeholders
  4. A screenshot of the vault
Show answer

Answer: config.yml.tpl with op:// placeholders

The template contains only references, so it is safe to share.

Lesson: op inject and Templates

Secrets in the Developer Workflow

17. What should be committed for environment configuration?

  1. .env with real values
  2. .env.example with placeholder values
  3. Nothing, ever, not even names
  4. A zip of .env
Show answer

Answer: .env.example with placeholder values

The example documents what to set without exposing real secrets.

Lesson: .env Files Done Right

18. Which part of an SSH key pair may you share freely?

  1. The private key
  2. Both parts
  3. Neither
  4. The public key
Show answer

Answer: The public key

The public key only verifies; the private key proves identity and must stay secret.

Lesson: SSH Keys and Commit Signing

19. What should a CI pipeline authenticate with?

  1. A developer's personal login
  2. A scoped service account
  3. The master password
  4. No authentication
Show answer

Answer: A scoped service account

A service account can be limited and revoked without affecting any person.

Lesson: Secrets in CI/CD

Preventing and Responding to Leaks

20. What does push protection do?

  1. Encrypts your repository
  2. Blocks a push that contains a detected secret
  3. Deletes old branches
  4. Speeds up git clone
Show answer

Answer: Blocks a push that contains a detected secret

It checks the pushed content for known secret patterns and rejects the push before it lands.

Lesson: Scanning Before You Push

21. You find an API key pushed to a public repo. What is the first action?

  1. Rewrite Git history
  2. Delete the repository
  3. Revoke or rotate the key
  4. Post about it in chat
Show answer

Answer: Revoke or rotate the key

Until the key is revoked, anyone who copied it can still use it.

Lesson: Responding to a Leak

22. Why must the secret still be rotated after cleaning history?

  1. Cleaning always fails
  2. Copies may exist in forks, clones and caches
  3. Git requires it
  4. The secret expires by itself
Show answer

Answer: Copies may exist in forks, clones and caches

You cannot recall every copy, so only revocation makes the old value useless.

Lesson: Cleaning Git History

Rotation, Policy and Revision

23. Why create the new key before retiring the old one?

  1. To avoid downtime while consumers switch
  2. Providers require two keys
  3. It makes keys longer
  4. It hides the rotation date
Show answer

Answer: To avoid downtime while consumers switch

Both values work during the switch, so no consumer is left with a dead key.

Lesson: Rotating Secrets Safely

24. What makes a secrets policy effective?

  1. Being 60 pages long
  2. Being short, specific and backed by automated checks
  3. Being secret from the team
  4. Never being updated
Show answer

Answer: Being short, specific and backed by automated checks

People follow simple rules, and tools catch the mistakes people miss.

Lesson: A Team Secrets Policy

25. A teammate asks for the staging API key in chat. What is the best reply?

  1. Paste it, it is only staging
  2. Add them to the staging vault with the right permission
  3. Email it
  4. Tell them to guess
Show answer

Answer: Add them to the staging vault with the right permission

Granting vault access is auditable and revocable; a pasted key is neither.

Lesson: Revision: Cheat Sheet and Self-Check

26. Which command runs an app with secrets injected only into its environment?

  1. op signout
  2. op vault list
  3. git filter-repo
  4. op run --env-file=.env.1p -- <command>
Show answer

Answer: op run --env-file=.env.1p -- <command>

`op run` resolves references for that process without writing a plaintext file.

Lesson: Revision: Cheat Sheet and Self-Check

27. What is the correct order after a key leaks publicly?

  1. Clean history, then think about the key
  2. Revoke or rotate, redeploy, check logs, then clean up
  3. Delete the repo, then forget it
  4. Wait one week
Show answer

Answer: Revoke or rotate, redeploy, check logs, then clean up

Stopping misuse comes first; cleanup is secondary.

Lesson: Revision: Cheat Sheet and Self-Check

← Back to the course