1
D385 Software Security and Testing Questions
and Answers (100% Correct Answers) Already
Graded A+
What is the primary defense against log injection attacks? Ans: Sanitize
outbound log messages
An attacker exploits a cross-site scripting vulnerability. What is the
© 2026 Assignment Expert
attacker able to do? Ans: Access the user's data
Which Python function is prone to a potential code injection attack?
Guru01 - Stuvia
Ans: eval()
What are two common defensive coding techniques? Ans: Check
functional preconditions and postconditions
Which package is meant for internal use by Python for regression testing?
Ans: test
Which Python function is used for input validation? Ans: type()
A security analyst has noticed a vulnerability in which an attacker took
over multiple users' accounts. Which vulnerability did the security analyst
encounter? Ans: Broken access control
When creating a new user, an administrator must submit the following
fields to an API endpoint:
Name
, For Expert help and assignment handling,
2
Email Address
Password
IsAdmin
What is the best way to ensure the API is protected against privilege
escalation? Ans: Implement resource and field-level access control
© 2026 Assignment Expert
Which method is used for a SQL injection attack? Ans: Exploiting query
parameters
Which response method, when sent a request, returns information about
Guru01 - Stuvia
the server's response and is delivered back to the console? Ans:
response.content
What does cross-origin resource sharing (CORS) allow users to do? Ans:
Override same starting policy for specific resources
Which protocol caches a token after it has been acquired? Ans: MSAL
OK - Your request was successful Ans: 200
CREATED - Your request was accepted, and the resource was created
Ans: 201
BAD REQUEST - Your request is either wrong or missing information Ans:
400
UNAUTHORIZED - Your request requires additional permissions Ans: 401