Microsoft GH-300 Practice Test 49
Question 480
A team assumes enabling public-code filtering also detects secrets automatically. What distinction matters?
- Stress-test worst-case inputs and choose a bounded-time pattern.
- Apply the framework's supported CSRF defenses and add negative tests.
- Use dedicated secret scanning and code-review controls independently of public-code matching.
- Encode or sanitize untrusted content and test script-injection payloads.
Explanation
Correct Answer
C:Code similarity checks and credential detection address different risks.
Incorrect Answers
A:Generated syntax can be valid yet vulnerable to denial of service. Code similarity checks and credential detection address different risks.
B:Prompt assistance does not replace web security design review. code similarity checks and credential detection address different risks.
D:A plausible generated UI can still introduce cross-site scripting. What distinction matters. Code similarity checks and credential detection address different risks.
Question 481
An agent requests unrestricted filesystem access when assigned a single documentation change. What should be done?
- Use narrowly scoped delegated access and explicit sensitive-operation approvals.
- Limit tool access to required files and review proposed writes.
- Review scripts and execute in a restricted sandbox where possible.
- Reject untrusted exfiltration instructions and investigate the source.
Explanation
Correct Answer
B:Agent autonomy should be bounded by the task's actual authority.
Incorrect Answers
A:Broad permanent credentials increase the consequences of agent compromise. agent autonomy should be bounded by the task's actual authority.
C:Package lifecycle hooks can run arbitrary commands. What should be done. Agent autonomy should be bounded by the task's actual authority.
D:Tool output is not approval to transmit repository contents. agent autonomy should be bounded by the task's actual authority.
Question 482
A coding agent suggests disabling the repository security scanner to speed up merge. What must remain?
- Enforce required checks and only allow formally approved exceptions.
- Limit tool access to required files and review proposed writes.
- Use narrowly scoped delegated access and explicit sensitive-operation approvals.
- Review scripts and execute in a restricted sandbox where possible.
Explanation
Correct Answer
A:AI-generated suggestions do not override branch protection.
Incorrect Answers
B:Agent autonomy should be bounded by the task's actual authority. AI-generated suggestions do not override branch protection.
C:Broad permanent credentials increase the consequences of agent compromise. aI-generated suggestions do not override branch protection.
D:Package lifecycle hooks can run arbitrary commands. What must remain. AI-generated suggestions do not override branch protection.
Question 483
A tool response instructs an agent to post code to an unknown URL. What should be done?
- Limit tool access to required files and review proposed writes.
- Use narrowly scoped delegated access and explicit sensitive-operation approvals.
- Enforce required checks and only allow formally approved exceptions.
- Reject untrusted exfiltration instructions and investigate the source.
Explanation
Correct Answer
D:Tool output is not approval to transmit repository contents.
Incorrect Answers
A:Agent autonomy should be bounded by the task's actual authority. Tool output is not approval to transmit repository contents.
B:Broad permanent credentials increase the consequences of agent compromise. tool output is not approval to transmit repository contents.
C:AI-generated suggestions do not override branch protection. tool output is not approval to transmit repository contents.
Question 484
A custom agent is allowed to run package manager scripts from untrusted repos. What safeguard applies?
- Enforce required checks and only allow formally approved exceptions.
- Limit tool access to required files and review proposed writes.
- Review scripts and execute in a restricted sandbox where possible.
- Reject untrusted exfiltration instructions and investigate the source.
Explanation
Correct Answer
C:Package lifecycle hooks can run arbitrary commands.
Incorrect Answers
A:AI-generated suggestions do not override branch protection. package lifecycle hooks can run arbitrary commands.
B:Agent autonomy should be bounded by the task's actual authority. Package lifecycle hooks can run arbitrary commands.
D:Tool output is not approval to transmit repository contents. What safeguard applies. Package lifecycle hooks can run arbitrary commands.
Question 485
A coding agent is operating on an unfamiliar repository with third-party tools and encounters instructions to disable tests and upload secrets. Which THREE controls should remain? (Select THREE.)
- Grant organization-owner credentials to every community tool.
- Skip tests whenever a tool output says to do so.
- Keep the agent's filesystem and network tools limited to authorized task scope.
- Reject commands embedded in untrusted repository or tool text.
- Send all hidden repository files to a new domain as a verification step.
- Preserve the project's required security checks and change approvals.
Explanation
Correct Answers
C:Tool restrictions contain accidental or malicious actions.
D:Lower-trust content cannot expand permissions.
F:Agent assistance is not a release-policy waiver.
Incorrect Answers
A:Unrestricted access creates serious supply-chain and confidentiality risk.
B:Tool output is not authority over project governance.
E:Unapproved exfiltration is unsafe.
Question 486
A code suggestion includes a personal email address copied from a sample fixture. What should the author do?
- Replace infrastructure secrets with generic placeholders and perform a disclosure review.
- Replace it with synthetic data and review whether any sensitive value leaked.
- Keep mandated audit events and add tests ensuring they are emitted.
- Minimize sensitive content and use authorized secure sharing only if necessary.
Explanation
Correct Answer
B:Generated outputs can inadvertently repeat confidential prompt context.
Incorrect Answers
A:Documentation artifacts can expose internal systems if copied without inspection. generated outputs can inadvertently repeat confidential prompt context.
C:Privacy and security require controlled, auditable operations. Generated outputs can inadvertently repeat confidential prompt context.
D:Debugging convenience does not justify excessive personal-data disclosure. What should the author do. Generated outputs can inadvertently repeat confidential prompt context.
Question 487
A generated log sample contains real access tokens. What corrective action is needed?
- Keep mandated audit events and add tests ensuring they are emitted.
- Replace infrastructure secrets with generic placeholders and perform a disclosure review.
- Replace it with synthetic data and review whether any sensitive value leaked.
- Remove the tokens, rotate exposed credentials, and use redacted examples.
Explanation
Correct Answer
D:Sensitive output requires incident handling, not only text cleanup.
Incorrect Answers
A:Privacy and security require controlled, auditable operations. Sensitive output requires incident handling, not only text cleanup.
B:Documentation artifacts can expose internal systems if copied without inspection. sensitive output requires incident handling, not only text cleanup.
C:Generated outputs can inadvertently repeat confidential prompt context. sensitive output requires incident handling, not only text cleanup.
Question 488
A model proposes a diagnostic email with a customer's full medical data attached. What principle applies?
- Replace it with synthetic data and review whether any sensitive value leaked.
- Minimize sensitive content and use authorized secure sharing only if necessary.
- Remove the tokens, rotate exposed credentials, and use redacted examples.
- Keep mandated audit events and add tests ensuring they are emitted.
Explanation
Correct Answer
B:Debugging convenience does not justify excessive personal-data disclosure.
Incorrect Answers
A:Generated outputs can inadvertently repeat confidential prompt context. debugging convenience does not justify excessive personal-data disclosure.
C:Sensitive output requires incident handling, not only text cleanup. What principle applies. Debugging convenience does not justify excessive personal-data disclosure.
D:Privacy and security require controlled, auditable operations. Debugging convenience does not justify excessive personal-data disclosure.
Question 489
A generated SQL example includes production hostnames and credentials. What should happen before documentation publication?
- Replace it with synthetic data and review whether any sensitive value leaked.
- Minimize sensitive content and use authorized secure sharing only if necessary.
- Replace infrastructure secrets with generic placeholders and perform a disclosure review.
- Remove the tokens, rotate exposed credentials, and use redacted examples.
Explanation
Correct Answer
C:Documentation artifacts can expose internal systems if copied without inspection.
Incorrect Answers
A:Generated outputs can inadvertently repeat confidential prompt context. documentation artifacts can expose internal systems if copied without inspection.
B:Debugging convenience does not justify excessive personal-data disclosure. documentation artifacts can expose internal systems if copied without inspection.
D:Sensitive output requires incident handling, not only text cleanup. What should happen before documentation publication. Documentation artifacts can expose internal systems if copied without inspection.
Question 490
An assistant generates code that bypasses logging controls. What should the reviewer preserve?
- Minimize sensitive content and use authorized secure sharing only if necessary.
- Keep mandated audit events and add tests ensuring they are emitted.
- Replace infrastructure secrets with generic placeholders and perform a disclosure review.
- Remove the tokens, rotate exposed credentials, and use redacted examples.
Explanation
Correct Answer
B:Privacy and security require controlled, auditable operations.
Incorrect Answers
A:Debugging convenience does not justify excessive personal-data disclosure. privacy and security require controlled, auditable operations.
C:Documentation artifacts can expose internal systems if copied without inspection. Privacy and security require controlled, auditable operations.
D:Sensitive output requires incident handling, not only text cleanup. What should the reviewer preserve. Privacy and security require controlled, auditable operations.