Skip to main content
Workflows are YAML files that define automated scanning pipelines.

Basic Structure

Module

Flow

Field Reference

Top-Level Fields

Parameters

Use in templates as {{target}}.

Tags

Filter workflows:

Workflow Kinds

Module Workflows

For single, focused tasks:

Flow Workflows

For multi-stage pipelines:

Module References (Flows)

Workflow Location

Store workflows in the workflow folder (default: ~/osmedeus-base/workflows/):

Running Workflows

Validation and Linting

Parser Validation

The parser validates:
  1. Required fields: kind, name, steps (module) or modules (flow)
  2. Valid kind: Must be module or flow
  3. Step names: Each step must have a unique name
  4. Step types: Must be valid (bash, function, foreach, parallel-steps, remote-bash, http, llm, agent)
  5. Module paths: Referenced modules must exist (flows)
  6. Circular dependencies: No cycles in dependency graph (flows)

Workflow Linter

The workflow linter provides additional best-practice checks beyond basic parsing. It helps catch potential issues before runtime while allowing workflows to execute even with warnings.

Linter Rules Reference

The undefined-variable rule exists but is not enabled by default due to the large number of built-in variables. Workflows can execute with linter warnings - the linter is designed to help identify potential issues, not block execution.

Severity Levels

  • info - Best practice suggestions (e.g., unused exports)
  • warning - Potential issues that may cause problems (e.g., duplicate names)
  • error - Critical issues that will likely cause failures

Workflow Inheritance

Workflows can extend parent workflows using the extends field. This enables:
  • Reusing common configurations across workflows
  • Creating specialized variants (e.g., fast, aggressive, stealth)
  • Maintaining consistent base workflows with targeted overrides

Basic Inheritance

Extends Field

The extends field specifies the parent workflow to inherit from:
The child workflow inherits all fields from the parent, with the child’s fields taking precedence.

Override Modes

When overriding steps (modules) or modules (flows), you can specify a merge strategy:

Append Mode (Default)

Prepend Mode

Replace Mode

Merge Mode

Override Sections

The override block supports these sections:

Parameter Overrides

Override specific parameter properties:

Multi-Level Inheritance

Workflows can form inheritance chains:

Inheritance Rules

  1. Kind must match - Child and parent must have the same kind (module/flow)
  2. Circular detection - Circular inheritance chains are detected and rejected
  3. Name uniqueness - Child’s name overrides parent’s name
  4. File path - Child’s FilePath is preserved (for error reporting)

Best Practices

  1. One task per module - Keep modules focused
  2. Use flows for pipelines - Orchestrate with dependencies
  3. Descriptive names - subdomain-enum not step1
  4. Document parameters - Add descriptions
  5. Use tags - Enable filtering
  6. Use inheritance - Create base workflows and specialized variants
  7. Prefer merge mode - For fine-grained step control in child workflows

Next Steps