/projects

Pentmax

From Scope to Sign-off. A self-hosted penetration-test lifecycle and reporting platform for solo testers and small teams.

Kind
application
Language
Go · TypeScript
Version
pre-release
License
not yet chosen
Status
in development

Pentmax is a self-hosted web application that carries a penetration test from scope to sign-off: scoping, authorization, testing, findings, reporting, delivery, remediation and retest. It is built for solo testers and small teams of one to ten people.

The problem#

A pentest platform holds the most sensitive data a client will ever hand over: confirmed vulnerabilities, working exploit paths, test credentials, screenshots of internal systems. In a small team that data is rarely in one place. Findings sit in a reporting tool, the scope in a spreadsheet, the authorization in an email or in someone’s memory of a phone call, and the client’s credentials in a messenger.

The existing tools are good at their part. SysReptor and WriteHat handle findings and reports, Ghostwriter adds project and infrastructure management, Dradis and PlexTrac add tool imports and client collaboration. The incidents happen in the gaps between them: testing a host that was never in scope, starting before anyone agreed to it, a client credential that still works a year after the engagement ended. None of these is a hard technical problem. They are bookkeeping failures, and bookkeeping is what software should do for us.

Pentmax is meant to be one system of record for the whole engagement.

What it does#

The features below follow the order of an engagement. Everything listed is built and tested in the current development build unless it is marked planned with its milestone.

Scoping and authorization#

  • Clients, contacts and engagements, each engagement with an assigned team and a responsible owner.
  • Typed scope: domains (including wildcards), IP addresses, CIDR and IP ranges, URLs, APIs, mobile apps and cloud accounts, marked in or out of scope, with ports. Overlapping in/out entries are flagged, and a CSV import shows a dry-run preview and applies all lines or none.
  • Scoping questionnaires that the client fills in through the portal. A tester reviews the answers before any of them become scope items.
  • Authorization records of four types: signed document, email, verbal or other, with who granted it, when, and for how long. A document is optional for every type, because a written note of a phone call is better evidence than nothing.
  • Testing windows and emergency contacts for every engagement.
  • A guided lifecycle: Draft → Scoping → Ready → Testing → Reporting → Delivered → Remediation ⇄ Retest → Closed. Moving forward with something missing (no authorization, outside the testing window, no emergency contact) raises warnings that must be acknowledged with a reason, and the acknowledgement lands in the engagement timeline and the audit log.

Testing and findings#

  • Findings in Markdown with a live preview. Affected assets are checked against the scope on every save, and an out-of-scope asset needs an acknowledged warning.
  • CVSS 3.1 and 4.0 calculator whose scores are tested against FIRST’s official calculators. Severity follows the score; a manual override is flagged and needs a reason.
  • Evidence: paste a screenshot or upload a file. The original is kept byte for byte with its SHA-256 hash, and images are only displayed after the server has decoded and re-encoded them, so a crafted file can’t run in the tester’s browser.
  • Finding library with one translation per language. A finding is a copy of the library entry, so editing the library never silently changes a finding that is already in a report.
  • Optional peer review: when switched on, a finding becomes final only after someone who never edited it approves it. Final findings are locked; reopening one needs a reason.
  • Planned (M7): methodology checklists, permission-scoped full-text search, import from Burp, Nessus and Nmap, and a pentmax command-line client with API tokens for pushing findings and evidence from the terminal.

Reporting#

  • PDF reports from versioned Typst templates. The built-in English template has a cover, management summary, risk overview, scope, methodology, findings and an optional authorization appendix, with bookmarks and syntax-highlighted code blocks.
  • Custom templates uploaded by admins as ZIP packages. Each upload is checked for dangerous template code, becomes an immutable version and can be previewed with sample data.
  • Localization built in: every fixed string in a template comes from a per-language catalog, so adding a report language needs translations, not code.
  • Immutable report versions, numbered and stored with the SHA-256 hash of the PDF and of the input data. The same input and template always produce the same file, so a delivered report can be proven unchanged.
  • Planned (M7): DOCX export from the same data.

Client portal and delivery#

  • A separate portal for client users, joined through a single-use invitation link that expires after 72 hours.
  • Credential vault: the client hands over test credentials through the portal instead of a messenger. Each secret is encrypted with its own key. Revealing one requires the tester to re-enter their password and second factor; every reveal is audited, and the secret hides itself after 30 seconds. Secrets are destroyed when the engagement closes or at an expiry date.
  • Report delivery: the team publishes final report versions to the portal and can withdraw them with a reason. Every download, internal or client-side, is recorded with the user and the hash of the exact file served.

Remediation and retest (planned, M6)#

  • Remediation status per finding: open, fix reported, retest pending, then resolved, not resolved or risk accepted. Clients can report fixes from the portal.
  • Retests with their own scope and per-finding results, guarded by the same warnings as the first test.
  • Retest reports that reference the hash of the original report version.

