Extend secret redaction to .md, .mdx, .yml, .jsonl files#2230
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for additional target extensions in secret redaction
Extend secret redaction to .md, .mdx, .yml, .jsonl files
Oct 23, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extended the secret redaction functionality to process
.md,.mdx,.yml, and.jsonlfiles in addition to the existing.txt,.json, and.logfiles.Changes
The secret redaction script (
pkg/workflow/js/redact_secrets.cjs) now processes a broader set of file types commonly used in agentic workflows:.md,.mdx) - For workflow documentation and AI-generated reports.yml) - For configuration files and workflow definitions.jsonl) - For structured log output and data filesModified Files
pkg/workflow/js/redact_secrets.cjstargetExtensionsarray to include the new file types (line 129)pkg/workflow/js/redact_secrets.test.cjsTesting
All tests pass successfully:
The new test case creates files with each extension type and verifies that secrets are properly redacted using the same pattern (first 3 characters + asterisks for remaining length).
Impact
This change ensures that sensitive data in markdown documentation, YAML configurations, and JSON Lines logs are properly redacted before artifacts are uploaded, improving security across a wider range of workflow output files.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.