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

Principle:0sec labs 0 Report Output

From Leeroopedia
Knowledge Sources
Domains Source_Code_Review, Reporting, Formatting
Last Updated 2026-10-30 00:00 GMT

Overview

Technique for formatting security review reports in multiple output formats (terminal, JSON, Markdown, HTML, SARIF, PDF) from a scan report for different consumption contexts.

Description

Report output is the principle that a security review system should produce reports in formats suitable for different consumers: terminal (for interactive CLI use), JSON (for programmatic consumption), Markdown (for documentation), HTML (for web dashboards), SARIF (for CI/CD integration per the OASIS SARIF v2.1.0 standard), and PDF (for formal reporting). A formatter registry dispatches to the appropriate formatter based on the --format flag. Each formatter takes a ScanReport from the agent loop and produces the formatted output.

Usage

Use this principle when designing a security review system that needs to integrate with diverse consumption contexts — CI/CD pipelines (SARIF), dashboards (HTML), documentation (Markdown), or formal reports (PDF).

Theoretical Basis

The formatter registry:

# Abstract model (NOT real implementation)
formatters = {
    "terminal": format_terminal,
    "json":     format_json,
    "md":       format_markdown,
    "html":     format_html,
    "sarif":    format_sarif,    # OASIS SARIF v2.1.0
    "pdf":      generate_pdf,
}

def format_report(scan_report, fmt):
    return formatters[fmt](scan_report)

SARIF (Static Analysis Results Interchange Format) is the standard for integrating security tools into CI/CD pipelines (GitHub Code Scanning, Azure DevOps). Each finding maps to a SARIF result with rule, location, and severity.

Related Pages

Implemented By

Page Connections

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