Skip to content

fix(security): resolve pluto single file scan timeout and telemetry test export error #645

Closed

Description

@dan-petty

Description

When running reviews or scanning Kubernetes manifests, Pluto deprecation scans timeout after 60 seconds on every YAML manifest:

subprocess.TimeoutExpired: Command '['pluto', 'detect-files', '-f', '/workspaces/devops-cli/k8s/...', '-o', 'json']' timed out after 60.0 seconds

Root Cause

In src/devops_cli/security/pluto.py, PlutoScanner.build_command invoked pluto detect-files -f <file> -o json. In the Pluto CLI, -f specifies --additional-versions, not the input file. Consequently, Pluto defaults to scanning the current workspace recursively, hanging on large file trees and timing out after 60s per file. For single files, Pluto requires pluto detect <file> -o json. For directories, it uses pluto detect-files -d <dir> -o json.

Additionally, in tests/test_telemetry_collector_export.py, the import from devops_cli.commands import telemetry as telemetry_commands fails static type analysis due to explicit __all__ export boundaries in devops_cli.commands.

Remediation Plan

  1. Update PlutoScanner.build_command in src/devops_cli/security/pluto.py to dispatch to pluto detect for files and pluto detect-files -d for directories.
  2. Update build_pluto_cmd in src/devops_cli/config/commands.py and scan_pluto in src/devops_cli/ai/tools/builtin_tools.py to support single file paths.
  3. Update tests/test_telemetry_collector_export.py to import devops_cli.commands.telemetry as telemetry_commands.
  4. Add comprehensive unit tests in tests/test_command_builders.py and tests/test_secops.py validating file vs directory Pluto command invocation.
  5. Verify 100% passing Gated CI quality checks.

Activity

  1. added this to the v0.2.23 milestone on Sep 27, 2026
  2. added
    type/bug
    scope/security
    priority/p1-high
    on Sep 27, 2026
  3. dan-petty commented on Sep 28, 2026

    @dan-petty
    OwnerAuthor

    Closed by #647, merged into release/v0.2.23.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

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

    priority/p1-highscope/securitytype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions