diff --git a/src/com/mirantis/mcp/Validate.groovy b/src/com/mirantis/mcp/Validate.groovy
index 9ac618d..dd53450 100644
--- a/src/com/mirantis/mcp/Validate.groovy
+++ b/src/com/mirantis/mcp/Validate.groovy
@@ -39,11 +39,12 @@
  * @param env_var               Environment variables to set in container
  * @param entrypoint            Set entrypoint to /bin/bash or leave default
  * @param mounts                Map with mounts for container
+ * @param output_replacing      Maps with regex with should be hide from output (passwords, etc)
 **/
 
 def runContainer(Map params){
     def common = new com.mirantis.mk.Common()
-    defaults = ["name": "cvp", "env_var": [], "entrypoint": true]
+    defaults = ["name": "cvp", "env_var": [], "entrypoint": true, "mounts": [:], "output_replacing": []]
     params = defaults + params
     def salt = new com.mirantis.mk.Salt()
     def variables = ''
@@ -69,8 +70,11 @@
     params.mounts.each { local, container ->
         mounts = mounts + " -v ${local}:${container}"
     }
-    salt.cmdRun(params.master, params.target, "docker run -tid --net=host --name=${params.name}" +
-                                "${mounts} -u root ${entry_point} ${variables} ${params.dockerImageLink}")
+    salt.cmdRun(params.master, params.target,
+                "docker run -tid --net=host --name=${params.name}" +
+                    "${mounts} -u root ${entry_point} ${variables} ${params.dockerImageLink}",
+                true, null, true, [],
+                params.output_replacing)
 }
 
 def runContainer(master, target, dockerImageLink, name='cvp', env_var=[], entrypoint=true, mounts=[:]){
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index 296dd38..c8f2e05 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -147,6 +147,16 @@
 }
 
 /**
+ * Print informational message
+ *
+ * @param msg
+ * @param color Colorful output or not
+ */
+def infoSensitivityMsg(msg, color = true, replacing = []) {
+    printSensitivityMsg(msg, "cyan", replacing)
+}
+
+/**
  * Print error message
  *
  * @param msg
@@ -215,6 +225,25 @@
 }
 
 /**
+ * Print sensitivity message
+ *
+ * @param msg Message to be printed
+ * @param color Color to use for output
+ * @param replacing List with maps for deletion (passwords, logins, etc).
+ *                  The first () matching is mandatory !
+ *                  Example:
+ *                  [/ (OS_PASSWORD=)(.*?)+ /,
+ *                   / (password = )(.*?)+ /,
+ *                   / (password )(.*?) / ]
+ */
+def printSensitivityMsg(msg, color, replacing = []) {
+    for (i in replacing) {
+        msg = msg.replaceAll(i, ' $1XXXXXX ')
+    }
+    printMsg(msg, color)
+}
+
+/**
  * Traverse directory structure and return list of files
  *
  * @param path Path to search
diff --git a/src/com/mirantis/mk/Salt.groovy b/src/com/mirantis/mk/Salt.groovy
index 8c6384c..f4147e0 100644
--- a/src/com/mirantis/mk/Salt.groovy
+++ b/src/com/mirantis/mk/Salt.groovy
@@ -331,12 +331,13 @@
  * @param batch salt batch parameter integer or string with percents (optional, default null - disable batch)
  * @param output do you want to print output
  * @param saltArgs additional salt args eq. ["runas=aptly"]
+ * @param replacing list with maps for deletion in info message (passwords, logins, etc)
  * @return output of salt command
  */
-def cmdRun(saltId, target, cmd, checkResponse = true, batch=null, output = true, saltArgs = []) {
+def cmdRun(saltId, target, cmd, checkResponse = true, batch=null, output = true, saltArgs = [], replacing = []) {
     def common = new com.mirantis.mk.Common()
     def originalCmd = cmd
-    common.infoMsg("Running command ${cmd} on ${target}")
+    common.infoSensitivityMsg("Running command ${cmd} on ${target}", true, replacing)
     if (checkResponse) {
       cmd = cmd + " && echo Salt command execution success"
     }
