trestle_import
Import OSCAL models from URLs or local file paths into designated workspace directories. Supports catalogs, profiles, component definitions, and SSPs.
Instructions
Import an existing OSCAL model into the trestle workspace.
This tool imports OSCAL models from URLs or local file paths. The imported file will be saved in the appropriate directory based on its OSCAL type (e.g., catalogs/, profiles/, component-definitions/).
Import Behavior:
Catalog → catalogs/{output}/catalog.json
Profile → profiles/{output}/profile.json
Component Definition → component-definitions/{output}/component-definition.json
SSP → system-security-plans/{output}/system-security-plan.json
Args: params (TrestleImportInput): Validated input parameters containing: - file (str): OSCAL file to import (URL or file path) - output (str): Name of output element - regenerate (bool): Force generation of new UUIDs (default: false) - trestle_root (Optional[str]): Path to trestle root directory - verbose (bool): Display verbose output (default: false)
Returns: str: Success message with import details or error
Examples: - Import NIST SP800-53 Rev5 Catalog: file="https://raw.githubusercontent.com/usnistgov/oscal-content/refs/heads/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_catalog.json" output="nist_sp800_53_rev5"
- Import from local file:
file="./resources/catalogs/your_catalog.json"
output="mycatalog"Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |