fix(setup): verify Kitware archive key fingerprint - #233
Conversation
Validate the downloaded archive key against Kitware's published primary fingerprint before dearmoring or installing it. Reject missing, mismatched, or bundled extra primary keys. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. WalkthroughThe host setup now validates the downloaded Kitware archive key with exactly one matching primary fingerprint. Unit tests focus on this validator. The codespell ignore list includes ChangesKitware key validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change adds verification of the Kitware signing key before installing it while preserving expected setup behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
Use a compact Kitware-specific fingerprint predicate and replace the setup-wide mocks with one focused unit test. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Summary
Security impact
The default
holoscan setuppath callssetup_cmakewhenever CMake is absent or below the required version. Previously, bytes returned by the fixed HTTPS endpoint flowed directly throughgpg --dearmorinto a root-owned apt keyring. The URL is not user-controlled, but the network response is untrusted and the path is reachable, so a substituted key could become an apt trust anchor.The expected full fingerprint,
4DBEBE3EEC96E7B8C6EC5BE99E92FDC6C5B9BA75, is published by the Kitware APT repository. The setup now reads GPG machine output and requires exactly one primary key with that fingerprint before writing the keyring or apt source. Legitimate subkeys remain supported, while an additional primary key causes setup to fail closed.Testing
PYTHONPATH=src pytest -q -o addopts="" tests/unit— 493 passed, 1 skippedPYTHONPATH=src python -m holoscan_cli lint— all pre-commit hooks passedAI-assisted: Created with Codex/GPT at the user's request.
Summary by CodeRabbit
Security
Bug Fixes