Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
private static final class Execution2 extends GeneralNonBlockingStepExecution {

private static final long serialVersionUID = 1;
private static final boolean disableSecurityLogging = "false".equalsIgnoreCase(System.getenv("DISABLE_SECURITY_LOGGING"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://javadoc.jenkins.io/jenkins/util/SystemProperties.html#getBoolean(java.lang.String,boolean) and please use positive rather than negative sense, e.g. enable mask logging on by default or set to false to override.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay @jglick
Let me change that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as per review comments @jglick


private transient BindingStep step;

Expand Down Expand Up @@ -137,9 +138,11 @@
}
if (!secretOverrides.isEmpty()) {
boolean unix = launcher == null || launcher.isUnix();
listener.getLogger().println("Masking supported pattern matches of " + secretOverrides.keySet().stream().map(
v -> unix ? "$" + v : "%" + v + "%"
).collect(Collectors.joining(" or ")));
if (!disableSecurityLogging) {

Check warning on line 141 in src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/BindingStep.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 141 is only partially covered, one branch is missing
listener.getLogger().println("Masking supported pattern matches of " + secretOverrides.keySet().stream().map(
v -> unix ? "$" + v : "%" + v + "%"
).collect(Collectors.joining(" or ")));
}
}

getContext().newBodyInvoker().
Expand Down