Skip to content

Replace chrono (RUSTSEC-2026-0543, unmaintained) #1474

Open

Description

@sdairs

Why

cargo audit --deny warnings fails on RUSTSEC-2026-0543, published 2026-11-17: chrono is unmaintained, all versions affected, no patched version. The maintainer is winding the crate down (chronotope/chrono#1768). The scheduled audit on main and every manifest or lockfile PR (for example #1473) fail until this is resolved.

It is an informational advisory, not a vulnerability. A lockfile update cannot clear it.

Where chrono is used

chrono 0.4.45 is a direct dependency of clickhousectl and clickhouse-cloud-api only; nothing else pulls it in. About 159 references:

  • clickhouse-cloud-api (71, public API): chrono::DateTime<chrono::Utc> on model fields (created_at, expire_at and similar), through chrono's serde feature. Changing the type is a breaking change for the published crate.
  • clickhousectl: RFC 3339 parse and format (including millisecond precision for the Postgres API), Utc::now, Unix timestamps, date arithmetic in cloud/activity.rs, and two strptime-style HTTP date formats in version_manager/download.rs.
  • clickhouse-openapi-analyzer: matches the type names DateTime, NaiveDateTime and NaiveDate in src/responses.rs.

No time zone database is used; everything is UTC or a fixed offset.

Options

jiff time Ignore the advisory
Version 1.0.0 (2026-11-15), MSRV 1.85 0.3.55, MSRV 1.88 n/a
Named by the advisory yes, and by the chrono maintainer yes n/a
serde for RFC 3339 default on Timestamp, no field attributes #[serde(with = "time::serde::rfc3339")] on every field, plus an Option variant n/a
Public API stability 1.0 still 0.x n/a
Already in the tree no dev-dependencies only (AWS SDK, rcgen); not in the shipped binary n/a

Recommendation

Move to jiff, in 0.6.0.

  • Model fields stay a plain type with no serde attributes, which keeps the analyzer's type-based mapping.
  • A 1.0 type is a better thing to expose from a published library than a 0.x one.
  • 0.6.0 is unreleased and already breaking, so the public type change costs nothing extra now. Later it needs another breaking release, with an audit ignore in between, which AGENTS.md says to avoid.

jiff 1.0.0 is two days old. Check its docs for the exact API before starting; the mapping below is the expected one, not verified against 1.0.

Plan

  1. Library PR: chrono::DateTime<chrono::Utc> → jiff::Timestamp on all model fields and the PgCreatedAtProperty alias; update the analyzer's type-name matcher; changelog entry under ## Unreleased with the caller migration. Confirm wire output is unchanged (…Z, and what the fractional digits look like).
  2. CLI PR: migrate the remaining call sites, drop chrono from both manifests, confirm cargo audit is clean.

Done when

  • chrono is not in Cargo.lock.
  • cargo audit --deny warnings passes.
  • Request and response timestamps are byte-identical on the wire for the existing tests.

Activity

  1. added this to the v0.6.0 milestone on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions