0
0
Postmantesting~5 mins

Security header validation in Postman - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of security headers in HTTP responses?
Security headers help protect web applications by instructing browsers how to handle content securely, reducing risks like cross-site scripting and clickjacking.
Click to reveal answer
beginner
Name three common security headers you should validate in API testing.
Common security headers include Content-Security-Policy, X-Frame-Options, and Strict-Transport-Security.
Click to reveal answer
intermediate
How can you validate security headers using Postman tests?
In Postman, you write test scripts that check if the response headers contain expected security headers with correct values using pm.response.headers.get().
Click to reveal answer
beginner
What does the Strict-Transport-Security header do?
It tells browsers to only connect to the site using HTTPS for a specified time, preventing insecure HTTP connections.
Click to reveal answer
intermediate
Why is it important to check the X-Content-Type-Options header?
This header prevents browsers from MIME-sniffing a response away from the declared content-type, reducing the risk of executing malicious files.
Click to reveal answer
Which security header prevents your site from being embedded in iframes on other sites?
AX-Frame-Options
BContent-Security-Policy
CStrict-Transport-Security
DX-Content-Type-Options
In Postman, which method retrieves a response header value for validation?
Apm.response.body.get()
Bpm.response.headers.get()
Cpm.request.headers.get()
Dpm.test.headers.get()
What does the Content-Security-Policy header help prevent?
AServer crashes
BSlow network connections
CPassword leaks
DCross-site scripting attacks
Which header enforces HTTPS connections by browsers?
AStrict-Transport-Security
BX-Frame-Options
CContent-Security-Policy
DX-Content-Type-Options
Why should you validate security headers in API responses?
ATo improve API response speed
BTo check API data format
CTo ensure the API is secure against common web attacks
DTo verify API authentication tokens
Explain how you would write a Postman test to check for the presence and correct value of the X-Frame-Options header.
Think about how to get header values and assert them in Postman test scripts.
You got /3 concepts.
    Describe why security headers are important in web applications and what risks they help reduce.
    Consider common web vulnerabilities and how headers can protect against them.
    You got /3 concepts.