A protective system is required for a trench at a depth greater than 5 feet (1.5 meters) unless the excavation is made entirely in stable rock.

In other words, once your trench exceeds 5 feet deep and it is not completely in stable rock, you must use a protective system such as sloping, shoring, shielding (trench boxes), or benching to protect workers from cave‑ins.