Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Vault-Associate Exam - Topic 7 Question 56 Discussion

Posted by Chantell on Jun 22, 2026 at 08:18 PM

Security requirements demand that no secrets appear in the shell history. Which command does not meet this requirement?

Suggested Answer: B

The command that does not meet the security requirement of not having secrets appear in the shell history is B. vault kv put secret/password value-itsasecret. This command would store the secret value ''itsasecret'' in the key/value secrets engine at the path secret/password, but it would also expose the secret value in the shell history, which could be accessed by other users or malicious actors. This is not a secure way of storing secrets in Vault.

The other commands are more secure ways of storing secrets in Vault without revealing them in the shell history. A. generate-password | vault kv put secret/password value would use a pipe to pass the output of the generate-password command, which could be a script or a tool that generates a random password, to the vault kv put command, which would store the password in the key/value secrets engine at the path secret/password. The password would not be visible in the shell history, only the commands. C. vault kv put secret/password value=@data.txt would use the @ syntax to read the secret value from a file named data.txt, which could be encrypted or protected by file permissions, and store it in the key/value secrets engine at the path secret/password. The file name would be visible in the shell history, but not the secret value. D. vault kv put secret/password value-SSECRET_VALUE would use the -S syntax to read the secret value from the environment variable SECRET_VALUE, which could be set and unset in the shell session, and store it in the key/value secrets engine at the path secret/password. The environment variable name would be visible in the shell history, but not the secret value.


[Write Secrets | Vault | HashiCorp Developer]

Get Premium Vault-Associate Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
18 comments · newest first
JI
Jill 1 month ago
I feel confident about this question.
RO
Rosio 2 months ago
Definitely, it hides the value.
QU
Quentin 2 months ago
Right, option C is safer.
JI
Jill 2 months ago
A good practice is to use files instead.
RO
Rosio 2 months ago
Exactly, we need to avoid that.
QU
Quentin 2 months ago
Shell history will expose it.
JI
Jill 2 months ago
I agree, it’s not secure at all.
RO
Rosio 3 months ago
Yeah, it shows the secret directly.
QU
Quentin 3 months ago
I think option B is the one.
YO
Yong 3 months ago
I’m surprised this is even a question, it seems obvious!
WA
Wayne 3 months ago
Option A is safe too, right? No secrets in the command line.
HO
Horace 3 months ago
Wait, are you sure about that? What about option D?
NO
Noah 3 months ago
Yeah, I agree, that one’s a no-go for security!
RE
Reita 4 months ago
I think option B shows the secret directly in the command.
JU
Junita 4 months ago
I’m confused, but I think B is the safest since it doesn’t seem to expose anything in the command line directly.
LI
Lina 4 months ago
I practiced a similar question, and I feel like D could be problematic because it looks like it directly includes a secret value.
IL
Iluminada 4 months ago
I'm not entirely sure, but I remember something about how using a file with the '@' symbol could be safer, so maybe C is okay?
PA
Paulina 4 months ago
I think option A might be the one that shows up in shell history since it uses a pipe.
0/2000 characters

Save Cancel