In the first book, one of the guardians of the Stone, who was in on the entire setup of its defenses, is The Dragon
for that particular novel... and it still
takes him nearly a full year before he dares to try to seize the Stone. And then he still
-walled at the final layer.
Second book: The attacks are all done by someone who has no reason
to be suspected at any
point in time, because she's being possessed without her knowledge, and isn't even indirectly
connected to any of the events. The events also only occur because the perpetrator discovered the knowledge he needed and laid the groundwork for the events fifty years ago
Third book: The perpetrator of most of the terrifying events going on around the school was one of the mapmakers
of the school's secret passageways decades ago. Oh, and a shapeshifter, not that anyone knew that.
Fourth book: Again, one of the intended guardians was The Dragon
. And he only
gets smoked out because he got careless after
the events he'd set in motion occurred.
Fifth book: The castle never
gets attacked. Instead, the entire Ministry of Magic
is deserted, without even token security forces. And the insiders in the Ministry aren't actually implied to have done
anything in particular to pull that off.
Sixth book: One person pulled off a lot
of tricks to achieve the attack - most of them were either copied from or learned because of Harry and company's actions over the entire rest of the series.
Even then, he was only allowed to run that freely because he was being forced to do what he did, and Dumbledore was partly hoping to try to find a way to help him out of the coercion before he had to act.
Seventh book: Nearly the entire school
rebels against the people in charge.