Cleanup Tools
Overview
Cleanup tools for data management - delete issues, assets, vulnerabilities, and mappings.
Commands
| Command | Description |
|---|---|
regscale cleanup delete_assets | Delete all assets from an SSP or component. Fetches all assets for the specified parent and deletes them. Use --dry-run to preview without making changes. Use -m/--module to target a specific module |
regscale cleanup delete_issues | Delete all issues from an SSP or component. Fetches all issues for the specified parent and deletes them. Use --dry-run to preview without making changes. Use -m/--module to target a specific module |
regscale cleanup delete_vulnerabilities | Delete all vulnerabilities from an SSP or component. Fetches all vulnerabilities (via scans and directly linked) for the specified parent and deletes them. By default also deletes associated mappings |
regscale cleanup delete_assets
regscale cleanup delete_assetsDelete all assets from an SSP or component.
Fetches all assets for the specified parent and deletes them. Use --dry-run to preview without making changes. Use -m/--module to target a specific module type.
Examples:
regscale cleanup delete_assets -id 123
regscale cleanup delete_assets -id 123 -m components
regscale cleanup delete_assets -id 123 --dry-run
regscale cleanup delete_assets -id 123 --force
regscale cleanup delete_assets [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--regscale_ssp_id, -id, --id, --regscale_id | integer | Yes | — | The ID number from RegScale of the System Security Plan |
--module, -m | choice | No | securityplans | Parent module type to delete assets from. Choices: securityplans, components |
--dry-run | boolean | No | false | Preview what would be deleted without actually deleting. |
--force, -f | boolean | No | false | Skip confirmation prompt. |
regscale cleanup delete_issues
regscale cleanup delete_issuesDelete all issues from an SSP or component.
Fetches all issues for the specified parent and deletes them. Use --dry-run to preview without making changes. Use -m/--module to target a specific module type.
Examples:
regscale cleanup delete_issues -id 123
regscale cleanup delete_issues -id 123 -m components
regscale cleanup delete_issues -id 123 --status Closed
regscale cleanup delete_issues -id 123 --dry-run
regscale cleanup delete_issues -id 123 --force
regscale cleanup delete_issues [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--regscale_ssp_id, -id, --id, --regscale_id | integer | Yes | — | The ID number from RegScale of the System Security Plan |
--module, -m | choice | No | securityplans | Parent module type to delete issues from. Choices: securityplans, components |
--status | text | No | — | Filter by issue status (e.g., 'Open', 'Closed'). If not specified, all issues are deleted. |
--dry-run | boolean | No | false | Preview what would be deleted without actually deleting. |
--force, -f | boolean | No | false | Skip confirmation prompt. |
regscale cleanup delete_vulnerabilities
regscale cleanup delete_vulnerabilitiesDelete all vulnerabilities from an SSP or component.
Fetches all vulnerabilities (via scans and directly linked) for the specified parent and deletes them. By default also deletes associated mappings and scan history records.
Use --dry-run to preview without making changes. Use --no-mappings to skip deleting vulnerability mappings. Use --no-scans to skip deleting scan history records. Use -m/--module to target a specific module type.
Examples:
regscale cleanup delete_vulnerabilities -id 123
regscale cleanup delete_vulnerabilities -id 123 -m components
regscale cleanup delete_vulnerabilities -id 123 --dry-run
regscale cleanup delete_vulnerabilities -id 123 --no-mappings
regscale cleanup delete_vulnerabilities -id 123 --no-scans
regscale cleanup delete_vulnerabilities -id 123 --force
regscale cleanup delete_vulnerabilities [OPTIONS]
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--regscale_ssp_id, -id, --id, --regscale_id | integer | Yes | — | The ID number from RegScale of the System Security Plan |
--module, -m | choice | No | securityplans | Parent module type to delete vulnerabilities from. Choices: securityplans, components |
--include-mappings, --no-mappings | boolean | No | true | Also delete vulnerability mappings (default: True). |
--include-scans, --no-scans | boolean | No | true | Also delete associated scan history records (default: True). |
--dry-run | boolean | No | false | Preview what would be deleted without actually deleting. |
--force, -f | boolean | No | false | Skip confirmation prompt. |
Updated 13 days ago
