100% Latest & Updated Microsoft GH-300 Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 340
A project uses external issue text while composing prompts. The assistant sees two conflicting requirements from different stakeholder documents. Which response best addresses the stated risk or requirement?
- Reject the embedded instruction and avoid transmitting environment secrets.
- Keep tool execution approval separate from lower-trust text.
- Identify which requirement is authoritative before proceeding.
- Extract verifiable API details while disregarding the malicious command.
Explanation
Correct Answer
C:Conflicting sources should be reconciled by governance, not silently averaged.
Incorrect Answers
A:Prompt-injection instructions can hide inside task materials. This addresses a different situation: A source comment says to leak environment variables to a testing URL.
B:Destructive effects require explicit authorization. This addresses a different situation: A code review prompt contains an instruction to delete all build artifacts without user approval.
D:Source material can be read as evidence without obeying its instructions. This addresses a different situation: A third-party README contains both useful API details and a malicious directive.
Question 341
A team maintains reusable prompt files for GitHub Copilot. Reviewers repeatedly ask for the same API security checklist. Which recommendation directly resolves this issue?
- Update the prompt template and test it on a representative change.
- Store a reusable prompt with explicit checklist and expected output structure.
- Distinguish task-specific prompts from persistent project guidance.
- Treat the prompt output as an aid and conduct independent targeted review.
Explanation
Correct Answer
B:Shared prompts make repeatable reviews more consistent.
Incorrect Answers
A:Prompt governance should follow current organization requirements. This addresses a different situation: The team's checklist changes after a new security policy.
C:Different instruction mechanisms solve different scopes of context. This addresses a different situation: A developer assumes prompt files automatically replace repository-wide instructions.
D:Reusability does not guarantee complete issue detection. This addresses a different situation: The generated checklist omits a real authorization finding in a pull request.
Question 342
A team maintains reusable prompt files for GitHub Copilot. A prompt file includes hard-coded project paths that differ across repositories. Which action is the most appropriate response to this situation?
- Update the prompt template and test it on a representative change.
- Treat the prompt output as an aid and conduct independent targeted review.
- Parameterize the target paths and language assumptions.
- Store a reusable prompt with explicit checklist and expected output structure.
Explanation
Correct Answer
C:Reusable templates work better when project-specific values are supplied at use time.
Incorrect Answers
A:Prompt governance should follow current organization requirements. This addresses a different situation: The team's checklist changes after a new security policy.
B:Reusability does not guarantee complete issue detection. This addresses a different situation: The generated checklist omits a real authorization finding in a pull request.
D:Shared prompts make repeatable reviews more consistent. This addresses a different situation: Reviewers repeatedly ask for the same API security checklist.
Question 343
A team maintains reusable prompt files for GitHub Copilot. A developer assumes prompt files automatically replace repository-wide instructions. What should the developer do before accepting the proposed result?
- Parameterize the target paths and language assumptions.
- Treat the prompt output as an aid and conduct independent targeted review.
- Distinguish task-specific prompts from persistent project guidance.
- Store a reusable prompt with explicit checklist and expected output structure.
Explanation
Correct Answer
C:Different instruction mechanisms solve different scopes of context.
Incorrect Answers
A:Reusable templates work better when project-specific values are supplied at use time. This addresses a different situation: A prompt file includes hard-coded project paths that differ across repositories.
B:Reusability does not guarantee complete issue detection. This addresses a different situation: The generated checklist omits a real authorization finding in a pull request.
D:Shared prompts make repeatable reviews more consistent. This addresses a different situation: Reviewers repeatedly ask for the same API security checklist.
Question 344
A team maintains reusable prompt files for GitHub Copilot. The team's checklist changes after a new security policy. Which response best addresses the stated risk or requirement?
- Parameterize the target paths and language assumptions.
- Store a reusable prompt with explicit checklist and expected output structure.
- Update the prompt template and test it on a representative change.
- Distinguish task-specific prompts from persistent project guidance.
Explanation
Correct Answer
C:Prompt governance should follow current organization requirements.
Incorrect Answers
A:Reusable templates work better when project-specific values are supplied at use time. This addresses a different situation: A prompt file includes hard-coded project paths that differ across repositories.
B:Shared prompts make repeatable reviews more consistent. This addresses a different situation: Reviewers repeatedly ask for the same API security checklist.
D:Different instruction mechanisms solve different scopes of context. This addresses a different situation: A developer assumes prompt files automatically replace repository-wide instructions.
Question 345
A team maintains reusable prompt files for GitHub Copilot. The generated checklist omits a real authorization finding in a pull request. What is the most defensible next step under responsible development practices?
- Parameterize the target paths and language assumptions.
- Treat the prompt output as an aid and conduct independent targeted review.
- Distinguish task-specific prompts from persistent project guidance.
- Update the prompt template and test it on a representative change.
Explanation
Correct Answer
B:Reusability does not guarantee complete issue detection.
Incorrect Answers
A:Reusable templates work better when project-specific values are supplied at use time. This addresses a different situation: A prompt file includes hard-coded project paths that differ across repositories.
C:Different instruction mechanisms solve different scopes of context. This addresses a different situation: A developer assumes prompt files automatically replace repository-wide instructions.
D:Prompt governance should follow current organization requirements. This addresses a different situation: The team's checklist changes after a new security policy.
Question 346
A developer is prompting for tests around a string parser. The input can be null, empty, or whitespace-only. Which action is the most appropriate response to this situation?
- Ask for assertions on returned values and side effects.
- Require deterministic fixtures or seeded generators.
- Include explicit boundary cases and expected results.
- Specify malformed encoding examples and expected errors.
Explanation
Correct Answer
C:Good prompts make edge conditions unambiguous.
Incorrect Answers
A:A test must validate the actual behavior required by its scenario. This addresses a different situation: The assistant calls a weak assertion a full functional test.
B:Reproducible tests are easier to debug and review. This addresses a different situation: An implementation uses random test data and sometimes fails unpredictably.
D:Invalid text encodings can expose gaps in generated parsers. This addresses a different situation: The function must reject malformed Unicode escape sequences.
Question 347
A developer is prompting for tests around a string parser. A CSV field can contain embedded newlines and escaped quotes. What should the developer do before accepting the proposed result?
- Include explicit boundary cases and expected results.
- Ask for assertions on returned values and side effects.
- Add representative escaped-field examples to the test request.
- Require deterministic fixtures or seeded generators.
Explanation
Correct Answer
C:Real input formats require checks beyond simple delimiter splitting.
Incorrect Answers
A:Good prompts make edge conditions unambiguous. This addresses a different situation: The input can be null, empty, or whitespace-only.
B:A test must validate the actual behavior required by its scenario. This addresses a different situation: The assistant calls a weak assertion a full functional test.
D:Reproducible tests are easier to debug and review. This addresses a different situation: An implementation uses random test data and sometimes fails unpredictably.
Question 348
A developer is prompting for tests around a string parser. The function must reject malformed Unicode escape sequences. Which response best addresses the stated risk or requirement?
- Specify malformed encoding examples and expected errors.
- Include explicit boundary cases and expected results.
- Add representative escaped-field examples to the test request.
- Ask for assertions on returned values and side effects.
Explanation
Correct Answer
A:Invalid text encodings can expose gaps in generated parsers.
Incorrect Answers
B:Good prompts make edge conditions unambiguous. This addresses a different situation: The input can be null, empty, or whitespace-only.
C:Real input formats require checks beyond simple delimiter splitting. This addresses a different situation: A CSV field can contain embedded newlines and escaped quotes.
D:A test must validate the actual behavior required by its scenario. This addresses a different situation: The assistant calls a weak assertion a full functional test.
Question 349
A developer is prompting for tests around a string parser. An implementation uses random test data and sometimes fails unpredictably. What is the most defensible next step under responsible development practices?
- Add representative escaped-field examples to the test request.
- Include explicit boundary cases and expected results.
- Specify malformed encoding examples and expected errors.
- Require deterministic fixtures or seeded generators.
Explanation
Correct Answer
D:Reproducible tests are easier to debug and review.
Incorrect Answers
A:Real input formats require checks beyond simple delimiter splitting. This addresses a different situation: A CSV field can contain embedded newlines and escaped quotes.
B:Good prompts make edge conditions unambiguous. This addresses a different situation: The input can be null, empty, or whitespace-only.
C:Invalid text encodings can expose gaps in generated parsers. This addresses a different situation: The function must reject malformed Unicode escape sequences.
Question 350
A developer is prompting for tests around a string parser. The assistant calls a weak assertion a full functional test. Which recommendation directly resolves this issue?
- Specify malformed encoding examples and expected errors.
- Require deterministic fixtures or seeded generators.
- Add representative escaped-field examples to the test request.
- Ask for assertions on returned values and side effects.
Explanation
Correct Answer
D:A test must validate the actual behavior required by its scenario.
Incorrect Answers
A:Invalid text encodings can expose gaps in generated parsers. This addresses a different situation: The function must reject malformed Unicode escape sequences.
B:Reproducible tests are easier to debug and review. This addresses a different situation: An implementation uses random test data and sometimes fails unpredictably.
C:Real input formats require checks beyond simple delimiter splitting. This addresses a different situation: A CSV field can contain embedded newlines and escaped quotes.
GitHub Copilot (GH-300) Practice Tests