Parameters
Defining Parameters
Using Parameters
Passing Parameters
Exports
Exports pass values from one step to the next.Basic Export
Export Sources
| Source | Description |
|---|---|
{{stdout}} | Command standard output |
{{stderr}} | Command standard error |
{{exit_code}} | Command exit code |
{{http_status_code}} | HTTP response status |
{{http_response_body}} | HTTP response body |
{{llm_response}} | LLM chat response |
HTTP Exports
Function Exports
Variable Scope
Step-Level Scope
Exports are available to all subsequent steps:Foreach Variable Scope
Loop variables use[[]] syntax and are only available inside the loop:
Resolution Order
Variables are resolved in this order:- Exports from previous steps
- Parameters from user input
- Built-in variables (Target, Output, etc.)
- Environment variables
Built-in Variables
Osmedeus provides a comprehensive set of built-in variables that are automatically available in all workflows. These variables are recognized by the linter and do not need to be defined.Path Variables
| Variable | Description |
|---|---|
{{BaseFolder}} | Osmedeus installation directory |
{{Binaries}} | Path to tool binaries |
{{Data}} | Path to data files |
{{ExternalData}} | Path to external data files |
{{ExternalConfigs}} | Path to external configuration files |
{{ExternalAgentConfigs}} | Path to agent configuration files |
{{ExternalAgents}} | Path to agent scripts |
{{ExternalScripts}} | Path to external scripts |
{{Workflows}} | Path to workflows directory |
{{MarkdownTemplates}} | Path to markdown templates |
{{ExternalMarkdowns}} | Path to external markdown files |
{{SnapshotsFolder}} | Path to snapshots storage |
{{Workspaces}} | Path to workspaces directory |
Target Variables
| Variable | Description |
|---|---|
{{Target}} | Current scan target |
{{target}} | Current scan target (lowercase alias) |
{{TargetFile}} | Path to target file (for multi-target runs) |
{{TargetSpace}} | Sanitized target (filesystem safe) |
Output Variables
| Variable | Description |
|---|---|
{{Output}} | Workspace output directory |
{{output}} | Workspace output directory (lowercase alias) |
{{Workspace}} | Workspace directory |
{{workspace}} | Workspace directory (lowercase alias) |
Thread Variables
| Variable | Description |
|---|---|
{{threads}} | Thread count (based on tactic) |
{{Threads}} | Thread count (uppercase alias) |
{{baseThreads}} | Base thread count |
Metadata Variables
| Variable | Description |
|---|---|
{{Version}} | Osmedeus version |
{{TaskDate}} | Task date |
{{TaskID}} | Unique task identifier |
{{TimeStamp}} | Unix timestamp |
{{CurrentTime}} | Current time |
{{Today}} | Current date (YYYY-MM-DD) |
{{RandomString}} | Random 6-character string |
{{ModuleName}} | Current module name |
{{FlowName}} | Parent flow name (empty if running module directly) |
State File Variables
| Variable | Description |
|---|---|
{{StateExecutionLog}} | Path to execution log |
{{StateConsoleLog}} | Path to console log |
{{StateCompletedFile}} | Path to completion marker file |
{{StateFile}} | Path to state file |
{{StateWorkflowFile}} | Path to workflow state file |
{{StateWorkflowFolder}} | Path to workflow state folder |
Heuristic Variables
These variables are populated by automatic target analysis:| Variable | Description |
|---|---|
{{TargetType}} | Detected target type |
{{TargetRootDomain}} | Root domain extracted from target |
{{TargetTLD}} | Top-level domain |
{{TargetSLD}} | Second-level domain |
{{Org}} | Organization (if detected) |
{{TargetBaseURL}} | Base URL of target |
{{TargetRootURL}} | Root URL of target |
{{TargetHostname}} | Hostname from target URL |
{{TargetHost}} | Host from target |
{{TargetPort}} | Port from target URL |
{{TargetPath}} | Path from target URL |
{{TargetFileExt}} | File extension from target URL |
{{TargetScheme}} | URL scheme (http/https) |
{{TargetIsWildcard}} | Whether target is a wildcard |
{{TargetResolvedIP}} | Resolved IP address |
{{TargetStatusCode}} | HTTP status code from target |
{{TargetContentLength}} | Content length from target response |
{{HeuristicsCheck}} | Result of heuristics analysis |
Chunk Variables
Used for parallel processing of large inputs:| Variable | Description |
|---|---|
{{ChunkIndex}} | Current chunk index |
{{ChunkSize}} | Size of each chunk |
{{TotalChunks}} | Total number of chunks |
{{ChunkStart}} | Start offset of current chunk |
{{ChunkEnd}} | End offset of current chunk |
Nested Variables
Variables can contain other variables:Generator Functions
Use in parameter defaults:uuid()- UUID v4currentDate()- YYYY-MM-DDcurrentTimestamp()- Unix timestamprandomInt(min, max)- Random integerrandomString(len)- Random stringgetEnvVar(key, default)- Environment variable
Flow Variable Propagation
Flow to Module
Module Exports in Flow
Module exports are not automatically available to other modules. Use shared output files:Common Patterns
Chained Processing
Conditional on Export
Environment Variables
Best Practices
-
Use descriptive export names
-
Document parameter meanings
-
Provide sensible defaults
-
Use files for large data
Next Steps
- Control Flow - Using exports in conditions
- Templates - Template syntax
- Functions Reference - Available functions