The greatest risk associated with passing a stationary bus at a bus stop is that the bus might conceal a pedestrian stepping onto the road in front of the bus.
You must always pass stationary buses with great care and leave plenty of sideways clearance. You must always be prepared to stop, even if the bus driver has a duty to give way, as pedestrians might step onto the road in front of the bus, where your view is obscured.