Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

konloch/bytecode-viewer
master @ 3a3a314
10
Fixes
0
CVEs
HIGH
Peak severity
50.0%
Coverage
Highlights
Sandbox Escape: 5 prior fixes. Scrutinize any change in this area.
src/main/java/the/bytecode/club/bytecodeviewer/util/SecurityMan.java: most-fixed (7 issues). Treat as high-risk during review.
7 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Sandbox Escape: The custom SecurityManager's execution blocking mechanism was repeatedly bypassed due to flawed state tracking (negative integer values and a non-reentrant boolean flag) that allowed nested operations to prematurely unblock command execution.
Command Injection: Integrating third-party command-line utilities via ProcessBuilder is highly risky if arguments are formatted dynamically. Using arbitrary string parameters allowed malicious command execution, requiring a transition to hardcoded boolean switches.
Auth Bypass: The privilege verification logic relied on inspecting class frames from the call stack, which broke on JDK-15 due to altered stack frame depths, allowing unauthorized classes to pass security checks.