Skip to content

[DOCS] Document secret redaction in infer insights reports #830

Closed

Description

Summary

infer insights now redacts secrets before the digest reaches the analysis model and before the report is written under ~/.infer/insights/ (see inference-gateway/cli#1339, resolving inference-gateway/cli#1338). The redactor masks PEM private-key blocks, GitHub token shapes (ghp_, gho_, ghu_, ghs_, ghr_, github_pat_), and the values of provider-secret env vars set in the environment (plain and JSON-escaped), replacing each with [redacted]. The docs do not mention this guarantee anywhere.

Affected pages

  • docs/shortcuts-guide.md - the /insights shortcut entry should note the analysis payload and saved report are redacted
  • docs/directory-structure.md - the ~/.infer/insights/ entry can mention reports are redacted
  • docs/telemetry.md - /insights section can note verbatim error and log samples are masked before the model call
  • docs/configuration-reference.md - near logging.insights_min_level, a line on redaction would answer "is it safe to point insights at collected sessions?"

Reference

Acceptance Criteria

  • The insights docs state that digests and saved reports are redacted locally before any network call
  • The doc names what is masked: PEM private-key blocks, GitHub token shapes, and values of provider-secret env vars (plain and JSON-escaped)
  • Each affected page above is updated consistently

Activity

  1. added
    documentation
    on Sep 26, 2026
  2. added theissue type on Sep 26, 2026
  3. moved this to Todo in 2026on Sep 26, 2026
  4. edenreich commented on Sep 26, 2026

    @edenreich
    Contributor

    @claude Can you document this?

  5. inference-gateway-maintainer commented on Sep 26, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 3m 54s —— View job • docs/issue-830-20260926-1621 • Create PR ➔


    Documented secret redaction in infer insights

    • Gather context (repo layout, existing insights docs)
    • Map the issue's affected pages onto this repo's actual files
    • Write the redaction documentation
    • Validate (lint:md, format:check, build - all pass)
    • Commit and open PR -> docs: document secret redaction in infer insights #831

    What changed (all in cli.md)

    • New ### Insights Shortcut section: what /insights [since] / infer insights does, and the guarantee that secrets are redacted locally before any network call - both in the digest sent to the analysis model and in the report written to ~/.infer/insights/. Names what is masked: PEM private-key blocks, GitHub token shapes (ghp_, gho_, ghu_, ghs_, ghr_, github_pat_), and values of provider-secret env vars set in the environment, plain and JSON-escaped - each replaced with [redacted].
    • Viewing telemetry data: added an infer insights bullet noting the verbatim error and log samples are masked before the model call.
    • Built-in shortcuts table: the /insights row now links to the redaction note.
    • ~/.infer directory table: added an insights/ row (reports written redacted, kept by /reset).
    • /reset section: the preserved-paths line and the /reset insights paragraph now state the saved report is redacted.

    Mapping note

    The issue lists docs/shortcuts-guide.md, docs/directory-structure.md, docs/telemetry.md and docs/configuration-reference.md - those are CLI-repo paths; this repo has none of them. All four topics live in cli.md here, so the equivalent four spots there were updated consistently.

    One acceptance item had no home: logging.insights_min_level is not documented anywhere in this repo, so there was no "near it" to add a redaction line to. If that key should be documented, it is a separate addition to the logging config list in cli.md - say the word and I will add it.

    | Branch

  6. moved this from QA to Done in 2026on Sep 26, 2026
  7. inference-gateway-releaser commented on Sep 30, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.19 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

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

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions