Skip to content

Decision: Select a safe treatment for glib GHSA-wrw7-89jp-8q8g #177

Description

@Niko4417

Lifecycle contract: docs/qa/issue-lifecycle.md.

Canonical lifecycle states: status: new, status: triaged, status: ready,
status: in progress, status: pr open, status: ready for human review, status: blocked,
status: waiting for user, and status: done.

Parent Epic: None — standalone supply-chain security decision; tracked alongside #49 without becoming a lifecycle-activation child

Planning contract

  • Contract version: v1
  • Change classification: mandatory-delta

Implementation Ready freezes the decision question, authority, constraints, options, evaluation
method, acceptance criteria, evidence requirements, and delivery target for this version. A semantic
change increments the version and returns the issue to status: new until readiness validation
succeeds again. A planning agent may request validation directly after an evidence-first grilling
session has resolved the product inputs; no separate GitHub approval or human comment is required.

Decision question and authority

  • Decision to resolve: Select and prove the smallest safe, supportable treatment for Dependabot alert
    ci: establish Keiko-parity quality gates #1 / GHSA-wrw7-89jp-8q8g affecting locked glib 0.18.5, without weakening dependency gates,
    hiding the alert, expanding Linux into the supported platform set, or prescribing an unproven
    dependency migration.
  • Why it must be decided now: The repository has an open medium-severity alert over its authoritative
    cross-target Cargo lock. The current declared deliverable is macOS arm64, but the vulnerable crate
    remains in the deferred Unix/GTK graph and no routine lock update can cross the GTK 0.18 constraint.
  • Decision owner: Keiko Native maintainers, with security and release evidence.
  • Agent Planning Baseline, Decision Addendum, parity, risk, or incident reference:
    Agent Planning Baseline security/privacy, verification/release evidence, and supply-chain/licence
    drift risk; Decision Addendum supported-platform boundary; Dependabot alert ci: establish Keiko-parity quality gates #1.
  • Relevant accepted ADRs and repository evidence: ADR-0001; ADR-0006; protected dev commit
    f65ee963a66c1c92bda60f3dacd7a2f1f5a603ba;
    Dependabot alert #1;
    GHSA-wrw7-89jp-8q8g;
    RUSTSEC-2024-0429.
  • Required resulting record: security decision and ADR-0013; separately accepted implementation issue for any repository or dependency mutation

Current evidence and uncertainty

  • native/Cargo.lock at the baseline resolves glib 0.18.5.
  • The advisory affects glib >=0.15.0,<0.20.0; the first patched release is 0.20.0. The defect
    is unsoundness in VariantStrIter iterator implementations and can result in undefined behavior
    and null-pointer crashes in optimized builds.
  • cargo tree --locked --offline --target all -i glib@0.18.5 reaches the package through the
    Tauri 2.11.5 / Tauri runtime / Wry 0.55.1 GTK 0.18 and WebKitGTK graph.
  • The same inverse query for aarch64-apple-darwin and x86_64-pc-windows-msvc prints no
    dependency path. This proves target-graph absence for the inspected baseline, not permanent
    safety or authority to ignore the cross-target lock.
  • quality/project.json currently declares only the macOS arm64 productive target. Windows remains
    a first-class product platform but is not yet a declared productive target; Linux remains
    explicitly deferred.
  • Tauri #12048 was closed as not planned.
    Tauri #12564 records that Tauri will not maintain
    a GTK3 fork and tracks GTK4 migration for v3.
  • gtk3-rs is archived. The gtk-rs maintainer states that
    0.18 is EOL and will receive no new release.
  • No released, supportable Keiko dependency change has yet been proven. A direct glib lock bump,
    alert dismissal, ignore entry, warning-mode conversion, universal-lock scan removal, or threshold
    reduction is not authorized by this issue.

Constraints and non-negotiables

  • Product and user constraints: Preserve a secure, reproducible desktop product on the declared
    macOS target and the approved future Windows boundary; do not add Linux acceptance or runtime
    support.
  • Architecture and dependency constraints: Keep the Tauri host decision and current supported
    runtime behavior unchanged unless equal compatibility evidence justifies an ADR amendment.
    Preserve one authoritative, reproducible dependency model and do not create an unmanaged fork or
    parallel hidden lock graph.
  • Security, privacy, regulatory, and operational constraints: The alert and advisory remain visible
    throughout evaluation. Do not dismiss, suppress, ignore, downgrade, or weaken Dependabot, OSV,
    Dependency Review, Socket, SBOM, provenance, signing, or release gates. Treat optimized-build
    undefined behavior as security-relevant even when current supported target graphs exclude it.
  • Supported platforms and reference environments: Current declared aarch64-apple-darwin;
    compatibility check for the approved future x86_64-pc-windows-msvc boundary; --target all
    only as inventory evidence; Linux is deferred and not acceptance authority.
  • Explicit non-goals: Implementing a dependency change; modifying PR docs: govern authenticated lifecycle overflow recovery #171; modifying the Codex
    lifecycle-tracer task; activating Linux; dismissing Dependabot alert ci: establish Keiko-parity quality gates #1; adding an advisory ignore;
    selecting Tauri v3, GTK4, a fork, vendoring, or manifest restructuring without equal evidence.

