Skip to content

[audit] Dup: truncate == truncateValue (byte-identical) — keep one #295

Closed

Description

@scttfrdmn

Filed from the 2026-07-11 spawn audit. Full report: docs/spawn-audit-2026-07-11.md. Assessment-only — no code changed yet.

Phase: Phase 0 — do now (dup)

Evidence

  • cmd/pipeline.go:530-535 truncate(s, maxLen)
  • cmd/list.go:380-385 truncateValue(value, maxLen) — identical logic

Recommendation
Keep one (e.g. in cmd/utils.go), delete the other, update callers. The maxLen<3 panic branch is unreachable in practice (optional hardening).

User-facing / SemVer: No — internal. No bump.

Adversarially verified during the audit (62/62 findings survived verification; severities/scope adjusted where the first pass was wrong).

Activity

  1. added
    audit:2026-07
    on Jul 11, 2026
  2. scttfrdmn commented on Jul 11, 2026

    @scttfrdmn
    ContributorAuthor

    Shipped in #331 (squash-merged to main). Closing manually (only #294 auto-closed from that PR).

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

    audit:2026-07

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions