We added a deck safety gate to our front veranda to help keep the kids from falling down the stairs. The gate can also be locked for added security if desired.
I was lucky in that I had some railing left over from the old landing that was torn down when they lifted our house. I was able to cut that down to the width of the opening from our veranda to the new landing. On either side of the cut down railing I added a 2×4 and then added a diagonal support to help it maintain shape, since it would only be attached on one side.
For the gate latch I used a pool gate lock, which was easy to install, and makes it hard for the kids to reach the latch top open the gate until they are older and taller.
The gate is a bit of pain to open if I don’t have a free hand to pull the latch, but I figure that the added safety outweighs that little bit of inconvenience.