nerdexam
MicrosoftMicrosoft

GH-500 · Question #77

GH-500 Question #77: Real Exam Question with Answer & Explanation

The correct answer is D: Enable push protection.. {"question_number": 6, "question": "Which of the following is the best way to prevent developers from adding secrets to the repository?", "correct_answer": "D", "explanation": "Enabling push protection in GitHub Advanced Security is the most direct and effective technical control

Secret Scanning

Question

Which of the following is the best way to prevent developers from adding secrets to the repository?

Options

  • AMake the repository public.
  • BConfigure a security manager.
  • CCreate a CODEOWNERS file.
  • DEnable push protection.

Explanation

{"question_number": 6, "question": "Which of the following is the best way to prevent developers from adding secrets to the repository?", "correct_answer": "D", "explanation": "Enabling push protection in GitHub Advanced Security is the most direct and effective technical control for preventing secrets from being committed. When push protection is active, GitHub scans every push in real time and blocks the push if a known secret pattern (API key, token, credential) is detected - stopping the secret before it ever enters the repository history. Making a repository public (option A) has the opposite effect and would expose any secrets. A security manager role (option B) is an administrative role that manages security settings but does not automatically block secret commits. A CODEOWNERS file (option C) defines code ownership for review purposes but has no capability to detect or block secrets.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#Secret scanning#Push protection#Repository security#Preventing secrets

Community Discussion

No community discussion yet for this question.

Full GH-500 PracticeBrowse All GH-500 Questions