Evaluation journey

  • Applicability: Not applicable — security and supply-chain decision with no user-facing UI change
  • Actor and user goal: A security/release maintainer chooses a treatment that keeps shipped
    macOS/Windows composition safe and dependency evidence truthful.
  • Representative starting state and sanitized test data: Protected dev baseline above, committed
    manifests and locks, public advisories, and public upstream metadata only.
  • Observable path and failure or recovery states: Reproduce the all-target and target-specific
    graphs; evaluate every option; reject unavailable, unmaintained, incompatible, unverifiable, or
    gate-weakening treatments; preserve the last accepted dependency baseline until a separate
    implementation contract is ready.
  • Platform variants: macOS arm64 is authoritative today; Windows compatibility must not be
    foreclosed; Linux results are inventory/diagnosis only.
  • Evidence produced consistently for every affected option: Exact versions and target graphs,
    released-version and maintenance status, provenance/licence/SBOM impact, supported-target build
    and test feasibility, quality-gate impact, migration/removal cost, failure modes, and residual
    risk.

Options

Option Description Expected benefit Cost or risk Rejection condition
A — released supported upgrade Move only to a released Tauri/Wry/GTK composition whose resolved supported-target graph removes the vulnerable range Maintained upstream path and ordinary dependency provenance May require breaking host/runtime migration; no proven release currently exists Reject if unreleased, unsupported, Linux-expanding, behavior-changing without evidence, or still resolves affected glib
B — target-accurate graph removal Restructure manifests/features/locks so the deferred GTK3 graph is absent from authoritative shipped composition while full dependency inventory remains truthful Removes non-shipped vulnerable bytes without adopting an upstream fork Cargo/Tauri constraints may make the split complex or create parallel dependency truth Reject if any supported artifact can reach the graph, the alert is merely hidden, or scanning/SBOM/provenance weakens
C — maintained patched source Adopt a verifiable maintained patch/fork only through a separately owned dependency contract Could fix the exact code without waiting for Tauri v3 High provenance, maintenance, licence, update, and incident-response burden Reject without durable ownership, immutable source identity, upstream-diff audit, supported-platform tests, SBOM/signing evidence, and removal plan
D — visible bounded deferral Retain the current cross-target lock and open alert while proving supported artifacts cannot reach it and defining exact re-evaluation triggers Smallest immediate product change and preserves alert visibility Leaves known vulnerable/EOL bytes in the repository resolve graph and may become stale as targets change Reject if any declared or packaged target reaches it, policy requires repository-wide removal, proof is incomplete, or triggers/owner/expiry are absent

No suppression, alert dismissal, warning mode, lowered threshold, or advisory exception is an option.

Evaluation plan

  • Method: research + threat-model evaluation + compatibility test + operational evaluation
  • Time or scope box: One decision issue; no productive dependency mutation. Stop after a reproducible
    recommendation and accepted ADR/security record.
  • Workloads, scenarios, or attack paths: All-target graph inventory; current macOS graph; approved
    future Windows graph; optimized VariantStrIter reachability; package/SBOM inclusion; upgrade,
    removal, fork, and deferred-state failure/recovery.
  • Metrics, thresholds, and measurement method: Zero affected glib in any accepted shipped
    composition; zero gate weakening or hidden advisory; reproducible locked resolution; maintained
    provenance; no Linux scope expansion; complete supported-target quality feasibility.
  • Reference hardware, operating systems, versions, and dependencies: Protected baseline commit;
    Node.js 24.18.x/npm 11.16.x; repository Rust toolchain; Tauri 2.11.5; Wry 0.55.1; GTK 0.18.2;
    glib 0.18.5; macOS arm64; Windows target graph compatibility.
  • Required primary sources and repository evidence: GitHub alert/advisory, RustSec advisory and fix,
    upstream release manifests and maintenance statements, committed Cargo manifests/lock,
    quality/project.json, target-aware dependency workflow, and retained command output with no
    private data.
  • Reproduction commands and retained artifacts:
    cargo tree --locked --offline --manifest-path native/Cargo.toml --target all -i glib@0.18.5
    cargo tree --locked --offline --manifest-path native/Cargo.toml --target aarch64-apple-darwin -i glib@0.18.5
    cargo tree --locked --offline --manifest-path native/Cargo.toml --target x86_64-pc-windows-msvc -i glib@0.18.5
    npm run native:dependencies
    npm run native:security
    npm run quality
    npm audit --audit-level=high
    
  • Testability, automation harness, CI ownership, and production-artifact isolation: Use detached
    temporary worktrees and repository-owned dependency/security commands. Experimental manifests or
    patches remain outside productive roots, are never pushed, and are deleted after evidence capture.
    Any selected mutation receives a separate accepted issue and exact-head CI.
  • Bias, uncertainty, and evidence limitations: Dependabot evaluates the cross-target lock while the
    repository's OSV gate intentionally evaluates the declared target graph. Target absence does not
    prove future absence, non-reachability of every code path, or acceptability of EOL dependencies.
    Upstream plans and unreleased branches are not implementation evidence.

