Skip to content

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

@robertoecf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions