Skip to content

privacy: redact the capability-lock files and redact before truncating in the n8n auth-risk reader #1079

Open

Description

@pengfei-threemoonslab

Deferred by the engineering-review implementation loop from #1077 (issue #1026).

Problem

Two redaction gaps outside #1026's scope:

  1. The capability-lock family (capabilities.lock.json, both capability-lock-diff files and capability-delta-attestation.json) publishes tool names unredacted, including the older secret shapes, because src/agents_shipgate/core/capability_lock.py never calls the privacy module. fix(checks): publish secret and injection findings, widen redaction #1077's leak tests had to exclude these files by name.
  2. src/agents_shipgate/inputs/n8n/_auth_risk.py:173 cuts text to 200 characters before redacting it, so a credential that straddles the cut is partly published.

Proposed fix

(1) Route every string the lock family publishes through redact_text / redact_data at the point where the lock is assembled, and extend the #1077 leak tests to include these files (remove the by-name exclusion). Because this can move source_set_hash for adopters whose tool names contain a secret shape, add a STABILITY migration note. (2) Redact first, then truncate, in _auth_risk.py, with a test that plants a credential across the 200-character boundary.

Acceptance criteria

  • The leak tests cover the capability-lock files and pass.
  • A credential straddling the n8n truncation boundary is fully redacted.

Source

Engineering review 2026-10-12 follow-up (PR #1077 implementer notes). Tracked in #1060.

Activity

  1. added
    bugSomething isn't working
    P1Next after P0; blocks other work or ships a misleading result
    area:verifyverify / preview orchestration and SHIP-VERIFY-* checks
    engineering-reviewFiled from the 2026-10-12 comprehensive engineering review
    on Oct 13, 2026
  2. pengfei-threemoonslab commented on Oct 13, 2026

    @pengfei-threemoonslab
    ContributorAuthor

    Scope widened after the independent review of #1077 (cycle 1, C1-4): the capability-lock family publishes more than tool names unredacted. In the reviewer's probe every planted secret shape, old and new, appeared in capabilities.lock.json at $.capabilities[].controls.evidence_owner (the tool's owner field), in capability-lock-diff.json at changed[].after.controls.evidence_owner and semantic_changes[].after, and in capability-delta-attestation.json. The fix must route every string the lock family publishes through redaction, not only tool names, and the STABILITY "What does not change" sentence about the lock family must be reworded when it lands.

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

    P1Next after P0; blocks other work or ships a misleading resultarea:verifyverify / preview orchestration and SHIP-VERIFY-* checksbugSomething isn't workingengineering-reviewFiled from the 2026-10-12 comprehensive engineering review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions