← Back to Pull requests

[18.0][FIX] cetmix_tower_server: verify SSH hosts #515

Closed
unknown closed this pull request without merging on Nov 10, 2026 17:13 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 11:14 UTC
Author

Unknown SSH hosts could be accepted for command and file sessions when
no Tower pin was supplied, including through proxy routes. Require a
verified Tower pin or a trusted system known_hosts entry before
authentication. Explicit pins take precedence over system entries and
preserve host-key algorithm selection on servers offering multiple keys.

Keep Get from Host available without authenticating to the target or
creating a reusable target session. Proxy hops remain verified. Existing
Skip Host Key settings now appear as Use System Host Keys and require
trusted known_hosts entries or a verified Tower pin. Include migration
guidance and Task 5717 changelog fragments for both addons.

Addresses GHSA-q88c-38jh-8936:
https://github.com/cetmix/cetmix-tower/security/advisories/GHSA-q88c-38jh-8936

Kudos to @ParzivalHack for reporting this issue! 🚀

Validation on this commit, rebased onto 18.0:

  • Full cetmix_tower_server and cetmix_tower_ssh_proxy suites in a fresh

  • Docker-backed Odoo database: 793 tests, 0 failures, 0 errors.
  • Regression coverage for unknown/changed keys, malformed pins, password

  • and private-key authentication, nondefault ports, retries, discovery,
    and proxy routing. Real local SSH handshakes cover multiple host-key
    algorithms on direct and proxy connections.
  • pre-commit run --all-files: passed.

  • git diff --check: passed.
  • Task 5717

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Security
    SSH commands and file transfers reject unknown or changed host keys, including connections through proxies.
    Configured Tower host keys take precedence over system host keys. Using system host keys requires a trusted entry for the Tower service user.
    New Features
    Host keys can be retrieved without authenticating to the target server. Proxy connections still require trusted host keys at each hop.
    Adding a target host key disables Use System Host Keys for that server.
    Documentation
    Updated setup guidance explains host-key verification, independent key verification, requirements for nondefault SSH ports, and the renamed Use System Host Keys setting.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 290 lines (+217 / -73) across 3 files Reviewer: Aldeigja Review duration: 1799m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 290 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.339
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #515"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.9% (MEDIUM) · Higher = larger blast radius
    39.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%