Skip to content

fix(k8s): the devops perimeter opens only the collector's OTLP/HTTP port, 4318 #2548

Closed

Description

@dan-petty

Problem

#1319 (PR #2541, merged 2026-10-28) made devops-cli send OTLP over HTTP only: a gRPC protocol or an endpoint on port 4317 is refused. Nothing in the devops namespace sends OTLP over gRPC: the devops config names the collector's port 4318, and Logfire sends to its own HTTPS endpoint.

k8s/devops/networkpolicy.yaml, rule 3 ("OpenTelemetry collector in namespace otel"), still allows egress to the otel namespace on TCP 4317 beside 4318. That port is now unused, so the rule opens more than the namespace needs (least privilege), and #2541 made it stale.

Acceptance criteria

  • The egress rule of k8s/devops/networkpolicy.yaml whose peer is the otel namespace names the one port TCP 4318.
  • A manifest test in tests/test_k8s_network_policies.py fails when that rule names another port.
  • The otel perimeter still admits 4317 from other namespaces, and the collector and Tempo keep their gRPC receivers.
  • kubectl apply --dry-run=server -f k8s/devops/networkpolicy.yaml accepts the policy. Argo CD applies it after the merge.
  • The otlp-export capability records the rule.

Related

#1319, PR #2541.

Source: #2541

Activity

  1. added
    source/agent
    type/security
    status/new
    value/medium
    effort/low
    on Oct 28, 2026
  2. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/security. The change tightens a Kubernetes NetworkPolicy to enforce least privilege by removing an unused port.
    • Priority: P2-Medium. The port is unused, so there is no active exploit, but the rule opens more than the namespace needs.
    • Value: Medium. Removing an unused port reduces the attack surface and enforces least privilege for the devops namespace.
    • Effort: Low. The fix removes one port entry from a YAML rule and adds a test assertion.
    • Related: feat(k8s): enable telemetry for roadmap-service and k8s services #1197, which asks for a different change. Both work on the devops-to-otel egress rule in k8s/devops/networkpolicy.yaml, but #1197 adds the connection and the candidate removes an unused port from it.
  3. added
    priority/p2-medium
    on Oct 28, 2026
  4. removed
    status/new
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/securityvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions