• 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 3 out of 24 pages
Exam (elaborations)

WGU D385 V2 SOFTWARE SECURITY AND TESTING MASTER EXAM QUESTIONS AND ANSWERS

Document preview thumbnail
Preview 3 out of 24 pages

WGU D385 V2 SOFTWARE SECURITY AND TESTING MASTER EXAM QUESTIONS AND ANSWERS

Content preview

WGU D385 V2 SOFTWARE SECURITY
AND TESTING MASTER EXAM
QUESTIONS AND ANSWERS




1. Which technique is most effective at preventing SQL Injection when handling user-provided

data in a database query?

A. Implementing client-side input length validation


B. Blacklisting common SQL keywords like SELECT and DROP


C. Using prepared statements with parameterized queries


D. Escaping all single quotes in the input string


Answer: C


Conceptual Explanation: Prepared statements ensure that the database treats the user

input as data, not as executable code, which is the primary defense against SQL injection.


2. In the context of Cross-Site Scripting (XSS), what is the primary purpose of context-aware

output encoding?

A. To ensure data is interpreted as text rather than code by the browser


B. To encrypt the data before it is stored in the database

,C. To validate that the input contains only alphanumeric characters


D. To compress the response to improve loading times


Answer: A


Conceptual Explanation: Context-aware encoding converts potentially dangerous

characters into their safe HTML, JavaScript, or CSS equivalents, preventing the browser

from executing them.


3. A developer is implementing an API and wants to prevent Cross-Site Request Forgery

(CSRF). Which mechanism is considered a modern best practice for stateless REST APIs?

A. Checking the User-Agent header for every request


B. Implementing Double Submit Cookies or custom headers like X-Requested-With


C. Using a hidden form field for the session ID


D. Increasing the session timeout duration


Answer: B


Conceptual Explanation: Since REST APIs are often stateless, using custom headers or

double submit cookies helps ensure the request originated from a trusted client.


4. Which type of security testing involves analyzing the application’s source code without

executing the program?

A. Dynamic Application Security Testing (DAST)


B. Interactive Application Security Testing (IAST)

, C. Penetration Testing


D. Static Application Security Testing (SAST)


Answer: D


Conceptual Explanation: SAST (Static Analysis) examines code, byte code, or binaries for

security vulnerabilities without running the application.


5. When securing a JSON Web Token (JWT), which of the following practices is most critical to

prevent token forgery?

A. Using a strong, secret key with the HS256 algorithm or an RSA private key


B. Storing the JWT in the browser’s local storage


C. Reducing the size of the payload to improve performance


D. Setting the ‘alg’ header to ‘none’ in the JWT header


Answer: A


Conceptual Explanation: The security of a JWT relies on the integrity of its signature. If

the key is weak or leaked, an attacker can forge tokens. Setting ‘alg’ to ‘none’ is a major

vulnerability.


6. An application logs all user activities, including failed login attempts. Which of the

following is a security risk associated with logging?

A. Logging the time of the event


B. Logging the user’s IP address

Document information

Uploaded on
August 31, 2026
Number of pages
24
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

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.
Thebright
3.6
(44)
Sold
247
Followers
6
Items
15205
Last sold
1 day ago




Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right 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 aced 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