By default it asks before running commands. The options when it asks are something like
[1] Yes
[2] Yes, and allow this specific command for the rest of this session
[3] No