get_validation_schema
Retrieve the JSON schema for atomic tests, defining required fields, data types, and validation rules. Use it to create or modify tests that meet quality standards.
Instructions
Get the JSON schema that defines the structure and requirements for atomic tests.
This schema provides the complete specification for creating valid atomic tests. It defines all fields (required and optional), data types, validation rules, and constraints. Use this as a reference when creating or modifying atomic tests to ensure they meet quality standards.
The schema follows the Atomic Red Team YAML format and is automatically generated from the Pydantic models, ensuring it's always in sync with validation rules.
Returns: dict: JSON Schema (Draft 7) containing: - definitions: Nested object definitions (Executor, Dependency, etc.) - properties: Field definitions with types and constraints - required: List of mandatory fields - additionalProperties: Whether extra fields are allowed - field descriptions: Human-readable explanations for each field
Schema Structure: The schema defines these main sections: - name: Test name (required, min 1 character) - description: Test explanation (required, min 1 character) - supported_platforms: Platform list (required, min 1 platform) - executor: Execution method (required, CommandExecutor or ManualExecutor) - input_arguments: Parameterized inputs (optional, dict) - dependencies: Prerequisites (optional, list) - dependency_executor_name: Executor for dependencies (optional) - auto_generated_guid: Unique ID (optional, auto-generated)
Examples: # Get the schema schema = get_validation_schema()
# Check required fields
required_fields = schema['required']
print(f"Required fields: {required_fields}")
# View field definitions
properties = schema['properties']
print(f"Available fields: {list(properties.keys())}")
# Check platform options
platform_enum = schema['definitions']['Platform']['enum']
print(f"Valid platforms: {platform_enum}")Common Use Cases: 1. Creating new tests: Reference required fields and formats 2. Understanding validation: See what rules will be enforced 3. Tool development: Use schema for code generation 4. Documentation: Generate field descriptions automatically
Notes: - Schema is generated from Pydantic models at runtime - Always reflects current validation rules - Includes custom validators and constraints - Follows JSON Schema Draft 7 specification - Can be used with JSON Schema validators in any language - Do not add comments to the created atomic test
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||