Crates.io | safeshell |
lib.rs | safeshell |
version | 0.1.2 |
source | src |
created_at | 2024-10-26 11:34:28.095754 |
updated_at | 2024-10-31 05:58:18.950686 |
description | SafeShell: A security tool for shell history management, designed to detect, stash, and clear sensitive commands, ensuring safer terminal sessions. |
homepage | https://trinhminhtriet.com |
repository | https://github.com/trinhminhtriet/safeshell |
max_upload_size | |
id | 1423787 |
size | 136,897 |
____ __ ____ _ _ _
/ ___| __ _ / _| ___ / ___| | |__ ___ | || |
\___ \ / _` || |_ / _ \\___ \ | '_ \ / _ \| || |
___) || (_| || _|| __/ ___) || | | || __/| || |
|____/ \__,_||_| \___||____/ |_| |_| \___||_||_|
🛡️ SafeShell: A security tool for shell history management, designed to detect, stash, and clear sensitive commands, ensuring safer terminal sessions.
🖥️ Display a summary of sensitive commands at the start of each terminal session. 👀 Remove sensitive commands from the shell history to enhance security and privacy. 👨💻 Temporarily store your command history prior to presentations or screen-sharing sessions for confidentiality.
To install safeshell, simply clone the repository and follow the instructions below:
git clone git@github.com:trinhminhtriet/safeshell.git
cd safeshell
cargo install --path .
Running the below command will globally install the safeshell
binary.
cargo install safeshell
curl -sS https://raw.githubusercontent.com/trinhminhtriet/safeshell/master/install/install.sh | bash
curl -sS https://raw.githubusercontent.com/trinhminhtriet/safeshell/master/install/install.sh | bash
iwr https://raw.githubusercontent.com/trinhminhtriet/safeshell/master/install/install.ps1 -useb | iex
eval $(safeshell --init-shell)
eval $(safeshell --init-shell)
Invoke-Expression (&safeshell --init-shell)
safeshell --init-shell | source
$ safeshell --help
Secure shell commands
USAGE:
safeshell [OPTIONS] [SUBCOMMAND]
OPTIONS:
--config-dir <CFG_DIR_PATH> Set configuration directory path
-h, --help Print help information
--init-shell Show sensitive findings summary for MOTD
--log <LEVEL> Set logging level [default: INFO] [possible values: OFF,
TRACE, DEBUG, INFO, WARN, ERROR]
--no-banner Don't show the banner
-V, --version Print version information
SUBCOMMANDS:
config Create custom configuration
find Find sensitive commands
help Print this message or the help of the given subcommand(s)
restore Restore backup history file
stash Stash history file
Sensitive data can be stored in your history file when export a token of something or running a script with token.
safeshell find --format table
safeshell clear
safeshell clear --remove
safeshell clear --backup
You can stash your history shell by running the command:
safeshell stash
Now your history shell is clear, to bring back your history run the command:
safeshell stash pop
You can also restore your history backup file by running the command:
safeshell stash restore
Create custom configuration by running the command
safeshell config
Config command will create:
Validate syntax file
safeshell config validate
Validate syntax file
safeshell config delete
Manage pattern ignores
safeshell config ignores
Running the below command will globally uninstall the safeshell
binary.
cargo uninstall safeshell
Remove the project repo
rm -rf /path/to/git/clone/safeshell
We welcome contributions!
git checkout -b my-feature
;git commit -m "feat: my new feature"
;git push origin my-feature
.Once your pull request has been merged, you can delete your branch.
This project is licensed under the MIT License - see the LICENSE file for details.