Repository navigation
fix(security): kube-linter findings carry their own check, message and manifest file, and scan reports keep each one (#1045) - #1471
Merged
Conversation
…d manifest file, and scan reports keep each one (#1045)
This was referenced Oct 9, 2026
Merged
dan-petty
added a commit
that referenced
this pull request
Oct 9, 2026
* chore(review): suppress the logger-credential rule on vault_lease.py's token-path warning (#1456) * docs(service): subscribe each webhook to issues, pull_request, milestone and release only (#1457) Step 8 of the roadmap Service setup and AGENTS.md listed Issues, Pull requests and Milestones (AGENTS.md also push). The Service treats release published as a reprioritize hint, and every other event only starts extra rounds (#1386). The 8 live hooks were switched to these four events on 2026-10-09. * fix(docs): the docs check validates the options inside optional-group brackets such as [-v <ver>] (#1299) (#1458) * fix(mcp): fastmcp's debug log of tool calls never records argument values (#899) (#1459) FastMCP logs every tools/call and prompts/get with its arguments at DEBUG on fastmcp.server.mixins.mcp_operations, so FASTMCP_LOG_LEVEL=DEBUG wrote a vault_set call's key_values to stderr. ArgumentValueLogFilter on that logger replaces each mapping argument with <redacted>, keeping the record and the tool or prompt name; the whole mapping goes, since an undeclared parameter's name is the caller's own text. #862's RejectedInputLogFilter on fastmcp.server.server is removed: since fastmcp 4.0.11 FastMCP logs a refusal's error count and types, never the input, so it matched nothing. The fastmcp_log fixture now captures every FastMCP logger at DEBUG. * fix(security): a sandbox workspace never holds the user's ssh agent or X11 socket (#1384) (#1463) * feat(telemetry): sandbox egress port scoping, collector lane & in-container trace context (#702) (#1465) * refactor(ci): one nesting metric module shared by the pre-commit hook and the scanner (#773) (#1466) devops_cli.core.code_metrics is now the one copy of the nesting and complexity metric. It is stdlib only and imports nothing from devops_cli. The structural-invariants hook runs it with --max-depth 5 and loads no scanner and no pydantic-ai. devops scan complexity, MCP scan_complexity, the inspection hotspots and devops ai spec read it too. - Nesting counts the function body as depth 1, as CI already did, so 5 nested blocks now fail at commit. The six test functions that sat at depth 6 are flattened. - Complexity is Ruff C901's McCabe count. It equals ruff on all 18,000 functions in src/ and tests/, and flags the same 54 functions in src/ at a cap of 10. - One whole-tree test, test_the_source_tree_keeps_its_structural_invariants, parses src/ once through _parse_src(). - The parity test and the hook's subprocess spawns are gone. Removed: devops_cli.security.structural_invariants, analyze_file_complexity and FileComplexityReport. * fix(ai): a web_fetch budget cut inside a code block closes the fence before the truncation note and boundary tag (#1298) (#1462) * feat(review): review tools install from a tools lock with exact versions, binary checksums and hashed Python requirements, and every review records them (#1142) (#1467) * fix(security): mask_secrets masks every GitHub token prefix, ghu_, ghs_ and ghr_ included (#1398) (#1464) * fix(config): the secrets audit never prints a config line it cannot parse, and an unparsable file is not reported clean (#1022) (#1461) * fix(cli): `devops branches create` creates the branch instead of failing on `checkout -b --` (#900) (#1460) * fix(security): kube-linter findings carry their own check, message and manifest file, and scan reports keep each one (#1045) (#1471) * feat(review): devops review score scores saved review sessions against a label file offline and reproduces the S11 and loop baselines (#1138) (#1472) * feat(release): v0.2.30 --------- Co-authored-by: Daniel Petty <[email protected]> Co-authored-by: dan-petty-bot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kube-linter puts
CheckandRemediationnext toDiagnostic, but the adapter read the check from insideDiagnostic. Because of that, every kube-linter finding since v0.1.8 had the title[kube-linter-check] K8s Security Lint Warning, and a directory scan located every finding at the directory itself. Every finding of a scan got the same fingerprint, sodevops scan reportkept 1 of the 7 reports overk8s/at da50329, and a review merged different checks on one object into one candidate.security/kubelinter.py):[<check>] <message>, so the check becomes the rule id and the SARIFruleId.Remediation, or the template when there is none.<manifest from Object.Metadata.FilePath>:<Kind>/<namespace>/<name>, or<Kind>/<name>when there is no namespace. Nodefaultnamespace is guessed.security_misconfiguration.security/normalization.py):correlation_keyincludes the symbol.split_locationreadspath:start-endand:<line>as lines, so those never become symbols.format_k8s_lint_tableescapes its location, title and fix cells. Before, Rich read[no-anti-affinity]as a markup tag and dropped it, sodevops k8s lintnever named the check.devops scan report --json, each cluster entry carries itssymbol, so two objects with one message are no longer identical entries.Tests
tests/fixtures/kubelinter/k8s-da50329.json: the 7 reports fromkube-linter lint k8s --format json(4 checks, 3 files), trimmed, withFilePathmade relative.tests/test_security_kubelinter.py:build_reportkeeps 7 findings in 7 clusters with 7 distinct JSON entries, under 4 rule ids, andto_sarifdeclares 4 rules.tests/test_security_sarif.py:tests/test_output.py: the kube-linter table renders[no-anti-affinity].tests/test_secops.pyandtests/test_consolidation_security_scanner_base.pyuse the real report shape, and the contract test checks forno-read-only-root-fs.To check by hand
devops k8s lint k8s/cloudflared/deployment.yamlnamesno-anti-affinity.devops scan report k8s --scanner kubelinterlists one row per report under its own check:Notes
partialFingerprintsvalue once. A fingerprint suppression of one of these must be recorded again, and a suppression by rulekube-linter-checkmust now name the check. The project is pre-1.0, sochangelog.d/1045.mdrecords this and no migration is added.CONST_SARIF_FINGERPRINT_KEYstaysdevopsCli/v1because test(security): pin the finding fingerprint and run-store digest to literal values #855 has not landed.Closes #1045