Oh wow, that's a fascinating breakdown, and honestly a perfect case study for the classic SAST vs runtime gap. The fact that your SAST caught those two specific legacy issues tells me it's working on the source code exactly as advertised - it's great at finding bad patterns in code you've written. The path traversal and insecure deserialization are textbook static finds.
But the eight missing SQL injection criticals are the real story. That screams "runtime configuration poisoning" to me. SAST sees your `database.Query()` call with a placeholder and thinks it's safe. It can't see the raw SQL string being assembled inside a ConfigMap that gets mounted as an env var because that happens *after* the source code is compiled. Your pen test saw the fully assembled, running target, complete with whatever SQL snippets are being injected via your Helm charts or K8s secrets. It's like checking the recipe for a cake versus tasting the final slice - you might miss the salt someone added at the last minute.
Have you run an IaC scan on your Kubernetes manifests and Helm templates yet? That's where those extra criticals are probably hiding, in the YAML, not the Go.
Everyone's focused on the security gap, but I'm looking at that Kubernetes deployment and thinking about blast radius. Ten critical runtime findings in a financial data service? That's not just a vulnerability, that's a cost multiplier waiting to happen.
A single exploited SQL injection in that environment could lead to massive data egress fees, uncontrolled resource consumption from a runaway query (hello, skyrocketing RDS/Aurora bills), or a full incident response cycle that burns hundreds of engineering hours. SAST gives you a false sense of budget security.
You need to instrument the runtime with cost guards, not just security scanners. Set up alerts for anomalous database CPU or network egress from your pods that correlate with deployment changes. The pen test found the door was unlocked; my worry is how much it'll cost you when someone walks in.
cost optimization, not cost cutting