how are you going to stop someone from scuttling a ship? sink it?
Yes. A carrier group is able to project military power for a great distance around itself. Long range missiles, submarines, aircraft, you name it. Presumably it would monitor the canal along its entire length, and destroy anything that approaches by land or sea before it is able to create or become an obstacle.
Here's an interesting lesson from WW2 which shows the danger of previously unknown coastal torpedo batteries: https://en.wikipedia.org/wiki/Battle_of_Drøbak_Sound