Skip to content

fix(redaction): stop redacting issue keys, Copilot call ids and code identifiers - #3818

Merged
migmartri merged 3 commits into
chainloop-dev:mainfrom
migmartri:fix/redaction-false-positives-3817
Nov 16, 2026
Merged

migmartri merged 3 commits into
chainloop-dev:mainfrom
migmartri:fix/redaction-false-positives-3817

Conversation

@migmartri

@migmartri migmartri commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

AI coding session redaction replaced values that are not secrets. A rule matches a value once in a key: value position. The redactor then replaces every copy of that value in the session. When the value is an issue key or a common word, the placeholder spreads into tool results, prose, file names and the spec entries. The ai-config-no-secrets policy then reports each placeholder as a leaked credential.

This change removes three false-positive shapes. The redactor still replaces every copy of a real secret.

  • generic-api-key keeps a Jira issue key, such as the key in the arguments of a Jira tool call. The project key part has at most 10 characters, which is the Jira default.
  • The AI coding session redactor treats the apiCallId of a GitHub Copilot model call as opaque data, like base64 media. The value is a long base64 id, and the key name holds api.
  • generic-password keeps an unquoted value that is shaped like a code variable and names a credential: a camelCase or snake_case name such as registryPassword or client_secret, or the bare word secret or token before a code delimiter. The upstream rule drops unquoted values in code files, but it reads the file type from a path that the scanned document does not have.
    • A quoted value is still redacted.
    • A value with a digit or a symbol is still redacted.
    • A plain word in a config file or a command line, such as password: supersecret, is still redacted.
  • RulesetVersion changes to 5.

This change is narrower than the ^[A-Za-z_]+$ exemption that the issue proposes. That exemption also dropped real letters-only passwords in config files and command lines.

Sessions that are already uploaded keep their placeholders.

Closes #3817

View guided diff

…identifiers

AI coding session redaction replaced values that are not secrets. A match in one key: value position then replaced every copy in the session, including spec titles and URIs.

- generic-api-key keeps Jira issue keys.
- The AI coding session redactor treats a Copilot apiCallId as opaque.
- generic-password keeps an unquoted variable that names a credential.
- Bump RulesetVersion to 5.

Closes chainloop-dev#3817

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 6d2843d7-b3b9-4576-aaf6-4320133129dd
@migmartri migmartri self-assigned this Nov 16, 2026
@migmartri
migmartri requested a review from a team November 16, 2026 19:35

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Re-trigger cubic

Comment thread internal/redaction/betterleaks.toml Resolved
@chainloop-dev chainloop-dev deleted a comment from chainloop-platform Bot Nov 16, 2026
A camelCase or snake_case value with a digit, such as abcToken123, can be a real credential. The identifier exemptions now accept letters and underscores only.

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 6d2843d7-b3b9-4576-aaf6-4320133129dd
The opaque filter skipped every apiCallId value in the transcript, so a credential under that key was never scanned. Only a base64 value of 100 or more characters is now skipped. Any other value is scanned.

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>

Chainloop-Trace-Sessions: 6d2843d7-b3b9-4576-aaf6-4320133129dd
@chainloop-dev chainloop-dev deleted a comment from chainloop-platform Bot Nov 16, 2026
@chainloop-dev chainloop-dev deleted a comment from chainloop-platform Bot Nov 16, 2026
@chainloop-dev chainloop-dev deleted a comment from chainloop-platform Bot Nov 16, 2026
@migmartri
migmartri merged commit 1347745 into chainloop-dev:main Nov 16, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trace redaction replaces Jira issue keys, Copilot call IDs and code identifiers with placeholders

2 participants