Microsoft GH-300 Practice Test 48
Question 470
Copilot reports a match to public code that has since been moved, and no reference appears for another suspicious snippet. Which TWO principles should guide review? (Select TWO.)
- Assume the public index includes every private enterprise repository.
- Assume a missing reference makes all output public domain.
- Perform independent provenance review even when no match indicator appears.
- Consider public-index refresh delays when interpreting moved or deleted matches.
- Delete reference logs to remove code licensing obligations.
Explanation
Correct Answers
C:Absence of a detected match is not proof of originality.
D:References may lag changes to public repositories.
Incorrect Answers
A:Public-code matching does not index all inaccessible private code.
B:Matching coverage and license rights are different concepts.
E:Concealing provenance does not resolve compliance risk.
Question 471
An exclusion rule intended for `config/private.yaml` fails to block context in a supported editor. What should be checked?
- Verify the rule path, repository identifier, and client-specific enforcement support.
- Apply separate tool and file access controls because those modes lack the same exclusion support.
- Restrict filesystem access and avoid relying on exclusion for symlink protection.
- Restrict the MCP source index and server-side permission checks.
Explanation
Correct Answer
A:An incorrect path or unsupported surface can explain leakage.
Incorrect Answers
B:Current GitHub documentation distinguishes support by mode. An incorrect path or unsupported surface can explain leakage.
C:Symlink exclusions are a documented limitation. an incorrect path or unsupported surface can explain leakage.
D:GitHub editor exclusions cannot reliably police all third-party tools. an incorrect path or unsupported surface can explain leakage.
Question 472
A content exclusion is saved but a user reports it did not apply immediately. What should admins inspect?
- Verify the rule path, repository identifier, and client-specific enforcement support.
- Test the rule and confirm client refresh or propagation as documented.
- Restrict the MCP source index and server-side permission checks.
- Apply separate tool and file access controls because those modes lack the same exclusion support.
Explanation
Correct Answer
B:Policy availability to the client can lag administrative edits.
Incorrect Answers
A:An incorrect path or unsupported surface can explain leakage. What should admins inspect. Policy availability to the client can lag administrative edits.
C:GitHub editor exclusions cannot reliably police all third-party tools. policy availability to the client can lag administrative edits.
D:Current GitHub documentation distinguishes support by mode. Policy availability to the client can lag administrative edits.
Question 473
A confidential file is reachable through a symlink despite being excluded by path. What should be done?
- Restrict filesystem access and avoid relying on exclusion for symlink protection.
- Verify the rule path, repository identifier, and client-specific enforcement support.
- Test the rule and confirm client refresh or propagation as documented.
- Restrict the MCP source index and server-side permission checks.
Explanation
Correct Answer
A:Symlink exclusions are a documented limitation.
Incorrect Answers
B:An incorrect path or unsupported surface can explain leakage. What should be done. Symlink exclusions are a documented limitation.
C:Policy availability to the client can lag administrative edits. symlink exclusions are a documented limitation.
D:GitHub editor exclusions cannot reliably police all third-party tools. symlink exclusions are a documented limitation.
Question 474
A team expects exclusions in Edit and Agent modes of VS Code to work identically to inline suggestions. What should it do?
- Verify the rule path, repository identifier, and client-specific enforcement support.
- Test the rule and confirm client refresh or propagation as documented.
- Restrict filesystem access and avoid relying on exclusion for symlink protection.
- Apply separate tool and file access controls because those modes lack the same exclusion support.
Explanation
Correct Answer
D:Current GitHub documentation distinguishes support by mode.
Incorrect Answers
A:An incorrect path or unsupported surface can explain leakage. What should it do. Current GitHub documentation distinguishes support by mode.
B:Policy availability to the client can lag administrative edits. current GitHub documentation distinguishes support by mode.
C:Symlink exclusions are a documented limitation. Current GitHub documentation distinguishes support by mode.
Question 475
A custom MCP index returns excluded data to an agent. Where should the fix be implemented?
- Restrict filesystem access and avoid relying on exclusion for symlink protection.
- Apply separate tool and file access controls because those modes lack the same exclusion support.
- Test the rule and confirm client refresh or propagation as documented.
- Restrict the MCP source index and server-side permission checks.
Explanation
Correct Answer
D:GitHub editor exclusions cannot reliably police all third-party tools.
Incorrect Answers
A:Symlink exclusions are a documented limitation. GitHub editor exclusions cannot reliably police all third-party tools.
B:Current GitHub documentation distinguishes support by mode. gitHub editor exclusions cannot reliably police all third-party tools.
C:Policy availability to the client can lag administrative edits. gitHub editor exclusions cannot reliably police all third-party tools.
Question 476
A suggested dependency appears well named but might be typosquatted. What should the developer review?
- Encode or sanitize untrusted content and test script-injection payloads.
- Use dedicated secret scanning and code-review controls independently of public-code matching.
- Apply the framework's supported CSRF defenses and add negative tests.
- Verify package origin, signatures, and registry reputation before install.
Explanation
Correct Answer
D:Matching-public-code filtering is not a supply-chain security scanner.
Incorrect Answers
A:A plausible generated UI can still introduce cross-site scripting. matching-public-code filtering is not a supply-chain security scanner.
B:Code similarity checks and credential detection address different risks. What should the developer review. Matching-public-code filtering is not a supply-chain security scanner.
C:Prompt assistance does not replace web security design review. Matching-public-code filtering is not a supply-chain security scanner.
Question 477
Copilot emits a regex that backtracks catastrophically on attacker input. What validation is needed?
- Verify package origin, signatures, and registry reputation before install.
- Encode or sanitize untrusted content and test script-injection payloads.
- Use dedicated secret scanning and code-review controls independently of public-code matching.
- Stress-test worst-case inputs and choose a bounded-time pattern.
Explanation
Correct Answer
D:Generated syntax can be valid yet vulnerable to denial of service.
Incorrect Answers
A:Matching-public-code filtering is not a supply-chain security scanner. generated syntax can be valid yet vulnerable to denial of service.
B:A plausible generated UI can still introduce cross-site scripting. generated syntax can be valid yet vulnerable to denial of service.
C:Code similarity checks and credential detection address different risks. What validation is needed. Generated syntax can be valid yet vulnerable to denial of service.
Question 478
An AI-generated endpoint lacks CSRF protection for cookie-authenticated state changes. What should be required?
- Verify package origin, signatures, and registry reputation before install.
- Use dedicated secret scanning and code-review controls independently of public-code matching.
- Apply the framework's supported CSRF defenses and add negative tests.
- Stress-test worst-case inputs and choose a bounded-time pattern.
Explanation
Correct Answer
C:Prompt assistance does not replace web security design review.
Incorrect Answers
A:Matching-public-code filtering is not a supply-chain security scanner. prompt assistance does not replace web security design review.
B:Code similarity checks and credential detection address different risks. What should be required. Prompt assistance does not replace web security design review.
D:Generated syntax can be valid yet vulnerable to denial of service. Prompt assistance does not replace web security design review.
Question 479
A patch uses unchecked HTML insertion for user input. What should a reviewer request?
- Apply the framework's supported CSRF defenses and add negative tests.
- Stress-test worst-case inputs and choose a bounded-time pattern.
- Encode or sanitize untrusted content and test script-injection payloads.
- Verify package origin, signatures, and registry reputation before install.
Explanation
Correct Answer
C:A plausible generated UI can still introduce cross-site scripting.
Incorrect Answers
A:Prompt assistance does not replace web security design review. a plausible generated UI can still introduce cross-site scripting.
B:Generated syntax can be valid yet vulnerable to denial of service. A plausible generated UI can still introduce cross-site scripting.
D:Matching-public-code filtering is not a supply-chain security scanner. a plausible generated UI can still introduce cross-site scripting.
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.