Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xSteph Pentest ai build engagement submissions

From Leeroopedia
Knowledge Sources
Domains Security_Testing, Bug_Bounty
Last Updated 2026-10-23 12:00 GMT

Overview

Concrete submission builder that renders platform-ready Markdown reports for an engagement's verified findings, sorted by severity, with reproducible curl PoCs, CVSS/CWE, impact, and remediation.

Description

build_engagement_submissions renders one Markdown submission file per finding, highest-severity first. Each submission includes:

  • Reproducible curl repro: The HTTP request as a curl command
  • CVSS/CWE: Severity score and CWE mapping
  • Impact: What an attacker can achieve
  • Remediation: How to fix it
  • Machine verdict: The oracle-verified verdict and receipt

When verified_only is True (default), only findings with verdict="verified" are included — candidates are noise for a bounty submission. This is the "no proof, no submission" contract.

Usage

Import this when you need to:

  • Generate platform-ready submissions for bug-bounty findings
  • Render findings as Markdown reports with curl PoCs

Code Reference

Source Location

  • Repository: pentest-ai
  • File: engine/bounty/submission.py

Signature

def build_engagement_submissions(
    findings: list[dict[str, Any]],
    engagement: dict[str, Any] | None = None,
    platform: str = "hackerone",
    verified_only: bool = True,
) -> list[tuple[str, str]]:
    """Render submissions for an engagement's findings.
    Returns list of (slug, markdown) tuples, highest-severity first."""

Import

from engine.bounty.submission import build_engagement_submissions

I/O Contract

Inputs

Name Type Required Description
findings list[dict[str, Any]] Yes Findings from the engagement
engagement None No Engagement record
platform str No hackerone/bugcrowd/intigriti/yeswehack/generic (default: hackerone)
verified_only bool No Only verified findings (default: True)

Outputs

Name Type Description
returns (slug, markdown) per finding, highest severity first

Usage Examples

Generating Submissions

from engine.bounty.submission import build_engagement_submissions

findings = await db.get_findings(engagement_id="eng-123")
engagement = await db.get_engagement("eng-123")

submissions = build_engagement_submissions(
    findings=findings,
    engagement=engagement,
    platform="hackerone",
    verified_only=True,
)

for slug, markdown in submissions:
    with open(f"submissions/{slug}.md", "w") as f:
        f.write(markdown)
    print(f"Written: {slug}.md")

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment