Skip to content

Fragile JSON manipulation via sed in gstack-telemetry-sync #710

Closed

Description

@robertoecf

Found during review.

File: bin/gstack-telemetry-sync:85

Using `sed` with regex to strip fields from JSON is fragile — breaks if values contain commas, escaped quotes, or if field order changes. Since the script already runs in an environment with `jq` (or could use bun), this would be more reliable:

CLEAN=\$(echo "\$LINE" | jq -c 'del(._repo_slug, ._branch, .repo)')

Not urgent but avoids silent data corruption in the telemetry pipeline.

Activity

  1. added a commit that references this issue on Apr 1, 2026
    3b15591
  2. garrytan commented on Apr 9, 2026

    @garrytan
    Owner

    Addressed by #749

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions