← Back to Pull requests

Add live CA-certificate mitigation tools for COS and GKE #79

Closed
unknown closed this pull request without merging on Oct 22, 2026 13:34 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 22:56 UTC
Author

Summary

Adds cos-ca-cert-mitigation/ providing live mitigation tools to distrust the compromised eMudhra (emSign) root CAs and the cross-signing AAA Certificate Services (Comodo_AAA_Services_root.crt) root CA on running Container-Optimized OS (COS) instances and GKE Standard (COS_CONTAINERD) nodes before upgrading to patched OS images.

What's Included

| File | Description |
| :--- | :--- |
| cos-ca-cert-mitigation/cos/mitigate_cos_ca_certs.sh | Standalone, idempotent live-VM mitigation script for COS GCE instances. |
| cos-ca-cert-mitigation/gke/cos-ca-cert-mitigation.yaml | Privileged Kubernetes DaemonSet (kube-system/cos-ca-cert-mitigator) that applies the mitigation across all existing and newly autoscaled COS nodes in a GKE Standard cluster without rebooting nodes or disrupting running pods. |
| cos-ca-cert-mitigation/README.md | Deployment, verification, and cleanup instructions for GKE Standard clusters and standalone COS GCE VMs. |

How the Mitigation Works

1. System CA Store (/etc/ca-certificates.conf & /etc/ssl/certs):
- Deselects mozilla/emSign_.crt and mozilla/Comodo_AAA_Services_root.crt in /etc/ca-certificates.conf and runs update-ca-certificates --fresh.
- Mitigates host OpenSSL/C/C++ consumers (curl, wget, git, oslogin, systemd, chrony), host Python (certifi, urllib3, requests, cloud-init), and Go crypto/x509 CLIs (kubectl, crictl, ctr, docker).
2. Read-Only /usr Trust Stores (dm-verity):
- Masks /usr/share/chromeos-ca-certificates/Comodo_AAA_Services_root.pem with /dev/null (mitigating update_engine, libbrillo, and crash_sender).
- Bind-mounts the regenerated /etc/ssl/certs/ca-certificates.crt over /usr/share/grpc/roots.pem if present.
3. Built-In Container Utilities (toolbox & cos-extensions):
- Updates TOOLBOX_DOCKER_TAG="v20261020" in /etc/default/toolbox.
- Wraps /usr/bin/cos-extensions via /run/cos-mitigation so cos-extensions install gpu defaults to gcr.io/cos-cloud/cos-gpu-installer:v2.7.11.
4. Active Host Daemons:
- Restarts active host services (containerd, docker, kubelet, fluent-bit, update-engine, node-problem-detector, google-guest-agent
, google-osconfig-agent, device_policy_manager) so long-running Go and C/C++ processes reload /etc/ssl/certs/ca-certificates.crt in-place.

Testing

Verified end-to-end (pre-mitigation, post-mitigation, idempotency re-run, and post-reboot) across:

  • GCE VMs: cos-117-lts, cos-121-lts, cos-125-lts, cos-129-lts, cos-133-lts, and cos-dev (M138)

  • GKE Standard Cluster: COS_CONTAINERD node pool (verified DaemonSet rollout and zero workload pod restarts)
  • Diff: 344 lines (+258 / -86) across 4 files Reviewer: SergeyKanzhelev Review duration: 878m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 344 lines diff across 4 files
    0.42
    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.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #79"
    general weight: 0.35
    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: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    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: 16.7% · Safe to merge
    16.7%