Back to skills
SKILL.md
Pentest Report
ASecurityReport writing: finding structure, severity, impact, remediation
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added November 29, 2026
Works with
Security analysis
92/100- Installs packages at runtime which could introduce malicious dependencies
- Installs packages at runtime which could introduce malicious dependencies
npx -y skills add blackfoxxx/kestrel --skill pentest-report --agent claude-codeAre you the author of Pentest Report?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/blackfoxxx-pentest-report)---
name: "pentest-report"
description: "Report writing: finding structure, severity, impact, remediation"
mcps: autopen, pentest mcp
---
# Ahmed Jasem - Pentest Report Build Pipeline
You are building penetration testing reports for Ahmed Jasem, Cybersecurity Consultant. Ahmed operates at OSCP/CCISO level. Never oversimplify. Every report is a client-ready, authoritative deliverable that represents Ahmed Jasem's credibility as a cybersecurity consultant.
---
## 1. Pipeline Overview
All reports are built as `.docx` files using a **Node.js + `docx` npm library** build pipeline. The pattern is always:
1. Read and parse the source (markdown, JSON, PDF, raw notes, tool output, or a mix)
2. Write `helpers.js` (shared palette + component library) and `build.js` (assembly) in `/home/claude/build_<engagementslug>/`
3. Run `node build.js` - output goes to `/home/claude/<slug>_pentest_report.docx`
4. Validate: Python zipfile scan for em/en-dashes, LibreOffice headless convert to PDF, PyMuPDF spot-check key pages
5. Deliver via `SendUserFile`
If a previous `helpers.js` already exists in this session (check `/home/claude/build_*/helpers.js`), copy it. Never rewrite helpers from scratch if one is available.
---
## 2. Build Environment Setup
```bash
mkdir -p /home/claude/build_<slug>
cp /home/claude/build_<prior>/helpers.js /home/claude/build_<slug>/helpers.js # if exists
cd /home/claude/build_<slug> && npm init -y && npm install docx
```
Verify helpers exports before writing build.js:
```bash
node -e "require('./helpers.js')" && echo ok
grep -A5 'module.exports' helpers.js
```
---
## 3. helpers.js - Palette and Components
The canonical helpers.js exports these - always verify what is actually exported before referencing in build.js:
**Palette constants:** `NAVY` (1B2A4A), `BLUE` (2E4E8C), `LB` (D6E4F0), `G` (F2F4F8), `MUTE` (666666), `W` (FFFFFF), `D` (2C2C2C)
**Severity color map:** `SEV = { CRITICAL: "7B0D0D", HIGH: "C0392B", MEDIUM: "D4700A", LOW: "1A7A3A", INFO: "4A6080" }`
**Font:** `FONT = "Calibri"`, size 21pt body, 19pt table cells
**Typography helpers:**
- `h1(text)` - NAVY, bold, 30pt, bottom border, spacing before:400 after:200
- `h2(text)` - BLUE, bold, 25pt, spacing before:320 after:160
- `h3(text)` - NAVY, bold, 22pt, spacing before:240 after:120
- `bd(text_or_runs_array, opts)` - body paragraph, spacing after:160, line:276
- `gp(size)` - gap paragraph, spacing after:size (default 120)
- `pgb()` - page break paragraph
**Content helpers:**
- `cd(lines_array)` - monospace code block rendered as a shaded table; pass an array of strings, one line per element
- `bullet(runs_array)` - bulleted list paragraph; ALWAYS pass an array of TextRun objects, never plain strings
- `note(text)` - shaded advisory/note box paragraph
- `findingTitleBar(id, title, severity)` - colored banner paragraph using SEV color map
**Table cell helpers:** `tc(text)`, `hc(text)` (header cell), `ir(text)` (italic right-aligned)
**Inline parser:** `pbd(text)` parses backtick code spans and **bold** markers into mixed TextRun arrays
**Local helpers to define in build.js** (NOT in helpers.js - write these fresh each time):
```js
function run(text, opts = {}) {
return new TextRun({ text, font: FONT, size: 21, color: D, ...opts });
}
function table(rows, colW) { /* NAVY header row, alternating body rows */ }
function fieldTable(rows) { /* 2-col label/value, shaded left column */ }
function sevBadge(sev) { /* inline severity badge with background fill */ }
```
---
## 4. Report Structure
Every report follows this section order. Adjust depth to match the engagement.
### Section 1 - Cover Page
Table (22%/78% columns):
- Report Title (NAVY, bold, AllCaps), engagement subtitle (italic, MUTE)
- Rows: Target, Scope, Assessment Type, Assessment Period, Report Date, Prepared By, Classification, Version, Total Findings
- CONFIDENTIAL label + restriction notice at bottom
- End with `pgb()`
### Section 2 - Document Control
- Version history table, Distribution list table
- Legal disclaimer (3 paragraphs: confidentiality, scope of testing, PoC evidence handling)
- End with `pgb()`
### Section 3 - Executive Summary
1. What was tested, how (black/grey/white box), when - plain language
2. Overall posture verdict + 2-3 specific top risks + live-execution note if applicable
- Risk Summary table: Severity / Count / Immediate Action
- Top Priority Actions: bulleted list (use `bullet([run(...)])`, never plain strings)
- `note()` box if any findings had real financial or data impact validated live
- End with `pgb()`
### Section 4 - Scope and Methodology
- In-Scope Assets table (Asset / Type / Notes)
- Testing Type paragraph, Methodology paragraph + 5 phased bullets
- Tools Used table (Category / Tools)
- End with `pgb()`
### Section 5 - Findings Summary
Full findings table: ID / Title / Severity / CVSS / OWASP / Status
- Sort: Critical first, then High, Medium, Low, Informational
- End with `pgb()`
### Section 6 - Detailed Findings
For each finding, `dBlock(f)` renders:
1. Colored severity banner
2. `fieldTable`: Severity / CVSS v3.1 / CWE-OWASP / Affected Asset(s) / Status
3. Description heading + paragraphs (first-person past tense)
4. Proof of Concept / Evidence heading + `cd(lines)` code block
5. Impact heading + paragraphs (business/financial/regulatory)
6. Remediation heading + numbered `bullet()` items
### Section 7 - OWASP Top 10 Mapping
Table: OWASP Category / Findings / Status - all 10 categories, show clean ones too.
### Section 8 - Remediation Priority Matrix
Table: Priority / Finding / Effort / Impact / Timeline
Buckets: Immediate (0-7 days), Short-term (1-4 weeks), Medium-term (1-3 months), Long-term (3+ months)
### Section 9 - Conclusion
1. Platform risk posture verdict (cite finding IDs and live-execution facts)
2. Pattern analysis (what class of failures dominates)
3. Recommendation (halt/proceed/retest guidance)
### Section 10 - Appendices
Appendix A: CVSS v3.1 Score Breakdown, Appendix B: Methodology Coverage Matrix, Appendix C: Glossary
---
## 5. Hard Pipeline Rules
**NO em-dashes (U+2014) or en-dashes (U+2013) anywhere.** Use plain hyphen (-) everywhere. After every build, verify:
```bash
python3 -c "
import zipfile
with zipfile.ZipFile('/home/claude/<output>.docx') as z:
xml = z.read('word/document.xml').decode('utf-8', errors='ignore')
em = xml.count(chr(0x2014)); en = xml.count(chr(0x2013))
print(f'em: {em}, en: {en}')
"
```
If any are found, replace them in build.js and rebuild.
**First-person past tense** throughout all findings: "We identified", "We observed", "Testing confirmed"
**No unverified findings claimed as confirmed.** Flag evidence gaps to AJ before building. Exception: if AJ has already reviewed and explicitly instructed to build as stated, proceed.
**Source severity tiers are preserved.** If source labels CVSS 8.8 as Critical, keep it.
**Duplicate findings** from tool noise: consolidate into one, keep strongest evidence, note instance count.
---
## 6. Special Report Types
### Retest / Regression Report
- Regression Table: Finding ID / Original Severity / Retest Result (RESOLVED / PARTIAL / OPEN / REGRESSED)
- Still-Open Findings: abbreviated detail
- New Findings Discovered During Retest: full detail
- Roll-up summary with color-coded status badges
### Merged / Combined Report (Phase 1 + Phase 2)
- Cover subtitle: "Combined Report - Phase 1 [desc] and Phase 2 [desc]"
- Executive summary split into Phase 1 and Phase 2 sub-sections
- Each phase's findings as separate h1 sections
- By-Design Verdicts table and Verified Secure Controls table if source has them
### Dual Deliverable
- Two separate docx files: summary (executive-focused) + detailed (full technical depth)
- Cross-reference finding IDs consistently between documents
### Validation / Third-Party Review
- Part A: Own findings (full detail)
- Part B: Third-party findings with verdict (CONFIRMED / PARTIAL / REFUTED)
- Part C: Divergence analysis, Part D: Combined remediation priority list
- Never merge Part A and Part B into a single findings list
---
## 7. Writing Style Rules
**Technical precision:** Name exact endpoint, parameter, field, code path.
**Human-written tone:** Reads like a senior pentester who was there. Vary sentence structure. Describe what actually happened.
**Executive summary:** No jargon. Translate findings into business consequences (financial loss, data breach, regulatory fine).
**No filler:** No passive "It is recommended that..." - write directives: "Rotate the credential immediately."
**Evidence discipline:** Only claim confirmed if executed live with expected effect. Partial = say partial. Theoretical = say theoretical, don't assign CVSS vector.
**Positive controls:** Include Verified Secure Controls section when platform has well-implemented defenses.
**Client identity:** "Ahmed Jasem - Cybersecurity Consultant" by default in Prepared By. If the engagement is delivered under a named client team (e.g., TTech SecTeam), use their name instead. Strip TLP markings unless AJ says to keep them.
---
## 8. CVSS v3.1 Reference
| Score | Severity | Color |
|-------|----------|-------|
| 9.0 - 10.0 | Critical | 7B0D0D |
| 7.0 - 8.9 | High | C0392B |
| 4.0 - 6.9 | Medium | D4700A |
| 0.1 - 3.9 | Low | 1A7A3A |
| 0.0 | Informational | 4A6080 |
Common vectors:
- Unauth RCE / full secret: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H = 9.8
- Auth bypass / ATO: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N = 9.1
- BOLA/IDOR (low priv): AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N = 8.1
- Stored XSS (session hijack): AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N = 8.7
- CSRF (state-changing): AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N = 6.5
- Rate limit bypass: AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N = 3.7
- Missing DMARC/SPF: 0.0 (Informational)
Always include the full vector string in finding metadata, not just the score.
---
## 9. Validation and Delivery
```bash
# Build
cd /home/claude/build_<slug> && node build.js
# Em/en-dash check - must return 0,0
python3 -c "
import zipfile
with zipfile.ZipFile('/home/claude/<slug>_pentest_report.docx') as z:
xml = z.read('word/document.xml').decode('utf-8', errors='ignore')
em = xml.count(chr(0x2014)); en = xml.count(chr(0x2013))
print(f'em: {em}, en: {en}')
"
# PDF conversion + page count
soffice --headless --convert-to pdf /home/claude/<slug>_pentest_report.docx
# Visual spot-check
pip install pymupdf --break-system-packages -q
python3 -c "
import fitz
doc = fitz.open('/home/claude/<slug>_pentest_report.pdf')
print(f'Pages: {len(doc)}')
for pg in [0, 3, 10, len(doc)//2]:
doc[pg].get_pixmap(dpi=100).save(f'/tmp/check_p{pg+1}.png')
"
# Read the PNGs to visually confirm layout
```
---
## 10. Common Errors and Fixes
**`run is not a function`** - `run()` is NOT exported from helpers.js. Define locally in build.js:
```js
function run(text, opts = {}) {
return new TextRun({ text, font: FONT, size: 21, color: D, ...opts });
}
```
**`bullet()` text vanishes** - Never pass plain strings to `bullet()`. Wrap in `run()`:
```js
// WRONG: bullet(["Total: ", run("8", {bold:true})])
// RIGHT: bullet([run("Total: "), run("8", {bold:true})])
```
**Missing sections** - After writing all section arrays, verify every one appears in the final `Document` children array. Count h1() calls vs spreads in the children array.
---
## 11. Memory Logging
After every delivered report, append to `/areas/pentest-reports.md` in memory:
```
- [stated] Completed report: <Name> (<slug>). <Count> (<C/H/M/L/I>), overall risk <level>. <Most significant finding>. <Any pipeline decisions worth remembering>.
```
Read the file first to get the version token, then use `mcp__memory__memory_append`.Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.