Summary
A misconfigured Kubernetes NetworkPolicy in Romeo's "hardened" namespace allows traffic to escape the restricted environment and reach any Pod outside of it.
Under certain deployments, a malicious actor with code or container execution in the hardened namespace could laterally move to other namespaces, breaking the expected security-by-default isolation guarantees.
Affected context
This vulnerability affects Kubernetes deployments of Romeo (for measuring Go application coverage in GitHub Actions) that enable the provided "hardened" namespace configuration and apply the bundled NetworkPolicies, particularly those prefixed with inter-ns-.
It is most relevant where:
- The hardened namespace is assumed to be strongly isolated from the rest of the cluster
- Other namespaces host sensitive workloads or higher-privilege services
- Network segmentation is a primary control for limiting blast radius
Exploit preconditions
- Attack surface: Network connectivity from workloads running in the Romeo "hardened" namespace to Pods in other namespaces.
- Required access: Ability to run code or gain execution within a Pod in the hardened namespace (e.g., through CI jobs, compromised containers, or misused credentials).
- Trigger point: Network traffic initiated from within the hardened namespace toward Pods outside that namespace, which is incorrectly allowed by the miswritten NetworkPolicy.
- Why exploitation is possible: The
inter-nsNetworkPolicy does not correctly enforce namespace-level isolation and grants broader egress or ingress permissions than intended, violating least-privilege network access assumptions.
Why this happens
The root cause is an access control misconfiguration at the network layer, mapping to CWE-284: Improper Access Control.
The bundled inter-ns NetworkPolicy is intended to constrain cross-namespace communication but is written in a way that actually permits traffic from the hardened namespace to any Pod outside it.
This creates an over-permissive network path and undermines the security-by-default posture.
Conceptually, the pattern is:
- Rely on Kubernetes NetworkPolicies for isolation
- Introduce a policy whose selectors or rules are too broad or inverted
- Accidentally grant access instead of restricting it, enabling lateral movement.
Potential impact
- An attacker in the hardened namespace could probe and connect to Pods in other namespaces.
- Lateral movement to more sensitive workloads or services may become possible.
- Increased risk of data exfiltration from services that assume namespace-level isolation.
- Potential abuse of internal control planes, CI/CD components, or in-cluster tooling reachable over the network.
- Expansion of the blast radius from a compromised Romeo-related Pod to unrelated cluster resources.
General mitigation guidance
Effective mitigation focuses on restoring strict network isolation and minimizing implicit trust between namespaces:
- Remove or refactor over-permissive NetworkPolicies, especially those that enable cross-namespace communication by default.
- Design NetworkPolicies using a default-deny posture, then explicitly allow only the minimal required intra- and inter-namespace traffic.
- Use namespace and pod label selectors carefully to avoid unintentionally matching "all" Pods.
- Apply the principle of least privilege at the network layer: CI-related namespaces should not have broad access to runtime or production services without explicit justification.
- Regularly review and test network segmentation assumptions, particularly for "hardened" or security-sensitive namespaces.
How teams detect issues like this
To detect this class of issue, teams can:
- Perform configuration reviews of NetworkPolicies, looking for:
- Rules that allow traffic to or from "any" namespace or broad label selectors
- Policies that appear to contradict documented isolation goals
- Use static analysis or policy-as-code tools (e.g., OPA/Gatekeeper, Kyverno) to enforce guardrails:
- Disallow overly broad
from/torules across namespaces - Require explicit justification for inter-namespace connectivity
- Conduct periodic network reachability tests:
- Validate that Pods in hardened or CI namespaces cannot initiate arbitrary connections to other namespaces.
- Integrate automated checks into CI pipelines to flag risky NetworkPolicy changes before deployment.

