fix(plugins): update code signing EKU OID encoding and improve Fulciointermediate handling#86
Conversation
… intermediate handling - Correct DER encoding for CODE_SIGNING_EKU_OID to match webpki expectations - Add embedded Fulcio intermediate certificate and use as fallback if none provided - Clarify certificate validity checks and error handling for expired certs
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
corvus-plugins-edge | 1ded432 | Feb 25 2026, 09:42 PM |
📝 WalkthroughWalkthroughModifies certificate verification logic by replacing OID byte encoding, introducing embedded Fulcio intermediate certificate as fallback, updating certificate chain validation to handle intermediates explicitly, and reworking runtime verification to selectively ignore time-based validation errors. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Contributor ReportUser: @yacosta738
Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-02-25 to 2026-02-25 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
clients/agent-runtime/src/plugins/mod.rs (1)
1840-1853:⚠️ Potential issue | 🟠 MajorAvoid string-matching
rustls-webpkierrors for trust decisions.Line 1847 uses
contains("validity"), which is too broad and can suppress non-time-based chain failures (e.g.,ExtensionValueInvalid), weakening runtime verification guarantees. Inrustls-webpki 0.103, use explicit enum matching instead:🔧 Proposed fix
if let Err(e) = result { - let error_str = e.to_string(); - let error_lower = error_str.to_ascii_lowercase(); - if !error_lower.contains("expired") - && !error_lower.contains("not yet valid") - && !error_lower.contains("validity") - { - return Err(e) - .context("Certificate chain verification against Fulcio roots failed"); - } - // Log the time-based issue at debug level for observability - tracing::debug!("Runtime certificate time validation skipped: {}", error_str); + match e { + webpki::Error::CertExpired { .. } + | webpki::Error::CertNotValidYet { .. } + | webpki::Error::InvalidCertValidity => { + tracing::debug!("Runtime certificate time validation skipped: {e}"); + } + other => { + return Err(other) + .context("Certificate chain verification against Fulcio roots failed"); + } + } }(Note:
rustls-webpki 0.103struct variants require{ .. }destructuring; the enum is#[non_exhaustive].)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@clients/agent-runtime/src/plugins/mod.rs` around lines 1840 - 1853, The code currently string-matches the verification error (variables result / e / error_str / error_lower) to detect time-based failures; replace that with an explicit match on the concrete rustls-webpki error enum instead of contains("validity") etc. Cast or downcast the error to the rustls_webpki error type used by your verifier and match its time-related variants (e.g., the expiry / not-yet-valid variants using the enum variant patterns with { .. } as required by rustls-webpki 0.103); if the error is one of those time-based variants log at debug and continue, otherwise return Err(e). Update the tracing::debug message to include the original error after matching.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@clients/agent-runtime/src/plugins/mod.rs`:
- Around line 1840-1853: The code currently string-matches the verification
error (variables result / e / error_str / error_lower) to detect time-based
failures; replace that with an explicit match on the concrete rustls-webpki
error enum instead of contains("validity") etc. Cast or downcast the error to
the rustls_webpki error type used by your verifier and match its time-related
variants (e.g., the expiry / not-yet-valid variants using the enum variant
patterns with { .. } as required by rustls-webpki 0.103); if the error is one of
those time-based variants log at debug and continue, otherwise return Err(e).
Update the tracing::debug message to include the original error after matching.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
clients/agent-runtime/src/plugins/mod.rs
Summary by CodeRabbit