Claude’s harness parses pipes and asks for permission for each individual command.
Of course you're right about the issues, e.g. when it creates a script file to execute and you allow that for the session, it can edit it and then re-execute it without your further input.