North Korea has not been attacked since it got the bomb because it has a bomb. They clearly know just how far they can go without being attacked. They can sink a boat and shell a disputed island.
There is a lot of espionage from the South against the North, but we donlt hear about it, because it is secret. Trains blow up, planes crash, that sort of thing. These are described by the North as "accidents" and occasionally espionage, and the South simply does not comment.
The US did not attack North Korea before it got the bomb be3cause of the fact that Seoul is so close to the border, and could have been seriously damaged with just conventional weapons. Despite the fact that there is officially a state of war between the Koreas and between the US and the DPRK, the US does not seem to consider that there is a state of war existing between the parties.
Nuclear weapons have served as deterrents for 65 years. They have not been used as weapons.