Skip to content

Census existing disclosed_fields / audit disclosed rows for leaked jq operand text (follow-up to #538) #551

Description

@angel-manuel

Follow-up to #538, which stopped services/disclosure.rs from putting raw jaq error text on DisclosedField.error. That fix is forward-only: rows written before it may still carry a redacted value inside an error string.

The fix PR could not run this check — the agent's environment has no Cloud SQL reachability (gcloud sql instances list returns nothing for its service account). Someone with dev + prod DB access needs to run:

-- approvals still holding a disclosed error string
SELECT count(*) FROM approvals
WHERE jsonb_path_exists(disclosed_fields, '$[*].error');

-- audit rows likewise
SELECT count(*) FROM audit_log
WHERE jsonb_path_exists(detail, '$.disclosed[*].error');

A non-zero count is not automatically a leak — filter produced more than N values and a plain cannot index null with "x" carry nothing sensitive. The ones that matter start with cannot index , cannot calculate or cannot use and name a path the same template listed under x-overslash-redact. Sample the matched rows before deciding.

If there are real hits, the backfill is a targeted jsonb rewrite replacing each error with the fixed classification the code now emits. audit_log is otherwise append-only, so rewriting it is a decision worth making explicitly rather than as a side effect.

Activity

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

    needs-triageMaintainer needs to evaluate this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions