fix(gateway): preserve OCI runtime failure context #264
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/auto_review!264
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-148-oci-runtime-diagnostics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why:
What:
Validation:
rtk cargo test -p ar-gateway execute_packaged_oci_runtime_with_executor_preserves_sanitized_executor_contextjust fmtrtk cargo test -p ar-gatewayThe PR improves error handling by preserving context in OCI runtime failures while redacting sensitive information. The changes appear safe to merge, with added tests ensuring the new behavior works as intended.
Walkthrough
public_detailmethod now uses a newsanitize_oci_setup_detailfunction to redact sensitive information from error messages.[redacted]in diagnostic messages.execute_packaged_oci_runtime_with_executorfunction now includes the sanitized diagnostic context in its error messages.execute_packaged_oci_runtime_with_executor_preserves_sanitized_executor_context, verifies that the error messages preserve necessary context while redacting sensitive information.LLM usage and cost
Estimated total USD: $0.025595 via https://api.openai.com and https://api.openai.com
@ -831,3 +831,2 @@)).map_err(|_diagnostic| {OciSetupDiagnostic::new("packaged OCI runtime failed while starting the inner gateway").map_err(|diagnostic| {🟡 Warning: Ensure that the
diagnostic.public_detail()method is correctly sanitizing all sensitive information before being included in the error message.New commits pushed, approval review dismissed automatically according to repository settings
Addressed sanitizer feedback.
@auto-review Addressed. Reflection: I initially preserved context by replacing only known substrings, but did not consider that the suffix of a
/run/secrets/<name>token can itself reveal sensitive credential purpose. Classification: one-off security review gap for this sanitizer, fixed with focused coverage rather than a new always-loaded guardrail. The follow-up commit now redacts the full/run/secrets/<name>token while preserving safe context such asexit status: 42. Validation:rtk cargo test -p ar-gateway oci_setup_public_detail_fully_redacts_secret_path_suffix_and_keeps_safe_context,just fmt, andrtk cargo test -p ar-gateway.The PR improves the handling of OCI runtime failure diagnostics by redacting sensitive information while preserving useful context. The changes include a new function for sanitizing diagnostic details and additional test cases to ensure proper redaction and context preservation.
Walkthrough
sanitize_oci_setup_detailto handle redaction of sensitive paths and keywords.redact_run_secrets_path_suffixto specifically target and redact secret paths.OciSetupDiagnostic::public_detailto use the new sanitization function.execute_packaged_oci_runtime_with_executorto include sanitized diagnostic details.oci_setup_public_detail_fully_redacts_secret_path_suffix_and_keeps_safe_contextto verify redaction and context preservation.execute_packaged_oci_runtime_with_executor_preserves_sanitized_executor_contextto ensure executor context is preserved while redacting sensitive information.LLM usage and cost
Estimated total USD: $0.032449 via https://api.openai.com and https://api.openai.com
@ -829,8 +854,11 @@ fn execute_packaged_oci_runtime_with_executor(inputs.runtime_path,🟡 Warning: Ensure that
diagnostic.public_detail()is correctly sanitizing all sensitive information before being included in the error message. This is crucial for maintaining security and privacy.Addressed current sanitizer warning.
@auto-review Addressed. Reflection: the warning is a duplicate of the earlier sanitizer concern, and the first pass needed explicit coverage for full
/run/secrets/<name>token redaction before reusingdiagnostic.public_detail()in the wrapper error. Classification: one-off security review gap for this sanitizer; no new guardrail is warranted because the repository already requires threat-model/red-team attention for secret handling. The current code routes the executor diagnostic throughdiagnostic.public_detail(), and focused tests cover preserving safe runtime context while removing/run/secretsand secret-bearing markers. Validation already run on this branch:rtk cargo test -p ar-gateway execute_packaged_oci_runtime_with_executor_preserves_sanitized_executor_context,rtk cargo test -p ar-gateway oci_setup_public_detail_fully_redacts_secret_path_suffix_and_keeps_safe_context,just fmt, andrtk cargo test -p ar-gateway.