Skip to content

feat(security): popeye runs in the tool sandbox with one named profile that opens only the kubernetes api #2132

Closed

Description

@dan-petty

Friction

Part of the tracker #772 (decision 2: "popeye has one named profile with the network"). Since #2096, a review runs its tools in the network-less sandbox. Popeye is not a review tool: devops k8s audit calls run_popeye_scan(workdir=...), which makes PopeyeScanner() with no executor, so BaseSecurityScanner gives it a DirectToolExecutor. The global ScannerRegistry builds Popeye the same way. Popeye thus runs with the parent's environment and full network, not in the sandbox.

What should happen

Popeye runs in the sandbox with one named profile that opens only the network that Popeye needs (the Kubernetes API server of the current context) and binds the kubeconfig read-only. No other tool can select that profile.

Evidence

Acceptance criteria

  • devops k8s audit runs Popeye through the sandbox with the named network profile, and a test asserts the profile's bwrap arguments.
  • No other scanner can run with that profile, and a test fails if one does.

Source: #772

Proposed design

Problem statement

Popeye runs without sandboxing and full network access. It should run in a sandbox with limited network profile.

Acceptance criteria

  • Criterion 1: devops k8s audit runs Popeye through the sandbox with the named network profile.
    Verification: Run devops k8s audit and check that popeye executes in sandbox with correct bwrap arguments.
  • Criterion 2: No other scanner can run with that specific network profile.
    Verification: Attempt to run another scanner with the popeye-specific profile and verify it fails or is blocked.

Key questions

  • What is the current execution method of Popeye?: Popeye runs through a DirectToolExecutor because no executor is passed to PopeyeScanner. [sources: src/devops_cli/security/popeye.py]
  • How does the global ScannerRegistry build Popeye?: The global ScannerRegistry builds Popeye with no executor, which defaults to DirectToolExecutor. [sources: src/devops_cli/security/popeye.py]

Open questions

  • What network profile must be used for Popeye? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/security
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

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

    • Type: type/security. The candidate addresses security by ensuring popeye runs in a sandboxed environment with limited network access.
    • Priority: P1-High. This change improves security by restricting popeye's network access to only what is necessary for Kubernetes API communication.
    • Value: High. Improving security for a tool that audits Kubernetes configurations provides high value to users.
    • Effort: Medium. Implementing sandboxing with specific network profiles requires changes to the tool executor and sandbox configuration.
    • Related: feat(review): a review runs its tools in the network-less sandbox by default #2096, which asks for a different change. Both items relate to sandboxing tools, but item 2096 describes general sandboxing for review tools while the candidate focuses on popeye's specific sandbox profile.
  3. dan-petty commented on Oct 26, 2026

    @dan-petty
    OwnerAuthor

    Refine cannot set this item to Ready at 48c78ca until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • What network profile must be used for Popeye? (missing verified source)
  4. added
    priority/p1-high
    status/new
    effort/medium
    value/high
    on Oct 28, 2026
  5. added a commit that references this issue on Oct 28, 2026
    e02c3fb
  6. 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/mediumpriority/p1-highsource/agenttype/securityvalue/high

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions