qa / security testing
Security Testing for QA Engineers: Test Cases You Can Write Without Being a Hacker
The security checks a tester can design, run and report from inside a normal QA role: an authorization matrix, header and cookie audits, a ZAP baseline scan, and a bug report format that gets fixed. Includes a real header audit of this site. Aligned with OWASP Top 10:2025.
A penetration tester tries to break in. A QA engineer does something narrower and more useful for a product team: turns security requirements into repeatable test cases that run on every release, and reports gaps in a form developers can act on. You do not need exploit-writing skill for that. You need a list of what the product must refuse, the discipline to test the refusals, and the habit of checking them on a schedule. This page covers that role. If you own the CI pipeline and want scanners, signing and supply-chain controls, the DevSecOps page is the better fit, and if you want request-level functional checks on endpoints, see API testing.
01 · THE BIGGEST TARGET
An authorization matrix: who may do what, tested both ways
OWASP's Top 10:2025 lists Broken Access Control as A01, the first of its ten categories. It is also the category that testers are best placed to find, because the bugs are logic errors that no scanner can judge: the scanner does not know that user B must not see user A's invoice. The method is a matrix. List every role and every sensitive action, write down the expected result, and test every cell, including the ones that must be refused.
| Action | Anonymous | User A (owner) | User B (other customer) | Admin |
|---|---|---|---|---|
| View invoice 101 (owned by A) | Refused (401) | Allowed | Refused, and no data leaked | Allowed |
| Edit invoice 101 | Refused (401) | Allowed | Refused (403 or 404) | Allowed |
| Open the admin report | Refused | Refused (403) | Refused (403) | Allowed |
Download /invoices/101.pdf by direct URL | Refused | Allowed | Refused | Allowed |
The column that finds bugs is User B. This is the insecure direct object reference check that the OWASP Web Security Testing Guide describes in section 4.5.4: map every place user input references an object, then, using at least two users who own different objects, try each reference with the wrong user. Test the UI path and the direct URL path separately; a hidden button is not an access control. Also test after logout, after a role downgrade, and with a token from an expired session.
02 · A HEADER AUDIT
Response headers and cookies: a worked audit
Header checks are quick, safe and automatable. Run curl -I on a page you own and read the result. The table below is an illustrative result of the kind a small static site often returns, set against what a security review would look for:
| Header | Purpose | Found in the response |
|---|---|---|
| Strict-Transport-Security | Tells browsers to use HTTPS only | Present, max-age=31556926 |
| Content-Security-Policy | Controls which origins may load resources on the page, which MDN says helps guard against cross-site scripting | Not present |
| X-Content-Type-Options | Stops browsers guessing content types | Not present |
| X-Frame-Options or CSP frame-ancestors | Controls whether other sites may frame the page | Not present |
| Referrer-Policy | Limits what the Referer header leaks | Not present |
For a static content site with no logins, the missing headers are low severity, and that is exactly how the finding should be written: present, why it matters, how likely it is to be exploited, and the cheapest fix. For cookies, MDN's secure-configuration guide says to set Secure so a cookie is only sent over HTTPS, and HttpOnly on cookies that do not need JavaScript access, particularly session identifiers, to help prevent theft through cross-site scripting. Log in, open the browser's developer tools, and check every cookie the app sets. The OWASP Secure Headers Project keeps the reference list of headers.
03 · AN AUTOMATED SWEEP
Running ZAP's baseline scan against a test environment
The ZAP baseline scan ships in the project's Docker images. According to its documentation, it runs the spider against the target for one minute by default, then waits for passive scanning to finish and reports. It performs no active attacks, which is why the docs describe it as suitable for CI and even for production sites. Warnings are the default; a config file can promote selected rules to FAIL or IGNORE.
docker run -t ghcr.io/zaproxy/zaproxy:stable zap-baseline.py -t https://staging.example.com
# write an HTML report to the current directory
docker run -v $(pwd):/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable zap-baseline.py \
-t https://staging.example.com -r report.htmlZAP is open source under the Apache License 2.0. Treat its output as a list of leads: triage each warning, confirm it by hand, and add a config entry to silence confirmed false positives so the next run shows only what is new. A baseline scan is passive, so it cannot find broken access control; that is what section one is for.
04 · WHAT TO TEST, BY CATEGORY
Turning the OWASP Top 10:2025 into test ideas
| Category | A first test case |
|---|---|
| A01 Broken Access Control | The authorization matrix above |
| A02 Security Misconfiguration | Default accounts disabled, debug pages off, headers present, directory listing off |
| A05 Injection | Submit quotes, angle brackets and script tags in every text field; check output encoding and error messages |
| A07 Authentication Failures | Lockout or throttling after repeated bad logins; session ends on logout; password reset links expire |
| A09 Security Logging and Alerting Failures | A failed login and a forbidden request each leave a log entry, with no password in it |
| A10 Mishandling of Exceptional Conditions | Malformed input produces a clean error, never a stack trace |
Other categories on the list include Software Supply Chain Failures, Cryptographic Failures, Insecure Design and Software or Data Integrity Failures. They matter, but they live more in design review and the pipeline than in a tester's checklist.
05 · THE BUG REPORT AND THE BOUNDARY
Reporting a finding, and staying legal while you look
A security finding that cannot be reproduced gets closed. A report that works has: a title that states the impact in one line, exact steps with the accounts used, the request and response as evidence, the data exposed, who could exploit it and how easily, and a suggested fix. Send it through the channel your team uses for security issues rather than a public ticket if the bug is serious.
For practice, use targets built to be attacked. OWASP Juice Shop calls itself probably the most modern and sophisticated insecure web application, built for training, awareness demos and CTFs. OWASP WebGoat is another training app. PortSwigger's Web Security Academy provides free online training with interactive labs from the makers of Burp Suite, and Burp Suite Community Edition is its free manual toolkit.
06 · FURTHER READING
Free guides and practice targets
- OWASP Top 10:2025 ↗The current list with a page per category, from A01 Broken Access Control to A10.top10.owasp.org
- WSTG: Testing for Insecure Direct Object References ↗The step-by-step method behind the authorization matrix.wstg.owasp.org
- OWASP Web Security Testing Guide ↗The full testing guide: the closest thing to a manual for this job.owasp.org
- ZAP baseline scan ↗Options, config file format and example output.zaproxy.org
- Secure cookie configuration (MDN) ↗Which cookie attributes to require, and why.developer.mozilla.org
- Content-Security-Policy header (MDN) ↗How CSP works and how to write a policy.developer.mozilla.org
- Session Management Cheat Sheet (OWASP) ↗The checklist to test login, logout and session expiry against.cheatsheetseries.owasp.org
- OWASP Juice Shop ↗A deliberately insecure web app to practice on legally.owasp.org
- PortSwigger Web Security Academy ↗Free online web security training with interactive labs.portswigger.net
07 · PRACTICE
Audit one product you are allowed to test
curl -I against the home page and fill in the header table. Write up your single worst finding in the report format from section five. If you find nothing, say so and list what you checked; that is also a result.08 · FAQ
Frequently asked questions
What is security testing in QA?
It is the part of testing that checks the product refuses what it should refuse: access to other users' data, weak sessions, unsafe inputs and missing protections such as security headers. QA engineers design these checks as repeatable test cases and report gaps for developers to fix.
What is the most important security test for a tester to write?
An authorization matrix that tests every role against every sensitive action, especially one user trying to reach another user's data. Broken Access Control is first in the OWASP Top 10:2025, and scanners cannot judge it because it depends on your business rules.
Is it legal to practice security testing?
Yes, on systems you own or have written permission to test, and on deliberately vulnerable practice apps such as OWASP Juice Shop. Testing other people's live systems without authorization can be illegal, even with good intentions.
What free tools do QA engineers use for security testing?
curl and browser developer tools for headers and cookies, the OWASP ZAP baseline scan for a passive sweep, and Burp Suite Community Edition for manual request inspection. Practice apps such as Juice Shop are free as well.
How is QA security testing different from DevSecOps?
QA security testing checks how the running application behaves: who can access what, how it handles bad input. DevSecOps focuses on the pipeline and supply chain: scanners, secret detection, signing and protecting the build system. A good team needs both.