{"version":"2.1.176","anchor":"rm-rmdir-safety-analysis-expanded","canonical_anchor":"rm-rmdir-safety-analysis-expanded","heading":"rm \/ rmdir Safety Analysis Expanded","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.176\/e\/rm-rmdir-safety-analysis-expanded","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.176","markdown":"### `rm`\/`rmdir` Safety Analysis Expanded\n\nThe dangerous-removal checker that guards `rm` and `rmdir` commands has been significantly reworked with several new detection patterns:\n\n- Detects when a `cd` precedes a relative glob removal, making the target statically unresolvable\n- Detects when the removal target (after glob expansion) cannot be resolved to a directory\n- Detects when a glob pattern traverses multiple directories that cannot be statically enumerated (more than one wildcard level deep)\n- Now checks against all configured working directories, not just the primary CWD \u2014 additional working directories and their parents are also protected\n- The old check (\"remove CWD or its parent\") has been replaced by the more precise \"workspace directory\" check\n\n**Evidence**\n\nRemoval safety expansion (search for `\"This command changes directories before the removal\"` and `\"This command's glob pattern traverses directories\"`)"}