fix(attest): require absolute env path overrides#784
Merged
Conversation
Reject empty and relative values for configfs, RTMR, and CCEL path overrides so misconfiguration cannot silently use the process cwd.
Contributor
There was a problem hiding this comment.
Pull request overview
Tightens attestation-related environment path overrides to require non-empty absolute paths, preventing relative values from accidentally resolving against the process working directory (notably for TDX ConfigFS detection and RTMR sysfs extension paths, and CCEL file decoding).
Changes:
- Added a shared helper to validate environment path overrides as non-empty and absolute, and applied it to
DCAP_TDX_QUOTE_CONFIGFS_PATHandDCAP_TDX_RTMR_SYSFS_PATH. - Made
is_tdx_available()ignore invalid (e.g., relative) ConfigFS overrides instead of potentially validating against the current working directory. - Added
DSTACK_CCEL_FILEresolution with explicit rejection of empty/relative overrides, plus targeted unit tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| dstack/tdx-attest/src/linux.rs | Adds absolute-path validation for ConfigFS/RTMR env overrides; prevents relative overrides from influencing TDX availability and RTMR behavior; adds tests. |
| dstack/cc-eventlog/src/tcg.rs | Introduces ccel_file_path() to enforce absolute CCEL override paths and adds tests for override/default behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kvinwang
disabled auto-merge
July 16, 2026 02:47
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
kvinwang
enabled auto-merge
July 16, 2026 02:47
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
Follow-up to #782 for the Copilot review that landed after the PR was merged:
DCAP_TDX_QUOTE_CONFIGFS_PATH,DCAP_TDX_RTMR_SYSFS_PATH, andDSTACK_CCEL_FILEis_tdx_available()return true via a relative cwd pathTest plan
cargo test -p tdx-attest -p cc-eventlog