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

executeShellCommand prints secret keys in log #76

Open
Nirvanchik opened this issue May 20, 2021 · 0 comments
Open

executeShellCommand prints secret keys in log #76

Nirvanchik opened this issue May 20, 2021 · 0 comments
Assignees
Labels

Comments

@Nirvanchik
Copy link
Collaborator

Nirvanchik commented May 20, 2021

In changelist #53 we added logging of shell commands that ConnectedDeviceWrapper can execute on device.

Now we want to add a command that puts secret key to device and this logging is silently printing this key in logs, so everyone can see this token. We want to have an API to send such a command with sanitized logging where the secret key could be removed.

I propose the next way:

public synchronized void executeShellCommand(ShellCommand command) throws CommandExecutionException;

interface ShellCommand {
    String getCommand();
    String getLoggedCommand();
    long maxTimeout();
    long getMaxTimeToOutputResponse();
    TimeUnit getMaxTimeUnits();
    IShellOutputReceiver getReceiver();
}

Another problem: no pushFile() method. How can we put a file into device?

Internal ticket: https://st.yandex-team.ru/BYIN-12708

@Nirvanchik Nirvanchik added the bug label May 20, 2021
@Nirvanchik Nirvanchik self-assigned this May 20, 2021
Nirvanchik pushed a commit that referenced this issue May 24, 2021
The new executeShellCommand() method with DefaultShellCommand helper-class
can be used to safely run ADB shell command that contains
secure information.
Nirvanchik pushed a commit that referenced this issue May 24, 2021
Nirvanchik pushed a commit that referenced this issue May 24, 2021
The new executeShellCommand() method with DefaultShellCommand helper-class
can be used to safely run ADB shell command that contains
secure information.
Nirvanchik pushed a commit that referenced this issue May 24, 2021
Nirvanchik pushed a commit that referenced this issue May 24, 2021
The new executeShellCommand() method with DefaultShellCommand helper-class
can be used to safely run ADB shell command that contains
secure information.
Nirvanchik pushed a commit that referenced this issue May 24, 2021
Nirvanchik pushed a commit that referenced this issue May 25, 2021
The new executeShellCommand() method with DefaultShellCommand helper-class
can be used to safely run ADB shell command that contains
secure information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant