Skip to content

feat: add counterscarp --clean to free local disk space#1

Draft
RunTimeAdmin wants to merge 1 commit into
mainfrom
cursor/disk-cleanup-cli-17b7
Draft

feat: add counterscarp --clean to free local disk space#1
RunTimeAdmin wants to merge 1 commit into
mainfrom
cursor/disk-cleanup-cli-17b7

Conversation

@RunTimeAdmin

Copy link
Copy Markdown
Owner

Summary

Adds a manual disk cleanup command for Counterscarp/ScarpShield deployments where scan artifacts accumulate locally (reports/, uploads/, results/, .scarpshield/ state files, etc.).

Changes

  • New cleanup.py module with shared housekeeping logic and retention defaults aligned with existing docs
  • counterscarp --clean and counterscarp --clean --dry-run CLI flags (no --target required)
  • Webapp startup cleanup now uses the same module and also purges stale results/ directories (30 days), which were previously only documented via manual find commands
  • Tests and documentation updates in docs/CONFIGURATION.md and docs/DEPLOYMENT.md

Usage

cd /path/to/counterscarp-engine
counterscarp --clean --dry-run   # preview reclaimable space
counterscarp --clean             # remove stale artifacts

Retention (unchanged policy)

Data Retention
State / cache (.scarpshield/, legacy .counterscarp/) 30 days
reports/ 90 days
uploads/ 7 days
results/ 30 days
Open in Web Open in Cursor 

Introduce a shared cleanup module used by the CLI and webapp startup.
Purges stale state files, reports, uploads, results, and related artifacts
using documented retention periods. Adds --dry-run preview and tests.

Co-authored-by: DC <info@runtimefence.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants