You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
Thanks for contributing to the Docker-Selenium project! A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Mask sensitive information in console logs
Few variables output like password, secret, etc. are masked in console logs. For debugging purposes, you can disable it by setting SE_MASK_SECRETS to false
While creating bash script, your can mask the output by using syntax echo "Current value is $(mask ${YOUR_VARIABLE})
SE_MASK_SECRETS_MIN_LENGTH default is 3. It means a long string will be masked to *** to avoid exposing length for brute force attack.
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Why: Adding input validation to the mask script is a crucial enhancement that ensures the script behaves correctly and predictably, preventing potential runtime errors.
8
Refactor the masking logic into a reusable function to improve code maintainability and reduce duplication
Consider using a function to handle the masking of sensitive information instead of repeating the logic in multiple places.
Why: Refactoring the masking logic into a reusable function improves code maintainability and reduces duplication, which is beneficial for long-term code management.
7
Add error handling for edge cases in the mask script to improve robustness
Consider adding error handling for edge cases, such as when the input string is shorter than SE_MASK_SECRETS_MIN_LENGTH.
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.
User description
Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Motivation and Context
Mask sensitive information in console logs
Few variables output like password, secret, etc. are masked in console logs. For debugging purposes, you can disable it by setting
SE_MASK_SECRETS
tofalse
While creating bash script, your can mask the output by using syntax
echo "Current value is $(mask ${YOUR_VARIABLE})
SE_MASK_SECRETS_MIN_LENGTH
default is3
. It means a long string will be masked to***
to avoid exposing length for brute force attack.Types of changes
Checklist
PR Type
Bug fix, Documentation
Description
mask
script to handle masking logic, allowing configuration of minimum length and visibility.mask
script in the image.Changes walkthrough 📝
10 files
start-selenium-grid-distributor.sh
Mask sensitive information in distributor script logs
Distributor/start-selenium-grid-distributor.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.SE_REGISTRATION_SECRET
in console logs.start-selenium-grid-eventbus.sh
Mask sensitive information in event bus script logs
EventBus/start-selenium-grid-eventbus.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.start-selenium-grid-hub.sh
Mask sensitive information in hub script logs
Hub/start-selenium-grid-hub.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.SE_REGISTRATION_SECRET
andSE_ROUTER_PASSWORD
.start-selenium-node.sh
Mask sensitive information in node base script logs
NodeBase/start-selenium-node.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.SE_REGISTRATION_SECRET
when logging is disabled.start-selenium-grid-docker.sh
Mask sensitive information in node docker script logs
NodeDocker/start-selenium-grid-docker.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.start-selenium-grid-router.sh
Mask sensitive information in router script logs
Router/start-selenium-grid-router.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.SE_REGISTRATION_SECRET
andSE_ROUTER_PASSWORD
.start-selenium-grid-session-queue.sh
Mask sensitive information in session queue script logs
SessionQueue/start-selenium-grid-session-queue.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.SE_REGISTRATION_SECRET
.start-selenium-grid-sessions.sh
Mask sensitive information in sessions script logs
Sessions/start-selenium-grid-sessions.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.SE_REGISTRATION_SECRET
.start-selenium-standalone.sh
Mask sensitive information in standalone script logs
Standalone/start-selenium-standalone.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.SE_ROUTER_PASSWORD
when logging is disabled.start-selenium-grid-docker.sh
Mask sensitive information in standalone docker script logs
StandaloneDocker/start-selenium-grid-docker.sh
SE_JAVA_SSL_TRUST_STORE_PASSWORD
in console logs.2 files
Dockerfile
Add mask script to Docker image
Base/Dockerfile
mask
script to/usr/local/bin/
.mask
Add script for masking sensitive information
Base/mask
1 files
README.md
Document masking of sensitive information in logs
README.md