Experimental code is evidence only. It may exist only in a private temporary detached worktree and
must be deleted before this decision completes. Nothing becomes production architecture without a
separately accepted implementation issue.

Execution Authority

The repository-wide defaults in AGENTS.md apply and are not repeated here.

  • Authorized repository: oscharko-dev/Keiko-Native
  • Exact delivery target: dev (standalone)
  • Allowed write scope: docs/adr/ADR-0013-glib-advisory-treatment.md,
    docs/qa/quality-gates.md, and quality/contract.test.mjs only when required to record and pin
    the selected decision; temporary evaluation artifacts may exist only outside the repository
  • Additional prohibited paths or actions: All manifests, lockfiles, workflows, productive source,
    PR docs: govern authenticated lifecycle overflow recovery #171, Codex lifecycle-tracer work, repository settings, branch protection, Dependabot state,
    advisory exceptions, and dependency versions
  • Authorized external mutations: Create/update this issue and a decision pull request only; read
    public upstream evidence and Dependabot alert ci: establish Keiko-parity quality gates #1; no alert dismissal, upstream mutation, release,
    label-policy, or repository-setting mutation
  • Required credentials or secrets: Existing GitHub repository access only; no new secret or
    dependency-registry credential
  • Delivery authority: human-only manual merge to dev
  • Additional stop or escalation conditions: Stop if a supported remediation cannot be reproduced;
    if evaluation requires Linux product scope, a new identity/secret, an unmanaged fork, gate
    weakening, alert dismissal, or an implementation mutation; or if another issue/PR begins owning
    the same advisory treatment

The executing agent chooses a dedicated source branch using its own runner prefix. It must include
the issue number, remain unique to this issue, and be recorded in the pull request.

Decision matrix

Weights are fixed before option evaluation and must not change after results are known without
incrementing the contract version and returning to status: new.

Criterion Weight Option A Option B Option C Option D Evidence
Supported-artifact security correctness 30 TBD TBD TBD TBD Target graphs, optimized-path analysis, packaged inventory
Gate and alert integrity 20 TBD TBD TBD TBD Dependabot/OSV/Dependency Review/Socket contract
macOS and Windows compatibility 20 TBD TBD TBD TBD Locked builds, tests, packaging feasibility
Provenance and maintenance ownership 15 TBD TBD TBD TBD Releases, signatures, licences, SBOM, upstream status
Reproducibility and operational clarity 10 TBD TBD TBD TBD Hermetic commands, update/recovery/runbook evidence
Scope and lifecycle cost 5 TBD TBD TBD TBD Migration, removal, support, and follow-up estimate

Acceptance criteria

  • AC1 — Every viable option is evaluated against the fixed matrix and the same primary-source,
    target-graph, supported-platform, provenance, and quality-gate evidence bar.
  • AC2 — The recommendation follows reproducibly from recorded evidence and distinguishes current
    target absence from future platform safety.
  • AC3 — ADR-0013/security decision records the selected treatment, rejection rationale,
    residual risk, owner, review triggers, and separately scoped implementation issue(s).
  • AC4 — No dependency, lock, workflow, alert, suppression, exception, threshold, branch
    protection, PR docs: govern authenticated lifecycle overflow recovery #171, or lifecycle-tracer mutation occurs under this decision authority;
    temporary artifacts are deleted.

Verification commands

cargo tree --locked --offline --manifest-path native/Cargo.toml --target all -i glib@0.18.5
cargo tree --locked --offline --manifest-path native/Cargo.toml --target aarch64-apple-darwin -i glib@0.18.5
cargo tree --locked --offline --manifest-path native/Cargo.toml --target x86_64-pc-windows-msvc -i glib@0.18.5
npm run native:dependencies
npm run native:security
npm run quality
npm audit --audit-level=high

Definition of Ready

  • The decision question, owner, urgency, constraints, options, and non-goals are explicit.
  • Evaluation methods, equal-workload criteria, thresholds, environments, and evidence sources
    are defined before results are collected.
  • Execution Authority and experimental-code disposal are explicit.
  • The planned evaluation is executable in the available environment.

Definition of Done

  • Every criterion has attributable, reproducible evidence and recorded limitations.
  • The recommendation, dissenting evidence, risks, and residual uncertainty are explicit.
  • The resulting decision record is accepted through its normal governance path.
  • No throwaway code, secret, private evidence, alert dismissal, or undeclared productive
    dependency remains.
  • Documentation and follow-up implementation issues reflect the decision without expanding it.

Stop conditions

  • Stop when the current contract version does not match its automated readiness record.
  • Stop when any option, criterion, threshold, platform, boundary, or authority changes.
  • Stop when representative evidence cannot be produced in the declared environment.
  • Stop when evaluation would require customer data, an undeclared secret, an unauthorized external
    mutation, alert dismissal, advisory suppression, gate weakening, or Linux product scope.
  • Stop before turning experimental evidence into productive architecture or feature delivery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: newNew or not yet triagedtype: decisionEvidence-backed architecture, product, security, or platform decision

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions