Skip to content

Wire ConfighubScanProvider.ScanCluster() to cub-scan via resource export #200

@monadic

Description

@monadic

Context

ConfighubScanProvider.ScanCluster() currently delegates entirely to the legacy provider. cub-scan is a static file scanner with no cluster-scanning mode.

What's needed

To use cub-scan for cluster scanning:

  1. Export live cluster resources to temp files via K8s API
  2. Invoke cub-scan --format json on each exported manifest
  3. Merge cub-scan findings with runtime scan results (state, timing bombs, dangling, lifecycle hazards) which inherently require live K8s APIs and stay on the legacy provider

Current state

Acceptance criteria

  • Cluster resources exported to temp directory (namespace-scoped and cluster-scoped)
  • cub-scan invoked on exported manifests when binary is available
  • Runtime scan types (state, timing bombs, dangling, lifecycle hazards) remain on legacy provider
  • Graceful fallback to legacy if cub-scan fails or isn't available
  • Integration test with fake cub-scan binary (follows existing pattern in test/integration/scan_provider_test.go)

Spun out from v1.2 (#190) per roadmap known-limitation note.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions