Reduce duplication in Cli#{scan,enforce}