B. Add a status check to the policies of the main branch.
Explanation:
To ensure that all code for App1 passes a security validation before deployment, you want to enforce that code cannot be merged into the main branch unless it passes your custom security validation tool. By adding a status check to the main branch policies, you can require that a specific check (such as the result of your custom tool) must succeed before pull requests can be completed and code can be merged. This is the standard and recommended way to enforce pre-deployment validations in Azure Pipelines.
you need to catch vulnerabilities "before" deployment because once it's in PROD with vulnerabilities, you would need to do a rollback. So, performing the tests in TEST environment is more appropriate and cause less headaches of having to rollback.
Status check on a PR of the feature branch. Once approved, merge to main.
Performing a check on the main branch means that it's already been approved and failed the status check after approval.
when you configure the status check in the policies of the main branch it means it is a requirement to complete pull requests to main. not that it checks the main after merge.
I would say option A Option B could work but is less ideal because it's applied to the main branch, and security validation should generally be enforced earlier in the development process (e.g., on the feature/development branches) to catch issues before they reach the main branch.
This section is not available anymore. Please use the main Exam Page.AZ-400 Exam Questions
Log in to ExamTopics
Sign in:
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.
7bc6163
3 weeks, 5 days agoDankho
6 months, 1 week agoyaguitoEC
6 months, 3 weeks agoZangi
6 months, 3 weeks agoMrAZ105
7 months, 3 weeks agoUrbanRellik
7 months, 3 weeks agoDaveVentura
6 months, 2 weeks agoMrAZ105
8 months, 1 week agoUrbanRellik
7 months, 3 weeks ago