Report structure and retest: from a finding to a closed defect
A report is made of separate parts for two audiences: management and developers. Management gets a one-page executive summary, developers get findings with reproduction steps and recommendations; scope, method and evidence go in separate sections. Retest is separate work: check that the original scenario is closed, a bypass of the fix does not work, and neighbouring places with the same flaw are fixed.
Pentest · Report
An 80-page report and the developer still does not know what to fix. What is wrong with it?
A report has two different audiences. Management needs a conclusion, scale and a decision. The developer needs how to reproduce and how to fix. One big text does not suit both, so a report is made of separate parts. Public reports, such as those Cure53 publishes at its customers' request, are usually short and without extra charts, and the main thing in them is concrete findings.
Mechanism: the parts of a report.
- Executive summary — one page: what was tested, the overall picture, 2–3 key risks in business language;
- Scope and method — what exactly was in scope, when, which techniques and limits;
- Findings — by severity, in a common template;
- Recommendations — what to do first and why;
- Appendices — evidence, full requests and responses, versions.
One finding in a template
Title IDOR in GET /api/orders/{id}
Severity High, CVSS-B 7.1
Steps log in, replace the id with another
Impact reading others' orders
Fix server-side owner check
Evidence request and response in the appendix
Retest is separate work, not a formality. After the fix three things are checked:
- the original scenario no longer works;
- a bypass of the fix does not work (another way, another case, another endpoint);
- neighbouring places with the same mistake are fixed too (other endpoints with
{id}).
The life of a finding
Example. The fix added an owner check in /api/orders/{id}. Retest: a request with another id returns 403 (the original scenario is closed); the same id in /api/orders/{id}/invoice still returns data (a neighbouring endpoint). The finding is reopened with a clarification.
Limits. A retest does not guarantee that there are no new mistakes: it checks only what was found. New versions still need regular testing, and for frequent releases the retest is built into the regression as an automatic check.
Common mistakes:
- writing the report in the tool's language (scanner output) instead of describing the impact;
- severity without justification: a developer cannot argue with a number without a vector;
- closing a finding on the answer "fixed": without a retest it is unknown whether it is;
- putting real customer data into the evidence: mask it.
Check yourself
A developer fixed an XSS by removing the <script> tag from the input. What do you check in the retest besides the original payload?
Answer
Other ways to run code: an attribute with an event, <img>, another case, another output context. Removing one tag is a blacklist, and it can be bypassed. The fix should be output encoding.