Great questions. For PDF generation, we use ScriptRunner’s built-in HTML rendering combined with a lightweight external service (wkhtmltopdf) running on our Jira DC infrastructure. The ScriptRunner job generates an HTML report with CSS styling matching our audit templates, then calls the PDF converter via local subprocess.
Scheduling Strategy and SOC2 Evidence Export:
We run the main evidence collection job weekly on Saturday nights at 2 AM. This timing ensures zero business hour impact while maintaining fresh audit trails. The job takes approximately 12 minutes to process our 500+ test cases, generate traceability matrices, and export formatted reports to our compliance file share.
For SOC2 evidence export specifically, we create three artifacts:
- Complete Traceability Matrix - CSV mapping every security control to test cases with execution status
- Executive Summary PDF - High-level coverage metrics, pass/fail trends, and gap analysis
- Detailed Evidence Package - Individual test execution reports with screenshots and logs
Xray Traceability Deep Dive:
The traceability magic happens through Xray’s requirement link types. We use custom link types ‘tests_control’ and ‘validates_requirement’ to create explicit connections. Our ScriptRunner job traverses these links bidirectionally - starting from control tickets to find tests, and from test executions back to requirements. This dual verification catches orphaned tests and unlinked controls.
Coverage Gap Analysis Implementation:
Beyond the basic gap detection I mentioned earlier, we implemented severity-based alerting. Critical controls (authentication, encryption, access management) trigger immediate Slack notifications if gaps exceed 30 days. Standard controls allow 60-day windows. The system also tracks gap trends - if a control repeatedly falls into gap status, it’s flagged for test suite improvement.
Performance-wise, we optimized the API calls by batching requests and caching requirement metadata. Initial runs took 45+ minutes, but after optimization we’re down to 12 minutes for our full dataset. The key was reducing individual REST calls and using bulk query endpoints where Xray supports them.
One lesson learned: maintain a separate ‘audit archive’ project in Jira where historical reports are attached to dated tickets. This creates an immutable audit trail that auditors love - they can see exactly what evidence existed at any point in time.
The entire solution runs autonomously now. Our compliance team receives weekly email summaries with the PDF attached, and they only intervene when gap alerts appear. Auditors have praised the continuous evidence approach versus our old ‘scramble before audit’ methodology.