workspace-disk-cleanup

Pass

Audited by Gen Agent Trust Hub on Aug 13, 2026

Risk Level: SAFECOMMAND_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/clean_dev_artifacts.py invokes the system du utility to calculate the disk space used by identified artifact folders. The command is executed using subprocess.check_output with a structured list of arguments, which prevents shell injection vulnerabilities.
  • [SAFE]: The skill implements strict directory targeting, only removing specific, regenerable folder names (e.g., node_modules, .next, .venv, .turbo, dist, build) when they are found within project roots identified by standard manifest files like package.json or pyproject.toml.
  • [SAFE]: The script includes a path validation mechanism using Path.resolve() to ensure that all operations are confined to the user-specified workspace, preventing unauthorized access to other parts of the file system.
  • [INDIRECT_PROMPT_INJECTION]: The skill has a data ingestion surface as it reads local directory names and file metadata to identify stale projects.
  • Ingestion points: The os.walk function in scripts/clean_dev_artifacts.py reads directory and filenames from the local file system.
  • Boundary markers: No specific boundary markers are used for the displayed paths.
  • Capability inventory: The skill possesses the capability to delete directories via shutil.rmtree.
  • Sanitization: Operations are restricted to a validated workspace path, and deletions are limited to a hardcoded whitelist of folder names, significantly mitigating the risk of malicious file system manipulation via path names.
Audit Metadata
Risk Level
SAFE
Analyzed
Aug 13, 2026, 05:41 AM
Security Audit — agent-trust-hub — workspace-disk-cleanup