jerryshao commented on code in PR #14979:
URL: https://github.com/apache/gravitino/pull/14979#discussion_r4582874432


##########
core/src/main/java/org/apache/gravitino/job/local/SparkProcessBuilder.java:
##########
@@ -152,9 +153,11 @@ public Process start() {
     builder.redirectOutput(outputFile);
     builder.redirectError(errorFile);
 
+    // Mask --updater-options / --spark-conf for the log only; ProcessBuilder 
keeps the plaintext
+    // commandList.
     LOG.info(
         "Starting local Spark job with command: {}, environment variable 
names: {}",
-        Joiner.on(" ").join(commandList),
+        Joiner.on(" 
").join(JobRuntimeTemplateMaskUtils.maskSensitiveArguments(commandList)),

Review Comment:
   [P2] If either JSON argument is malformed—for example, --updater-options 
followed by `{"password":"secret",`—this masking call can still write the 
credential to the server log. HiddenPropertyMaskUtils logs the parser exception 
via e.toString(), and Jackson 2.15.2 includes input source content in its 
exception location by default. Returning ****** therefore sanitizes the INFO 
line while leaking the original input in a WARN. Please remove exception text 
from the masking warnings and add a log-capture regression test asserting that 
malformed credential input is absent from all emitted messages. The 
ShellProcessBuilder call needs the same protection.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to