security-report-builder
# Security Report Builder
What this skill does
# Security Report Builder
**Version:** 1.2.0
**Category:** Security, Reporting, Documentation
**Author:** Security Team
## Overview
Professional security report generator that transforms raw plugin security scanner results into executive-ready reports. Produces HTML, PDF, and DOCX formats with intelligent false positive filtering and context-aware risk assessment.
## Key Features
### ๐ฏ Context-Aware Analysis
- Reduces false positive rate from 85-90% to <20%
- Intelligent severity adjustment based on code context
- Taint analysis to identify real user input risks
- Plugin type detection (web UI vs CLI plugins)
### ๐ Multiple Output Formats
- **HTML**: Interactive dashboard with modern dark theme
- **PDF**: Professional print-ready reports with branding
- **DOCX**: Editable Microsoft Word documents for collaboration
### ๐ Framework Integration
- MITRE ATT&CK technique mapping
- MITRE ATLAS (ML security) coverage
- OWASP Top 10 alignment
- CWE weakness classification
### ๐ Risk Assessment
- Context-adjusted risk scoring
- Per-plugin and overall risk levels
- Actionable prioritization
- Executive summary generation
## Installation
```bash
# Install dependencies
pip install -r security-report-builder/requirements.txt
# Core dependencies:
# - jinja2>=3.1.0 (HTML templating)
# - weasyprint>=60.0 (PDF generation)
# - python-docx>=1.1.0 (DOCX generation)
# - pandas>=2.0.0 (data analysis)
# - numpy>=1.24.0 (statistics)
```
## Usage
### Basic Usage
```bash
# Generate all formats (HTML, PDF, DOCX)
python3 security-report-builder/scripts/generate_report.py \
--input plugin-security-checker/archive_scan_results/ \
--output reports/ \
--formats html,pdf,docx
# Generate HTML report only
python3 security-report-builder/scripts/generate_report.py \
--input scan_results.json \
--output report.html \
--format html
# Generate PDF with minimum severity HIGH
python3 security-report-builder/scripts/generate_report.py \
--input results/ \
--output report.pdf \
--format pdf \
--min-severity HIGH
```
### Advanced Usage
```bash
# Executive summary template (1-2 pages)
python3 security-report-builder/scripts/generate_report.py \
--input results/ \
--output executive_report.pdf \
--format pdf \
--template executive \
--min-severity HIGH
# Technical deep dive (full details)
python3 security-report-builder/scripts/generate_report.py \
--input results/ \
--output technical_report.html \
--format html \
--template technical
# Compliance audit report
python3 security-report-builder/scripts/generate_report.py \
--input results/ \
--output compliance_report.docx \
--format docx \
--template compliance
# Custom branding
python3 security-report-builder/scripts/generate_report.py \
--input results/ \
--output reports/ \
--formats html,pdf,docx \
--branding custom_branding.json
# Disable false positive filtering
python3 security-report-builder/scripts/generate_report.py \
--input results/ \
--output raw_report.html \
--format html \
--no-filter
```
## Configuration
### Report Templates
Edit `config/report_config.json` to customize report structure:
- **Executive**: High-level for C-suite (1-2 pages)
- **Technical**: Detailed for engineers (10-50 pages)
- **Compliance**: Regulatory alignment (5-15 pages)
### Severity Rules
Edit `config/severity_rules.json` to adjust context-aware filtering:
```json
{
"innerHTML": {
"patterns": [
{
"pattern": "innerHTML\\s*=\\s*['\"]\\s*['\"]",
"adjusted_severity": "INFO",
"reason": "Clearing content - safe operation"
}
]
}
}
```
### Branding
Edit `config/branding.json` for custom appearance:
```json
{
"company_name": "Your Organization",
"logo_path": "/path/to/logo.png",
"primary_color": "#6366f1",
"secondary_color": "#8b5cf6",
"footer_text": "Confidential - Internal Use Only"
}
```
## Input Format
The plugin expects JSON files from `plugin-security-checker` with this structure:
```json
{
"metadata": {
"plugin_name": "example-plugin",
"scan_date": "2025-10-29T10:30:00",
"scanner_version": "3.0.0"
},
"findings": [
{
"severity": "CRITICAL",
"category": "XSS",
"description": "Potential cross-site scripting vulnerability",
"code_snippet": "element.innerHTML = userInput;",
"cvss_score": 9.1,
"att&ck_techniques": ["T1059.006"],
"owasp_categories": ["A03:2021-Injection"],
"cwe_ids": ["CWE-79"]
}
],
"summary": {
"total_findings": 10,
"risk_score": 300,
"risk_level": "CRITICAL"
}
}
```
## Output Examples
### HTML Report Features
- Interactive dashboard with search/filter
- Dark theme with gradient accents
- Collapsible sections
- Severity distribution charts
- Responsive design (mobile-friendly)
- Print-optimized CSS
### PDF Report Features
- Professional layout (A4/Letter)
- Page numbers and headers/footers
- Table of contents
- Company branding (logo, colors)
- Print-ready quality
- Vector graphics support
### DOCX Report Features
- Microsoft Word format (.docx)
- Editable sections
- Styled headings and tables
- Track changes compatible
- Comments support
- Professional typography
## Report Sections
### 1. Executive Summary
- Overall risk level and score
- Key statistics
- Business impact assessment
- Top 10 critical findings
- Recommended actions
### 2. Key Statistics
- Total plugins analyzed
- Findings by severity (CRITICAL/HIGH/MEDIUM/LOW)
- Findings by category
- Scan date range
### 3. Top Risky Plugins
- Plugin name and risk score
- Number of findings (total and by severity)
- Risk level classification
- False positive count
### 4. Critical Findings
- Detailed description
- Code snippets
- Plugin context
- Framework mappings (ATT&CK, OWASP, CWE)
- Remediation recommendations
### 5. Framework Analysis
- MITRE ATT&CK coverage (techniques and tactics)
- MITRE ATLAS coverage (ML security)
- OWASP Top 10 alignment
- CWE weakness distribution
### 6. False Positive Analysis
- Original vs. adjusted findings
- Context-aware filtering results
- Severity adjustments
- False positive rate
## Context-Aware Features
### innerHTML Detection
- `innerHTML = ''` โ INFO (safe clearing)
- `innerHTML = static HTML` โ LOW (best practice: use textContent)
- `innerHTML = template` โ MEDIUM (verify escaping)
- `innerHTML = userInput` โ CRITICAL (real XSS risk)
### eval() Detection
- `eval('static string')` โ MEDIUM (code smell)
- `eval(userInput)` โ CRITICAL (code execution risk)
### File Operations
- `readFile('/static/path')` โ LOW (safe)
- `readFile(userPath)` โ CRITICAL (path traversal risk)
### Plugin Type Context
- Web UI plugins: Expected to use DOM manipulation (reduced penalties)
- CLI plugins: DOM usage is suspicious (increased severity)
## Integration with Plugin Security Checker
```bash
# Step 1: Scan plugins
python3 plugin-security-checker/scripts/scan_plugin.py \
my-plugin/ \
--output scan_results.json
# Step 2: Generate report
python3 security-report-builder/scripts/generate_report.py \
--input scan_results.json \
--output report.html \
--format html
```
## Performance
- **Parsing**: ~1,000 plugins/second
- **Analysis**: ~500 findings/second
- **Report Generation**:
- HTML: <5 seconds for 1,000 plugins
- PDF: <15 seconds for 1,000 plugins
- DOCX: <10 seconds for 1,000 plugins
## Troubleshooting
### WeasyPrint Installation Issues
```bash
# macOS
brew install python3 cairo pango gdk-pixbuf libffi
pip install weasyprint
# Ubuntu/Debian
sudo apt-get install python3-dev python3-pip python3-cffi python3-brotli \
libpango-1.0-0 libpangoft2-1.0-0 libcairo2
pip install weasyprint
# Windows
pip install weasyprint
# May require additional system dependencies
```
### Missing Framework Mappings
If framework mappings are not found:
```bash
# Copy from plugin-security-checker
cp plugin-security-checker/references/threat_mappings.json \
security-report-builder/references/framework_mappingRelated in Security
mac-ops
IncludedComprehensive macOS workstation operations โ diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.