• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 31 páginas
Examen

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

Document preview thumbnail
Vista previa 4 fuera de 31 páginas

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.

Vista previa del contenido

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

Información del documento

Subido en
5 de octubre de 2026
Número de páginas
31
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$30.00

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
GoldenExams
4.4
(74)
Vendido
84
Seguidores
20
Artículos
11677
Última venta
1 hora hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes