Files
osmedeus/test/testdata/workflows/test-example-report.yaml
T
j3ssie 4ac041fd73 feat: add workflow help metadata, artifact optional flag, and search/filter improvements
- Add WorkflowHelp struct with Usage and ExampleTargets for CLI documentation
- Add Optional field to Artifact model and database schema with migration support
- Implement workflow search functionality by name, description, and tags in CLI list command
- Add --usage and --search flags to workflow list command with multiple filtering options
- Display workflow usage info in show command when Help is defined
- Support help inheritance in workflow extends/inheritance resolver
- Update vulnerability counters from database after SARIF imports
- Add comprehensive Help unit tests covering parsing, cloning, and mutation isolation
- Improve test helpers with streaming output, diagnostics, and file validation utilities
- Add fourth general canary test for domain-list-recon flow with artifact validation
2026-02-12 01:04:03 +07:00

152 lines
3.7 KiB
YAML

name: test-example-report
kind: module
description: Test example report with nested parallel steps with mixed types
tags: test,parallel,nested
help:
example_targets: ['example.com', 'httpbin.org']
usage: osmedeus run -m test-example-report -t <target>
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
optional: true
- 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