Implementation:3641397194 wq Gpt6 Astra pentest desk
| Knowledge Sources | |
|---|---|
| Domains | Pentest, Reporting |
| Last Updated | 2026-10-26 14:00 GMT |
Overview
Concrete tool for recording an in-browser pentest engagement ledger — scope, assets, findings, and SHA-256-hashed evidence — and exporting it as a Markdown report, provided by the ColdBrew Zero workbench.
Description
The pentest-desk module is a browser IIFE that manages a pentest report ledger in the workbench page. It maintains an in-memory `book` object with title, in-scope/out-of-scope lines, assets, findings (with severity rank, impact, fix), and proofs (file name + SHA-256 hash). Evidence files are hashed client-side via `crypto.subtle.digest('SHA-256')`.
The `manuscript()` function assembles the full ledger into a structured Markdown report. Users can copy the report to the clipboard or download it as a timestamped `.md` file. The module exposes `window.ColdCoffeePentest.arm()` to activate the desk from the toolbox navigation.
Usage
- Pentest report recording: arm the pentest desk from the toolbox, then record scope, assets, findings, and evidence as you work.
- Evidence integrity: attach proof files; their SHA-256 hashes are computed and recorded in the report.
- Report export: copy the assembled Markdown to clipboard or save as a `.md` file with a timestamped name.
Code Reference
Source Location
- Repository: ColdBrew Zero
- File: desktop/src/workbench/pentest-desk.js
- Lines: 1-192
Signature
// Browser global set when #pentest-desk is present:
window.ColdCoffeePentest = {
arm(): void // activate the pentest desk
}
// Internal ledger model:
const book = {
title: string,
inside: string, // in-scope lines
outside: string, // out-of-scope lines
assets: [{ name, where, note }],
finds: [{ title, rank, affect, fix }],
proofs: [{ note, file, hash }], // hash = SHA-256 hex
armedAt: string
};
function manuscript() -> string // assembles Markdown report
function digest(file: File) -> Promise<string> // SHA-256 hex
Import
// Browser-only IIFE; loaded via <script> on the workbench page.
// No module export — interacts via window.ColdCoffeePentest.
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| book.title | string | No | Engagement title (input field) |
| book.inside | string | No | In-scope targets (textarea, newline-separated) |
| book.outside | string | No | Out-of-scope targets (textarea, newline-separated) |
| assets | array | No | Asset entries { name, where, note } |
| finds | array | No | Finding entries { title, rank, affect, fix } |
| proofs | array | No | Evidence entries { note, file, hash } |
Outputs
| Name | Type | Description |
|---|---|---|
| manuscript returns | string | Structured Markdown report (title, scope, assets, findings, evidence) |
| download | File | Timestamped pentest-desk-YYYYMMDD-HHMM.md via Blob download |
| clipboard | string | Report text copied to navigator.clipboard |
Usage Examples
Arm and Record a Finding
<!-- The workbench page provides these elements; arm via the toolbox nav -->
<script>
// Arm the pentest desk (called from toolbox navigation):
window.ColdCoffeePentest.arm();
// User then types into #pentest-title, #pentest-in, #pentest-out,
// and clicks #pentest-find-add to record findings.
</script>
Hash an Evidence File
// Internal: called when a proof file is attached
async function digest(file) {
const bytes = await file.arrayBuffer();
const hash = await crypto.subtle.digest('SHA-256', bytes);
return [...new Uint8Array(hash)]
.map((b) => b.toString(16).padStart(2, '0'))
.join('');
}
// The hash is stored in book.proofs and rendered in the report:
// - note · filename · SHA-256 <hash>
Export the Report
// Copy to clipboard:
document.getElementById('pentest-sheet-copy').click();
// Download as .md:
document.getElementById('pentest-sheet-save').click();
// Downloads: pentest-desk-20261026-1430.md