Cleanup Tools

Overview

Cleanup tools for data management - delete issues, assets, vulnerabilities, and mappings.

Commands

CommandDescription
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
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
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

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 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]
FlagTypeRequiredDefaultDescription
--regscale_ssp_id, -id, --id, --regscale_idintegerYesThe ID number from RegScale of the System Security Plan
--module, -mchoiceNosecurityplansParent module type to delete assets from. Choices: securityplans, components
--dry-runbooleanNofalsePreview what would be deleted without actually deleting.
--force, -fbooleanNofalseSkip confirmation prompt.

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 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]
FlagTypeRequiredDefaultDescription
--regscale_ssp_id, -id, --id, --regscale_idintegerYesThe ID number from RegScale of the System Security Plan
--module, -mchoiceNosecurityplansParent module type to delete issues from. Choices: securityplans, components
--statustextNoFilter by issue status (e.g., 'Open', 'Closed'). If not specified, all issues are deleted.
--dry-runbooleanNofalsePreview what would be deleted without actually deleting.
--force, -fbooleanNofalseSkip confirmation prompt.

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 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]
FlagTypeRequiredDefaultDescription
--regscale_ssp_id, -id, --id, --regscale_idintegerYesThe ID number from RegScale of the System Security Plan
--module, -mchoiceNosecurityplansParent module type to delete vulnerabilities from. Choices: securityplans, components
--include-mappings, --no-mappingsbooleanNotrueAlso delete vulnerability mappings (default: True).
--include-scans, --no-scansbooleanNotrueAlso delete associated scan history records (default: True).
--dry-runbooleanNofalsePreview what would be deleted without actually deleting.
--force, -fbooleanNofalseSkip confirmation prompt.

Did this page help you?