Support new robot 7.4 secret variables as part of auth params#411
Open
oboehmer wants to merge 28 commits intoMarketSquare:masterfrom
Open
Support new robot 7.4 secret variables as part of auth params#411oboehmer wants to merge 28 commits intoMarketSquare:masterfrom
auth params#411oboehmer wants to merge 28 commits intoMarketSquare:masterfrom
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:
|
Contributor
Author
|
@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 <noreply@anthropic.com>
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.
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