You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(review): discriminate kubernetes manifests for kube-linter and pluto static scans #1242
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
During branch reviews (devops ai review branch), static analyzers report execution failures for Kube-linter and Pluto: ! Failed during execution: Kube-linter, Pluto (the report's Static Analyzers table says why)
Root causes:
Candidate yaml_paths in _run_static_scanners includes deleted YAML files from branch diffs (e.g. .github/dependabot.yml, .github/workflows/update-prs.yml). Neither the caller nor _scan_kubernetes_manifests checks if p.is_file(), causing Kube-linter (lstat: no such file or directory) and Pluto (invalid file specified) to exit 1.
Generic non-Kubernetes YAML files (such as .github/labels.yml or GitHub Actions workflows) are treated as Kubernetes manifests. Pluto strictly expects Kubernetes API resources and fails to unmarshal sequence-based YAML into a resource map, exiting 1.
Solution
Pre-filter candidate paths to require p.is_file().
Discriminate real Kubernetes manifests (is_kubernetes_manifest(path)) before invoking Kube-linter and Pluto, verifying documents declare apiVersion.
Add test coverage verifying that deleted and non-Kubernetes YAML files are bypassed cleanly by manifest scanners without reporting analyzer failures.
Intake placed this item kept in v0.2.27: it was already in v0.2.27.
Priority: P2-Medium. The review pipeline still completes but reports spurious analyzer failures, confusing reviewers without blocking the workflow.
Value: Medium. Eliminates misleading failure reports for every branch that touches non-K8s YAML or deletes files, improving trust in the review tooling.
Effort: Low. The fix is a small 'is_file()' guard plus an 'is_kubernetes_manifest' discriminator and a few unit tests.
Moved to the backlog: after v0.2.27 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)
Fixes #1242 by preventing false static analyzer execution failures in review pipelines (devops ai review branch) for Kube-linter and Pluto when reviewing branches with deleted files or non-Kubernetes YAML files.
Introduces is_kubernetes_manifest(path) in devops_cli.security.kubeconform and re-exports it in devops_cli.security, validating file existence, supported extensions, bounded file size, and the presence of apiVersion in parsed documents.
Pre-filters candidate Kubernetes manifest paths in _run_static_scanners and _scan_kubernetes_manifests via _is_scannable_manifest, skipping non-manifest YAML files (e.g. .github/labels.yml, GitHub Actions workflows) and deleted files in branch diffs while preserving compatibility with mocked scanner test harnesses.
Resolves target paths to absolute paths in KubelinterScanner.build_command when present.
Upgrades multidict from 6.8.0 to 6.9.1 in uv.lock resolving vulnerability GHSA-54p9-h82j-f925.
Adds comprehensive unit tests in tests/test_review_static_analyzers.py.
Acceptance Criteria of docs/agent/tasks/task-1242-discriminate-k8s-manifests-for-scanners.md:
Kubernetes manifest discrimination.is_kubernetes_manifest(path) returns True for valid Kubernetes manifests (YAML or JSON) declaring apiVersion, and False for non-Kubernetes YAML files (e.g. .github/labels.yml, .github/workflows/ci.yml), non-existent files, and oversized files.
Clean manifest scanning execution._scan_kubernetes_manifests filters candidate paths to valid manifests, ensuring missing files and non-manifest YAML files are bypassed cleanly without setting analyzer status to failed.
Mock test harness compatibility._is_scannable_manifest supports mocked scanner test executions that supply non-existent dummy file paths.
Security vulnerability remediation.uv.lock upgraded for multidict to 6.9.1, passing uv audit.
Changelog fragment.changelog.d/1242.md created; CHANGELOG.md and docs/ROADMAP.md untouched.
Pending a person: uv run devops ci passes on this branch.
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Activity
dan-petty-bot commentedon Oct 6, 2026
Intake placed this item kept in v0.2.27: it was already in v0.2.27.
The review pipeline still completes but reports spurious analyzer failures, confusing reviewers without blocking the workflow.Eliminates misleading failure reports for every branch that touches non-K8s YAML or deletes files, improving trust in the review tooling.The fix is a small 'is_file()' guard plus an 'is_kubernetes_manifest' discriminator and a few unit tests.fix(review): discriminate kubernetes manifests for kube-linter and pl…
dan-petty-bot commentedon Oct 6, 2026
Moved to the backlog: after v0.2.27 started, only a critical fix can join it. A person can place it in a planned release, and that placement stands. (devops roadmap reprioritize)
dan-petty-bot commentedon Oct 6, 2026
What changed
#1243, merged into
release/v0.2.27as 8de12a5.9 file(s) changed.
How it was verified
Check runs at 9f7bf15:
Acceptance Criteria of
docs/agent/tasks/task-1242-discriminate-k8s-manifests-for-scanners.md:is_kubernetes_manifest(path)returnsTruefor valid Kubernetes manifests (YAML or JSON) declaringapiVersion, andFalsefor non-Kubernetes YAML files (e.g..github/labels.yml,.github/workflows/ci.yml), non-existent files, and oversized files._scan_kubernetes_manifestsfilters candidate paths to valid manifests, ensuring missing files and non-manifest YAML files are bypassed cleanly without setting analyzer status tofailed._is_scannable_manifestsupports mocked scanner test executions that supply non-existent dummy file paths.uv.lockupgraded formultidictto 6.9.1, passinguv audit.changelog.d/1242.mdcreated;CHANGELOG.mdanddocs/ROADMAP.mduntouched.uv run devops cipasses on this branch.feat(release): v0.2.27 (#1257)