CleanForge

Security and safety model

CleanForge deletes files. The design goal is that it can never delete something you did not see, understand and confirm.

Pipeline (no step may be skipped)

SCAN -> CLASSIFY -> VALIDATE -> PLAN -> USER CONFIRMATION -> REVALIDATE -> DELETE -> VERIFY -> REPORT

Step Where What it guarantees
SCAN / CLASSIFY core/scanner/* A finding is a proposal with evidence, never a command.
VALIDATE / PLAN SafetyValidator, PlanBuilder Path policy, mode policy, overlap rules, and the duplicate rule: the copy that stays is one the user did NOT tick; a group whose every copy is ticked is refused. Refused items are kept with their reason.
USER CONFIRMATION ConfirmDialog Lists EVERY item with its full path, why it was flagged, confidence, risk, exactly what is deleted, “no undo”, Shizuku need, and for duplicates KEEP / DELETE CANDIDATE; refusals too. CleaningEngine accepts only a ConfirmedPlan.
REVALIDATE CleaningEngine.processItem Policy again, live permissions, fresh package-state check (app cache: package currently installed; leftover: package not known and not installed), scan-time fingerprint, kept-copy check.
DELETE SafeDeleter (app or Shizuku service) No symlink following, no mount crossing, bounded depth/entries, directory identity re-checked, and every entry re-lstated and identity-compared immediately before it is removed.
VERIFY / REPORT CleaningEngine, ReportDialog Re-stat after deletion; freed bytes come from what was really removed.

Hard rules enforced in code

Storage Forensics (Part 3)

Forensic scanners target known app-specific cache/media patterns. They are strictly narrower than a general walk:

RAM Monitoring (Part 4)

Privacy

Shizuku

Shizuku is not root. By default its user service runs as the shell user and it executes no commands: the service has a fixed set of file operations and no shell. If you start it in root mode, CleanForge shows that and applies exactly the same path rules. It is optional: without it, only the Android/data cleaners are disabled.

Known residual risks

Reporting a vulnerability

Report privately to the maintainer, Aman. Add a contact address or issue-tracker link here before publishing: <contact: TODO by Aman>.