-
Notifications
You must be signed in to change notification settings - Fork 286
Support new robot 7.4 secret variables as part of auth params
#411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
auth params
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #411 +/- ##
==========================================
+ Coverage 85.38% 88.97% +3.58%
==========================================
Files 9 9
Lines 479 535 +56
Branches 49 61 +12
==========================================
+ Hits 409 476 +67
+ Misses 65 56 -9
+ Partials 5 3 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@lucagiove . Can you please review this PR? Would be great to have this available once rf7.4 is released |
Prevent exposure of credentials in Robot Framework logs at DEBUG/TRACE levels by masking Authorization headers in HTTP connection debug output when Robot Secret types are detected. Changes: - Add check_and_process_secrets() to detect and process secrets in one pass - Track secret usage in sessions via _has_secrets attribute - Mask Authorization header in _print_debug() when secrets present - Import AUTHORIZATION constant from log module for consistency This ensures credentials are never logged even with debug=3, while still allowing Authorization headers to be visible for debugging when no secrets are used (e.g., test credentials). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
resolves #410
Overview
This branch adds support for Robot Framework's
Secrettype (introduced in Robot Framework 7.4) to prevent credential exposure in logs, even at DEBUG and TRACE levels.Key Features
1. Robot Framework Secret Type Support
Automatically detects and processes Robot Framework's
Secrettype in authentication credentials. Secrets are extracted from wrappers before passing to requests library and never logged in clear text.2. Conditional Authorization Header Masking
Authorization: *****) in HTTP debug output3. Backward Compatibility
Fully compatible with Robot Framework < 7.4. Gracefully degrades when Secret type unavailable. No breaking changes.
Core Changes
check_and_process_secrets()for single-pass secret detection and processing (optimized from O(2n) to O(n))_request_has_secretsflag, processes auth parameters_print_debug(), stores_has_secretson session objectslog_request()to conditionally mask based on secret presenceSession Support
All session creation keywords updated to detect and track secrets:
Create SessionCreate Client Cert SessionCreate Digest SessionCreate Ntlm SessionTesting