Files
osmedeus/test/testdata/workflows/test-example-report.yaml
T
j3ssie f5840272c5 feat: add run cancellation, event enhancements, and performance optimizations
Major features:
- Add run registry for tracking active runs with PID management
- Add API-based run cancellation with process termination
- Add event trigger input vars syntax for multi-variable extraction
- Add filter_functions with utility function support in triggers
- Add event envelope injection for full event context in workflows
- Add write coordinator for batched database operations

API improvements:
- Add logout endpoint and diffs endpoints for assets/vulnerabilities
- Add step-results listing endpoint
- Update schedule model with target, workspace, params fields
- Change run_id to run_uuid across API responses

Performance:
- Add compiled JS program caching for 60-80% faster loop conditions
- Add parallel shard rendering for 20-40% faster workflow startup
- Add memory-mapped I/O for large file line counting
- Add efficient output buffer combining in runners
- Add mtime-based cache invalidation for workflow loader

Other changes:
- Rename trigger field from trigger to triggers in workflow YAML
- Disable pongo2 HTML autoescape for shell command templates
- Update JWT expiration default to 1440 minutes (1 day)
- Change CORS default to reflect-origin for credentials support
- Add source_type field to events (run, eval, api)
- Skip copying core Unix tools to external-binaries
2026-01-24 01:11:33 +08:00

148 lines
3.6 KiB
YAML

name: test-example-report
kind: module
description: Test example report with nested parallel steps with mixed types
tags: test,parallel,nested
params:
- name: target
required: true
reports:
- name: main-output
path: "{{Output}}/sub1.txt"
type: text
description: Main output file from the workflow
- name: http-json
path: "{{Output}}/http.json"
type: json
description: Structured JSON output
- name: markdown-report-report
path: "{{Output}}/reports/sample-markdown-report.md"
type: markdown
description: Markdown report output
steps:
- name: setup
type: bash
commands:
- mkdir -p {{Output}}/templates/
- 'echo "sub 1: {{target}}" > {{Output}}/sub1.txt'
- 'echo "sub 2: {{target}}" > {{Output}}/sub2.txt'
# Generate a summary report with just high-severity findings
- name: create-sample-repo-template
type: bash
command: |
cat > {{Output}}/templates/sample-markdown-report.md << 'EOF'
# Sample Repository Findings - {{TargetSpace}}
**Target**: {{Target}}
**Date**: {{TaskDate}}
```markdown
| ID | Name | Score |
| --- | --- | --- |
| 1 | Alice | 90 |
| 2 | Bob | 85 |
| 3 | Charlie | 88 |
```
---
*Report generated by Osmedeus {{Version}}*
EOF
- name: generate-sample-markdown-report
type: function
function: 'render_markdown_report("{{Output}}/templates/sample-markdown-report.md", "{{Output}}/reports/sample-markdown-report.md")'
# Generate a summary report with just high-severity findings
- name: create-sample-repo-template
type: bash
command: |
cat > {{Output}}/reports/sample-markdown-report.html << 'EOF'
<!DOCTYPE html>
<html>
<body>
<style>
table {
border-collapse: collapse;
width: 50%;
}
th, td {
border: 1px solid #333;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
pre {
background-color: #eee;
padding: 10px;
}
</style>
<h1>Sample Image with JavaScript</h1>
<h2>Example of &lt;pre&gt; Tag</h2>
<pre>
Name: Roman
Course: Web Development
Code Sample:
function hello() {
console.log("Hello, world!");
}
</pre>
<h2>Example of &lt;table&gt; Tag</h2>
<table>
<tr>
<th>ID</th>
<th>Name</th>
<th>Score</th>
</tr>
<tr>
<td>1</td>
<td>Alice</td>
<td>90</td>
</tr>
<tr>
<td>2</td>
<td>Bob</td>
<td>85</td>
</tr>
<tr>
<td>3</td>
<td>Charlie</td>
<td>88</td>
</tr>
</table>
<p id="message">Click the image 👆</p>
<img src="https://via.placeholder.com/150" id="img">
<script>
document.getElementById("img").onclick = () => alert("Image clicked!");
</script>
</body>
</html>
EOF
- name: store-html-report
type: function
function: 'store_artifact("{{Output}}/reports/sample-markdown-report.html", "html")'
- name: generate-http-json
type: bash
command: curl -s http://httpbin.org/get > {{Output}}/http.json