Security context

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

wso2/carbon-secvault
master @ a16bbab
2
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Hardcoded Credentials: 1 prior fix. Scrutinize any change in this area.
PrivilegedCarbonContext.java: most-fixed (1 issue). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

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

Privilege Escalation: Unauthorized calling code could retrieve the privileged Carbon context, bypassing tenant isolation and accessing internal system resources without appropriate permissions. This is mitigated by enforcing explicit Java SecurityManager checks during context retrieval.
Hardcoded Credentials: The inclusion of a default hardcoded master key reader in the production runtime path poses a critical risk of credentials exposure and weak cryptographic wrapping. Moving this reader strictly to test scopes ensures production deployments use strong, environment-configured keys.