{"version":"2.1.311","anchor":"bash-read-onlypath-validation-for-loop-and-while-loop-expa","canonical_anchor":"bash-read-onlypath-validation-for-loop-and-while-loop-expa","heading":"Shell checks look harder at loops, declarations and rm targets","tier":"notice","area":"Bash Safety","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311\/e\/bash-read-onlypath-validation-for-loop-and-while-loop-expa","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311","markdown":"### Shell checks look harder at loops, declarations and `rm` targets\n\nClaude Code's shell checks now analyse `for` and `while` loop headers, reject some declarations, and parse `rm` targets two ways\n\n**What**\n\nClaude Code analyses shell commands to decide whether they only read things and which files they touch. That analysis has changed in three ways:\n\n- The headers of `for` and `while` loops now go through a shared evaluation step. Before, only `for` loop words were handled, directly in place.\n\n- A command that declares variables is now marked too complex when its words could take different shapes.\n\n- The files named in an `rm` command are now found by reading the command with two parsers and combining the results, instead of one.\n\n**Why**\n\nThe permission checks are stricter and less likely to be fooled by unusual shell syntax.\n\n- Area: Bash Safety\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}