Skip to content

feat(sanitizer): add redaction for multiple secret types#297

Open
vatsaljain568 wants to merge 1 commit intojenkinsci:mainfrom
vatsaljain568:feat/comprehensive-log-sanitizer
Open

feat(sanitizer): add redaction for multiple secret types#297
vatsaljain568 wants to merge 1 commit intojenkinsci:mainfrom
vatsaljain568:feat/comprehensive-log-sanitizer

Conversation

@vatsaljain568
Copy link
Contributor

This PR includes two small updates to improve our test suite:

  1. Added missing unit tests in test_sanitizer.py to verify that sanitize_logs correctly redacts Bearer tokens, GitHub tokens, and RSA private keys.

  2. Fixed a failing test in test_file_upload.py (test_chatbot_reply_upload_empty_message_with_files). The endpoint validation now rejects empty messages with a 422, so I updated the test payload to pass a "dummy message" instead of an empty string to fix the build.

Testing done

  • Ran python3 -m pytest locally. All unit tests now pass.
  • Verified that the 422 Unprocessable Entity error in the file upload route test is resolved.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

Signed-off-by: Vatsal Jain <jain.vatsal2006@gmail.com>
@vatsaljain568 vatsaljain568 requested a review from a team as a code owner March 18, 2026 22:57
@berviantoleo berviantoleo added the tests This PR adds/removes/updates test cases label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests This PR adds/removes/updates test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants