Run pods have open egress for a moment at start on eventually-consistent NetworkPolicy enforcement
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start with the run pod setup, the admission policy that rejects init containers, and the existing run-isolation kind test that records startup_race; the issue does not name their file paths. Compare the proposed gate with both isolated and scanner policies, then run the kind leg and check that user code cannot reach the canary at t = 0. Done means enforcement is observed before user code starts, or the run fails as lost with a namespace detail when the bound expires.
Written by the indexing model from the issue text.
Description
Queue: K (process compute). Found by K-6's kind leg (#14).
Problem
On a CNI whose NetworkPolicy enforcement for a new pod is eventually consistent, a run pod has open egress for a short time after it starts, even with stac-higher-runs-default-deny in place.
Measured on kind v0.33.0 (kindnet / kube-network-policies), Kubernetes 1.34: a run pod connected to the node metadata address, the API server and an external host at t = 0; the first blocked connection came about 0.5 s after start; from then on all three stayed blocked. Connections opened inside the window are not re-checked. The AWS VPC CNI documents the same behaviour in its default standard enforcing mode (strict mode starts pods default-deny).
Untrusted run code therefore gets a sub-second window in which it can reach the metadata endpoint or exfiltrate, on any cluster that is not in a strict enforcing mode. The executor's fail-closed check (K-5) proves the policy object exists, not that it is enforced yet for this pod.
Options
- Require strict enforcement as a cluster prerequisite (chart README, R-11 live check). Documentation only; nothing proves it per run.
- A start gate in the run pod: a platform init container (the runtime image, by digest) that waits until a canary connection is observed blocked, then exits; user code starts only after that. Init containers share the pod's network identity, so once the gate sees the block the policy applies to the pod. If the block never comes within a bound, the run is
lostwith a detail naming the namespace: a per-run proof of enforcement, which also closes the "object exists, not enforced" residual (I-183). Needs: a canary that is reachable without a policy and blocked under both theisolatedandscannerpolicies; the admission policy's no-init-containers rule relaxed to exactly this container; a kind test that user code observes no reachable target at its own t = 0. - Both.
Notes
- No migration expected.
- The kind leg records the window (
run-isolationobservation,startup_race) and asserts only the settled state; a gate would let it assert t = 0 as well.
- Dominant language
- Python
- Stars
- 0
- Forks
- 2
- Avg merge
- 8h 26m
- Merged PRs (30d)
- 47
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TechTraverse/stac-higher
-
ci
Difficulty 1/5 Under an hour Newbie friendliness 85/100
TechTraverse/stac-higher#261 ·
Maintainers usually reply within 1 day
-
ready
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TechTraverse/stac-higher#258 ·
Maintainers usually reply within 1 day
-
Error messages hide the server's reason: users see only '400 Bad Request'Possibly taken @aman-code-io claimed this 3 days ago. Openbug good first issue ready
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TechTraverse/stac-higher#232 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TechTraverse/stac-higher#225 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TechTraverse/stac-higher#216 ·
Maintainers usually reply within 1 day
All issues in TechTraverse/stac-higher
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day