Accounts, data protection and operations#

  • Three roles: admin, pentester (only engagements they are assigned to) and client (portal only).
  • Mandatory multi-factor authentication for every account: TOTP apps or WebAuthn security keys, plus single-use recovery codes. Passwords are hashed with Argon2id and checked against a bundled list of breached passwords, without any outbound call.
  • Re-authentication before sensitive actions such as revealing a vault secret or purging an engagement.
  • Encrypted file storage with key rotation. Deleting an engagement crypto-shreds its files: their keys are destroyed, so the remaining ciphertext is unreadable even before it is swept from disk.
  • Tamper-evident audit log with a command-line verifier.
  • Planned (M8): scheduled retention and purge, encrypted backup with a restore drill tested in CI, and an internal penetration test of Pentmax itself before the first release.

What it will not do#

  • Touch client targets. Pentmax never scans, exploits or sends any traffic to a target. It is a system of record, not a testing tool.
  • Run as multi-tenant SaaS. One organization per instance, by design.
  • Send findings to third-party AI services. That conflicts with the confidentiality the whole tool exists to protect.
  • Offer enterprise RBAC. Three roles are enough for teams of one to ten, and every extra role multiplies the access combinations that have to be tested.
  • Handle invoicing or sales. Out of scope.

Design principles#

Each principle starts from a risk, and each one has a cost that I accept on purpose.

Records have to stay true. Hard workflow gates (“no testing without a signed authorization letter”) get worked around: people upload an empty PDF or last year’s letter to make the button work, and the record now says something false. So Pentmax never blocks a risky step. It raises warnings that must be acknowledged with a written reason, and the acknowledgement goes into the audit log. A verbal “go ahead” is a first-class record with the person who gave it and the time. Cost: Pentmax documents unauthorized testing instead of preventing it. That is a written, accepted risk.

Finding content is hostile by design. Pentesters paste real payloads into findings: script tags, template injection strings, SQL. Every layer treats that content as data, never as code. Markdown in the UI goes through a restricted pipeline under a strict Content Security Policy (CSP, the browser-enforced list of what a page may load and run). Report data reaches the PDF engine as JSON and is never concatenated into template source. The renderer runs in its own container with no network, a read-only filesystem and resource limits. Cost: report templates are written in Typst rather than HTML, so template authors have to learn a new language.

Cross-client data leaks are the worst failure. The most damaging bug this application could have is showing client A’s findings to someone working for client B. That bug class is IDOR (insecure direct object reference): the server returns an object because the request named it, without checking that the requester may see it. The defenses are structural, not “remember to check”: access is filtered inside the SQL query, a foreign object answers 404 exactly like a missing one, a route without an authorization policy fails the build, and a generated test runs every role against every route. The client portal is a separate API that only returns explicitly allow-listed fields, so a new internal field cannot leak to clients by accident.

The audit log has to survive a hostile insider. Entries are hash-chained, database triggers block UPDATE and DELETE, the application’s database account can only INSERT and SELECT on that table, and a verify command checks the chain.

Less to attack, less to misconfigure. The server is one static Go binary with the UI embedded, running in a distroless, non-root, read-only container: no interpreter, no package manager, no shell. One Docker Compose file, secure defaults without tuning, no default credentials (the first admin is created from the command line on the server). Multi-factor authentication is mandatory for every account and blocks the first release. Cost: without a framework like Django, I write and test the security plumbing (sessions, CSRF protection, validation) myself.

Every non-trivial decision is written down as an Architecture Decision Record (ADR: a short document with one decision, its context and its consequences), compromises included. A compromise that isn’t written down quietly becomes the default.

Stack#

AreaChoiceWhy
BackendGo, one static binary with the web UI embeddedMinimal runtime and supply chain, static types for the authorization layer
Data accesssqlc: hand-written SQL compiled into typed queriesEvery query is parameterized, access filters are visible in the SQL
DatabaseMySQL 8.4 LTSWhat small hosting setups already run and back up
FrontendReact + TypeScript, API client generated from OpenAPI 3.1The spec is the contract; client and server can’t drift apart
PDF reportsTypst in an isolated renderer container with no networkNo browser engine processing XSS payloads
DeploymentSelf-hosted, one organization per instance, Docker ComposeThe isolation boundary between customers is the deployment, not my code
AuthenticationArgon2id passwords plus mandatory TOTP or WebAuthnAdmins see every engagement, so every account is worth stealing

Accepted risks#

  • Soft gates record unsafe shortcuts rather than stop them.
  • Admins see all engagements. Realistic for small firms, but it makes an admin account a high-value target; mandatory MFA is the main mitigation.
  • Finding text is not encrypted at the application level, so it stays searchable and renderable. Disk encryption is a documented requirement for the operator.

Status#

Under active development and not released. Don’t put real client data into any build until the release criteria are met.

MilestoneContent
M0Foundation: tooling, server, database, frontend, containers, CI
M1Identity, access control, audit log
M2Clients, engagements, scope, encrypted file storage, lifecycle
M3Findings, CVSS, evidence, finding library, review
M4PDF reporting (MVP feature-complete)
M5MFA, client portal, questionnaires, credential vault, report delivery
M6Remediation and retest
M7DOCX export, API tokens and CLI, tool import, checklists
M8Retention, backup and restore, self-assessment

The source code will be published under an open source license. Until then, the devlog below follows the build one milestone at a time.

Devlog · milestones

full series →
  1. Pentmax devlog #0: planning before the first line of code phase 0