• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 31 pages
Exam (elaborations)

Wgu D385 Task 1 Complete Practice Guide Software Security & Testing Static Analysis, Python Logging, Assertions, Exception Handling & Remediation| Instant Download

Document preview thumbnail
Preview 4 out of 31 pages

This practice guide for WGU D385 Task 1 covers software security and testing, focusing on static analysis, Python logging, assertions, exception handling, and remediation. Each question includes four options, the correct answer, and a clear rationale to help you understand the material and prepare for the exam. Use it to review key concepts and build confidence.

Content preview

WGU D385 Software Security and
Testing Task 2 Preparation Guide
Vulnerability Remediation, Unit
Testing & Test Evidence 2026 | Verified
WGU D385 Software Security and Testing Task | Comprehensive
Examination
WGU D385 Software Security and Testing Task 2 Preparation
Guide Vulnerability Remediation, Unit Testing & Test
Evidence 2026 actual exam preparation document with




INTRODUCTION
This document is an important and very helpful preparation
resource for WGU D385 Software Security and Testing Task 2
Preparation Guide Vulnerability Remediation, Unit Testing &
Test Evidence 2026. Every item uses a focused exam stem, four
response options, a keyed response, and a clear rationale,
making it easier to understand the subject, spot distractors, and
build real exam confidence.




Page 1

, Question 1
A security engineer discovers a SQL injection vulnerability in a legacy Java
application. Which remediation strategy best aligns with defense-in-depth
while minimizing performance overhead?
A. Escaping all user input with a custom blacklist filter
B. Using parameterized queries with a Web Application Firewall (WAF)
as a secondary control
C. Storing all database credentials in a configuration file with restricted
permissions
D. Implementing input length validation and server-side sanitization
Correct Answer: B - Using parameterized queries with a Web
Application Firewall (WAF) as a secondary control


RATIONALE
Parameterized queries eliminate the root cause by separating code
from data, and a WAF adds a layer of defense without significant
performance cost. Blacklist filtering is easily bypassed, credential
storage does not prevent injection, and input validation alone is
insufficient.

Question 2
In unit testing, which mocking approach is most appropriate when testing a
service that depends on a slow external API, and why?
A. Use a spy to record calls and verify them later, because it preserves
real API behavior.
B. Use a stub to return canned responses, because it isolates the unit and
speeds up tests.
C. Use a mock to assert interactions, because it ensures the API is called
correctly.
D. Use a fake with in-memory implementation, because it simulates the
API without network overhead.



Page 2

,Correct Answer: D - Use a fake with in-memory implementation,

because it simulates the API without network overhead.




RATIONALE
A fake provides a lightweight, in-memory implementation that mimics
the API's behavior, offering both speed and realistic interaction
without network calls. Stubs and mocks are more limited in scope, and
spies still execute real code, which is slow.

Question 3
Which of the following best describes the purpose of a Software Bill of
Materials (SBOM) in vulnerability remediation?
A. To list all open-source components and their versions for rapid
identification of vulnerable dependencies
B. To document the test cases executed during unit testing
C. To provide a summary of code coverage metrics
D. To serve as a legal contract between software vendors and clients
Correct Answer: A - To list all open-source components and their
versions for rapid identification of vulnerable dependencies


RATIONALE
An SBOM enumerates all components and dependencies, enabling
quick detection of known vulnerabilities (e.g., via CVEs). It does not
document tests, coverage, or contracts, though it supports compliance.

Question 4
A developer writes a unit test that passes even when the production code is
broken. Which test smell is most likely present?
A. Assertion-free test
B. Eager test
C. Test with excessive mocking
D. Test that depends on external state


Page 3

, Correct Answer: A - Assertion-free test




RATIONALE
An assertion-free test lacks verification, so it passes regardless of code
correctness. Eager tests perform too much, excessive mocking can
hide issues but not necessarily cause false passes, and external state
dependence may cause flakiness but not guaranteed false positives.

Question 5
When using static application security testing (SAST), which finding is most
likely to be a false positive?
A. Hardcoded password in source code
B. Use of a cryptographically weak random number generator
C. Potential SQL injection in a string concatenation
D. Unvalidated redirect in a web application
Correct Answer: C - Potential SQL injection in a string
concatenation


RATIONALE
SAST tools often flag string concatenation as potential SQL injection
even when the input is later sanitized or parameterized, leading to
false positives. Hardcoded passwords and weak RNG are typically
true positives, while unvalidated redirects are usually detected
accurately.

Question 6
In test-driven development (TDD), what is the primary purpose of the 'red'
phase?
A. To write a failing test that defines the desired behavior
B. To refactor code to improve design
C. To run all tests and ensure they pass
D. To write the minimal code to pass the test


Page 4

Document information

Uploaded on
October 5, 2026
Number of pages
31
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$30.00

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GoldenExams
4.4
(74)
Sold
84
Followers
20
Items
11677
Last sold
1 hour ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions