Skip to content
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

Hide sensitive data #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bigstinky86
Copy link

@bigstinky86 bigstinky86 commented Apr 9, 2020

Sometime it is needed to hide sensitive data from appearance in logs but save the rest ssh command to verify. Output suppressing is a good way to hide whole command but not only sensitive data.

This changes allow to set placeholders in SSH command and replace them right before executing. It shows command without sensitive data and executes it with proper data.

The output will look like

[sshexec] Connecting to localhost:22
[sshexec] cmd : echo ::username::--::password::--::username:: >> ant_test_hide

But file will contain all the passed data

SomeUser--SOmePass--SomeUser

sshexec task was called

<sshexec host="${host}"
               username="${username}"
               keyfile="${user.home}/.ssh/id_rsa"
               trust="true"
               command="echo ::username::--::password::--::username:: >> ant_test_hide"
               hideSensitive="true"
               bindSensitive="username=SomeUser|password=SOmePass"
               sensitiveDelimiter="|"
               placeholderBracket="::"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant