-
Notifications
You must be signed in to change notification settings - Fork 0
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
Whitelisting #2
Whitelisting #2
Conversation
Changes Unknown when pulling e66c9a8 on whitelisting into ** on master**. |
This allows an EnvParser to mask iteslf which reduces object instantiations and simplifies the abstraction. As a result ParameterMasker has been removed and EnvParser now calls SensitiveDataFilter::Mask.mask_hash directly. Minor improvements to consistency of using parentheses.
PrameterScanner.new is immediately followed by a call to sensitive_data? meaning there is no reason to lazy-load the scans. They’re now just done on initialize.
Abstraction can be reduced resulting in a clear definition of the objects concern during initialization.
Changes Unknown when pulling 40c655c on whitelisting into ** on master**. |
def initialize(env) | ||
@original_env_parser = EnvParser.new(env) | ||
@filtered_env_parser = @original_env_parser.copy | ||
@scanner = ParameterScanner.new(@original_env_parser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is followed by a function call and then a variable assignment this alignment of equals signs puts me off. Very minor but it's a thing.
spec.name = 'sensitive_data_filter' | ||
spec.version = SensitiveDataFilter::VERSION | ||
spec.authors = ['Alessandro Berardi'] | ||
spec.email = ['berardialessandro@gmail.com'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was some comment that if the email has support@travellink.com.au we all end up with ownership when this is published. Worth investigation.
Changes Unknown when pulling 32ba5da on whitelisting into ** on master**. |
@@ -0,0 +1,8 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why all this?
env
is not even guaranteed to be in /usr/bin
There is no good reason for using #!/usr/bin/env bash
- either your script must have bash, in which case you are assuming it is installed so it is in /bin - or, your script can get by without bash with just Bourne shell - in which case every UNIX will have /bin/sh.
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need verbose and debug ?
@@ -0,0 +1,8 @@ | |||
#!/usr/bin/env bash | |||
set -euo pipefail | |||
IFS=$'\n\t' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we overriding IFS to be tab and newline?
Based on #1