Core Variables
| Variable | Description | Example Value |
|---|---|---|
{{Target}} | Current scan target | example.com |
{{TargetSpace}} | Sanitized target (filesystem safe) | example_com |
{{Output}} | Workspace output directory | /home/user/osmedeus-base/workspaces/example.com |
{{BaseFolder}} | Osmedeus base directory | /home/user/osmedeus-base |
{{TaskID}} | Unique task/run identifier | run-abc123 |
Path Variables
| Variable | Description | Example Value |
|---|---|---|
{{Binaries}} | Path to tool binaries | /home/user/osmedeus-base/binaries |
{{Data}} | Path to data files | /home/user/osmedeus-base/data |
{{Workflows}} | Path to workflows | /home/user/osmedeus-base/workflows |
{{Workspaces}} | Path to workspaces | /home/user/osmedeus-base/workspaces |
{{Storages}} | Path to storage/snapshots | /home/user/osmedeus-base/storages |
Thread Variables
| Variable | Description | Example Value |
|---|---|---|
{{threads}} | Thread count (based on tactic) | 50 |
{{baseThreads}} | Base thread count | 25 |
-B flag):
aggressive: threads=100, baseThreads=50default: threads=50, baseThreads=25gently: threads=10, baseThreads=5
Time Variables
| Variable | Description | Example Value |
|---|---|---|
{{Today}} | Current date (YYYY-MM-DD) | 2024-01-15 |
{{TimeStamp}} | Unix timestamp | 1705312000 |
{{RandomString}} | Random 8-character string | xK9mPq2r |
Step Export Variables
Available after step execution:| Variable | Source | Description |
|---|---|---|
{{stdout}} | bash | Command standard output |
{{stderr}} | bash | Command standard error |
{{exit_code}} | bash | Command exit code |
{{result}} | function | Function return value |
{{http_status_code}} | http | HTTP response status |
{{http_response_body}} | http | HTTP response body |
{{http_response_headers}} | http | HTTP headers (JSON) |
{{llm_response}} | llm | LLM chat response |
{{llm_tool_calls}} | llm | LLM tool calls (JSON) |
{{llm_embeddings}} | llm | LLM embeddings (JSON) |
Generator Functions
Use in parameter defaults:| Function | Description | Example |
|---|---|---|
{{uuid()}} | Generate UUID v4 | a1b2c3d4-e5f6-... |
{{currentDate()}} | Current date | 2024-01-15 |
{{currentDate("format")}} | Formatted date | currentDate("02-Jan-2006") |
{{currentTimestamp()}} | Unix timestamp | 1705312000 |
{{randomInt(min, max)}} | Random integer | randomInt(1, 100) |
{{randomString(len)}} | Random string | randomString(8) |
{{getEnvVar("key")}} | Environment variable | getEnvVar("HOME") |
{{getEnvVar("key", "default")}} | With default | getEnvVar("API_KEY", "none") |
{{concat(a, b, ...)}} | Concatenate strings | concat("a", "b") |
{{toLower(s)}} | Lowercase | toLower("ABC") → abc |
{{toUpper(s)}} | Uppercase | toUpper("abc") → ABC |
{{trim(s)}} | Trim whitespace | trim(" a ") → a |
{{replace(s, old, new)}} | Replace string | replace("a.b", ".", "_") |
{{split(s, sep)}} | Split string | split("a,b", ",") |
{{join(arr, sep)}} | Join array | join(["a","b"], "-") |
{{execCmd(cmd)}} | Execute command | execCmd("whoami") |
Foreach Variables
Inside foreach loops, use double brackets:| Variable | Description |
|---|---|
[[variable]] | Current iteration value |
Variable Resolution Order
- Exports from previous steps (highest priority)
- Parameters from user input (
-p key=value) - Built-in variables (Target, Output, etc.)
- Environment variables (lowest priority)
Usage Examples
In Commands
In Parameters
In Conditions
In Exports
Nested Variables
With Generators
Common Patterns
Output Organization
Tool Paths
Dynamic Configuration
Environment Variable Access
Best Practices
- Use built-in paths instead of hardcoded values
- Use TargetSpace for filenames to avoid special characters
- Organize output with meaningful directory structure
- Provide defaults for optional parameters
- Document custom variables in workflow description
Next Steps
- Templates - Template syntax details
- Variables - Exports and propagation
- Workflow Schema - Complete schema