I've had a good career in database work. I've had success, and I've had some failures, fortunately the former far outpacing the latter. In my career across many companies, the code I've written has tended to work well, or at least well enough. I've managed systems and ensured a high uptime, and solved issues quickly. I have left quite a few jobs in technology, some because I was unhappy, some for better opportunities.
I was asked to leave one job. I disagreed with my boss, thought he was a jerk, and our CTO told me this person was more valuable than I was at that time. The CTO suggested I move on, so I did. That day.
I've been a manager of both development and operations groups at different positions. I learned as a manager that I praised my staff publicly and criticized them privately. That included taking blame for issues, but passing our kudos for success. A leader is responsible for the team, and that includes accepting the failures of individuals below them. That's what I believe.
In the last few years, there has been a bit of a trend where managers blame individual contributors. The Equifax ex-CEO blamed a single person for not patching their servers prior to the attack. Solarwinds CEO blamed an intern for an issue with posting a password to GitHub. There are other examples, but in many cases, senior management is blaming someone far below them for a mistake.
I know technical people sometimes make decisions that are poor, they click the wrong thing, adjust the wrong server, or make some other mistake. However, in many cases, managers know about the work their people are doing. If they don't, then isn't that a management failure? While a manager might not know about patches, they know patching is important. It's a manager's job to place a priority on patching systems if this is important, and then ensuring someone verifies patches.
I don't expect managers to check repos for passwords, but certainly there are tools to help detect his. I certainly get alerts about a few passwords in my test scripts posted to some repos. Again, a manager should ask that controls, checks, verifications, etc. are a part of any processes that need security.
I know that often the paychecks of senior managers are far above those of technical staff. I know it's easy to blame someone making $60k a year and not accepting blame as a VP being paid $400k a year. I know that manure rolls downhill, but it's disturbing that these executives aren't being held accountable for the mistakes of their staff. It's up to them to ensure that staff prioritizes what's important, security, maintenance, whatever.
As an individual contributor, I find this behavior is a symptom of a poor culture. We're not a team when upper management throws people under the bus. To me, it's a sign I need to seek new employment.