exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 4 question 60 discussion

Actual exam question from Microsoft's AZ-400
Question #: 60
Topic #: 4
[All AZ-400 Questions]

You plan to create a GitHub workflow that will use GitHub Actions. The actions will require a 256-KB secret.

You need to recommend a solution to store and encrypt the secret. The secret value must be accessible only to the workflow. The solution must minimize administrative effort

What should you recommend?

  • A. Store the secret in the organization-level GitHub secrets.
  • B. Store the secret in the repository-level GitHub secrets.
  • C. Encrypt the secret value and store the value in the repository. Store the decryption key in the repository-level GitHub secrets.
  • D. Encrypt the secret value and store the value in the repository. Store the decryption key in the organization-level GitHub secrets.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
manamecheff00
Highly Voted 2 years, 4 months ago
Answer is correct. https://docs.github.com/en/actions/security-guides/encrypted-secrets "To use secrets that are larger than 48 KB, you can use a workaround to store encrypted secrets in your repository and save the decryption passphrase as a secret on GitHub." Because it requires less administrative privilege it's at repository level
upvoted 18 times
warchoon
2 years, 3 months ago
D: "For secrets stored at the organization-level, you can use access policies to control which repositories can use organization secrets." "For secrets stored at the environment level, you can enable required reviewers to control access to the secrets." So the organization level has less effort. The question is about effort, not privilege.
upvoted 3 times
CaptainJameson
2 years, 2 months ago
C is correct, you need to create a repository secret, not an environment level or organization level secret. https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository
upvoted 2 times
...
...
Tyler2023
1 year, 8 months ago
Agree on this, see the following docs: https://docs.github.com/en/actions/security-guides/encrypted-secrets#limits-for-secrets https://docs.github.com/en/actions/security-guides/encrypted-secrets#storing-large-secrets
upvoted 1 times
...
...
yaguitoEC
Most Recent 5 months, 3 weeks ago
Selected Answer: B
Gemini, chatgpt and copilot all selected B. Option C involves encrypting the secret value manually and storing both the encrypted value and the decryption key in the repository-level GitHub secrets. While this approach can work, it introduces additional complexity and administrative effort
upvoted 1 times
...
ozbonny
1 year, 3 months ago
Selected Answer: C
C. Encrypt the secret value and store the value in the repository. Store the decryption key in the repository-level GitHub secrets. M
upvoted 1 times
...
ozbonny
1 year, 3 months ago
C. Encrypt the secret value and store the value in the repository. Store the decryption key in the repository-level GitHub secrets. M
upvoted 1 times
...
vsvaid
1 year, 5 months ago
Selected Answer: C
As the secret size is greater than 48 kb.
upvoted 2 times
...
ghabool
1 year, 8 months ago
I choose B because Repository-level GitHub secrets are encrypted and stored in the repository settings, and can be accessed by GitHub Actions scripts by name, much like environment variables. Repository-level GitHub secrets are accessible only to the workflow that runs on the same repository, and cannot be accessed by other workflows or users. Repository-level GitHub secrets are easy to create and manage from the repository settings panel, and do not require any additional encryption or decryption steps. Repository-level GitHub secrets are more secure and convenient than storing the secret value or the decryption key in the repository, which could expose them to unauthorized access or leakage. Repository-level GitHub secrets are more granular and specific than organization-level GitHub secrets, which apply to all repositories inside the organization and may not be suitable for every workflow.
upvoted 2 times
...
zellck
1 year, 11 months ago
Selected Answer: C
C is the answer. https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository
upvoted 2 times
...
Aravindking
1 year, 11 months ago
Selected Answer: C
The best solution to store and encrypt the secret is to encrypt the secret value and store the value in the repository. Store the decryption key in the repository-level GitHub secrets. This solution minimizes administrative effort because it only requires you to create one secret in the repository. The secret value is encrypted and stored in the repository, so it is not accessible to anyone who does not have access to the repository. The decryption key is stored in the repository-level GitHub secrets, so it is only accessible to the workflow.
upvoted 3 times
...
Mcs_
2 years ago
According to IA: B. Store the secret in the repository-level GitHub secrets. This option allows you to store sensitive information, such as access tokens, in your repository. The secrets that you create are available to use in GitHub Actions workflows and are encrypted before they reach GitHub and remain encrypted until you use them in a workflow1. This option also minimizes administrative effort because you do not need to encrypt or decrypt the secret value yourself or manage the decryption key.
upvoted 1 times
...
icedog
2 years, 1 month ago
Selected Answer: C
C. Secret is larger than 48 KB so a workaround needs to be done as per https://docs.github.com/en/actions/security-guides/encrypted-secrets#storing-large-secrets
upvoted 2 times
...
Fal991l
2 years, 1 month ago
Selected Answer: C
GPT: For an exam question, the best answer would be the one that most accurately and comprehensively addresses the requirements stated in the question. In this case, the question specifically states that the secret value must be encrypted, so the recommended solution should include encryption. Based on that, option C would be the most appropriate answer for an exam question. However, it's important to note that in real-world scenarios, the best solution may depend on various factors such as the organization's security policies, infrastructure, and workflows.
upvoted 3 times
...
col2511kol
2 years, 1 month ago
Selected Answer: B
Storing the secret in the repository-level GitHub secrets ensures that the secret is encrypted and accessible only to the GitHub Actions running in the same repository. This method also minimizes administrative effort, as secrets can be added and managed directly in the repository settings. Storing secrets at the repository level provides better access control and ensures that only workflows within the same repository can access those secrets.
upvoted 2 times
...
somenick
2 years, 3 months ago
Selected Answer: C
https://docs.github.com/en/actions/security-guides/encrypted-secrets
upvoted 3 times
...
matelin
2 years, 3 months ago
The answer is "C. Encrypt the secret value and store the value in the repository. Store the decryption key in the repository-level GitHub secrets." The question mentions that the secret has to be available olny for this workflow. Putting the secret on the organiztional level would expose it for all other repos (and possibly workflows).
upvoted 2 times
...
warchoon
2 years, 3 months ago
Selected Answer: D
"For secrets stored at the organization-level, you can use access policies to control which repositories can use organization secrets." "For secrets stored at the environment level, you can enable required reviewers to control access to the secrets. A workflow job cannot access environment secrets until approval is granted by required approvers." So the organization level has less effort. The question is about effort, not privilege.
upvoted 2 times
CaptainJameson
2 years, 2 months ago
C is correct, you need to create a repository secret, not an environment level or organization level secret. https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...