Code Monkey home page Code Monkey logo

safecloset's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

safecloset's Issues

Suggestion: show nested closets as a breadcrumb

Right now if safecloset only show the file name that you passed to it on the title bar. If you have multiple level of nested closets, there is no information for you to identify where you are. For example, if I run the following command:

safecloset test
ctrl+n
aa
ctrl+n
bb
ctrl+n
cc

After running these commands, I'm in the cc closet of the breadcrumb aa > bb > cc. But there is no information on the screen that tells me this. Is it possible to add a breadcrumb like aa > bb > cc or [test] > aa > bb > cc to safecloset title bar?

Feature Request: Allow sorting (probably alphabetically) through a drawer and/or potentially a search result

Example 1 - Full drawer

I have a drawer with login passwords dumped from Google Chrome, which was originally sorted from the export.
I keep updating that list of logins manually now in safecloset.

I'd like to have all those logins sorted so i can easily scroll through them, if that is my desire.

Example 2 - Sort over a search result
I keep a drawer for several types of secrets.
After a while some entries are misplaced or spread around the drawer, though they are in a way possible to sort, through a numbering system that i used, or alphabetically.

It would be great to use the search feature, find the secrets and be able to sort them.
Alphabetical order could be a good automatic start.

The doubt in Example 2 would be how the result would look like when the secrets to sort are not contiguous within the drawer.

Let's take this following case to clarify this doubt:

  • [login] abc - xxx
  • [login] abd -xxx
  • [pin] door 1 - xxx
  • [pin] door 2 - xxx
  • [login] cfg -xxx
  • [pin] door 5 - xxx
  • [pin] door 4 -xxx
  • [login] cfgds -xxx
  • [pin] door 3 - xxx

If i filter for [pin] and click sort, how would the drawer look like?

Like this?

  • [login] abc - xxx
  • [login] abd -xxx
  • [pin] door 1 - xxx
  • [pin] door 2 - xxx
  • [login] cfg -xxx
  • [pin] door 3 - xxx
  • [pin] door 4 -xxx
  • [login] cfgds -xxx
  • [pin] door 5 - xxx

Like this?

  • [login] abc - xxx
  • [login] abd -xxx
  • [pin] door 1 - xxx
  • [pin] door 2 - xxx
  • [pin] door 3 - xxx
  • [pin] door 4 -xxx
  • [pin] door 5 - xxx
  • [login] cfg -xxx
  • [login] cfgds -xxx

In another way?

A solution to provide keys on launch of e.g. a containerized application

The goal would be to let programs running in a container access some keys without using files.

One could imagine a scenario with a script asking you to open a certain drawer of SafeCloset before launching docker-compose (or equivalent). While the drawer stays open, it would accept requests for keys on a unix socket.

So we'd need a way to parameterize a drawer to accept those connections for a given duration.

Note: this is a preliminary discussion.

Question: drop markdown rendering of values ?

Right now, values are rendered as markdown when not edited.

It turns out there are really few cases it makes sense.

Do I

  • just completely remove markdown rendering ?
  • make it opt-in with new settings at the drawer level ?

When the cell contains non-ASCII characters, selection doesn't work correctly

Environment:

  • OS: Windows 10
  • Terminal: Windows Terminal 1.11.2921.0
  • SafeCloset: SafeCloset 0.5.3-dev

I found that when the cell contains non-ASCII chars, I can't correctly make selection. But even the cell contains non-ASCII chars, lines that don't contain non-ASCII chars can still be selected correctly.

selection_issue

You can try this text:

そのスレッドがまだ実行されている間While that thread was still executing
While that thread was still executing
While that thread was still executing

Provide ready to use Mac executable

This tool looks great, although mac users can use Mac keychain this looks very useful to send closets to other people but there is no darwin executable on the released zip

"*" character is hidden from value. mouse selecting copies the wrong values

Hi,
I have problems with Ctrl-C to copy things from clipboard to somewhere else, like the browser, in my linux environment, and that's why I use Shift+mouse to Copy and paste.

I noticed that passwords with '*' in them, they are hidden from the view so the copy selection is wrong.

Here you can see how this value has a '*' in it
image

When i exit from the editing mode it disappears

image

Notice the change in color, like if it is maybe using the '*' as an escape character or something

When Shift+Mouse select, the Copied value will be dsdffhdf and not dsdf*fhdf

Paste multiline text doesn't work

I'm on Windows and using v0.4.0. It seems that I can't paste multiline text in the info entry UI. When I do that, they get concatenated and some characters were missing. Also it seems that I can't add newline in the left cells. Is this expected? See below image for details.
safe1

[bug?] Can't copy on MacOS

MacOS: 13.2.1 (Ventura)
Arch: arm64 (M1)

I can't seem to copy any secrets to the clipboard. I've tried it with the standard terminal app, so it's not my terminal app (Warp) causing the issue as far as I can tell.

When I use ^c, the notification at the bottom shows up saying it's been copied to the clipboard, but it hasn't actually been copied to system clipboard. I can't copy with cmd+c either. Doesn't matter whether I select a string or try to copy the whole entry.

Weird thing is I can still paste into an entry from the system clipboard with cmd+v, but I can't copy to the clipboard at all.

Feature request: copy the content of the current cell with a shortcut

Once the user find the secret information, he/she may need to copy it and paste to some other places. If you add a shortcut to make the copy process a little bit easier it will make the app more usable. I suggest change the following

ctrl c : Close the current drawer, without saving (you're back in the upper level one if you close a deep drawer)

to ctrl+u, which means go to upper level. And make ctrl+cto copy current cell value, ctrl+shift+c to copy both name and value (separated by a newline).

This is just an idea I had. Thanks for creating such a useful tool!

thread 'main' panicked at 'attempt to subtract with overflow' when pressing right key

It's hard to explain where this happens, so I uploaded an example to asciinema:

https://asciinema.org/a/ZdnzccVnoGFmfA2QmklmKm3hX

Basically after writing "aaa" I press "enter" and then "right arrow", and the program panics.

You can't see the backtrace when running this command, however thanks to the magic of asciinema I was able to recover it:

"thread 'main' panicked at 'attempt to subtract with overflow', src/tui/drawer_edit_state.rs:159:21\nnote: run with RUST_BACKTRACE=1 environment variable to display a backtrace\n"

Which points to this line:

(text.lines.len() - 1)

If the desired behavior is wrapping on overflow (same as when compiling with --release), try using .wrapping_sub(1) instead of - 1.

Tab key active in menus where it should not be

Tab is active while foreground windows don't support the key. An enables edits in the background.

  1. Open drawer
  2. Open deep drawer password dialog
  3. Tab enables making entries in the background.
  4. Also works in help menu and change password dialog. Possibly more places.

asciicast
OS=Linux SHELL=bash TERM=xterm-256color

Greetings Rust-Galt

Does anybody need an "import" function ?

From the very start I considered that at some point I'd need a feature allowing you to import entries from a drawer to another one, either within the same file or from a different file.

Two use-cases:

  • merging changes made in different places
  • merge two drawers because you realize you don't need to be so paranoid

It turns out that I never felt the need so I didn't code this until now.

But the plan is ready, so, please, if you'd like this function, tell me.

Feature request: Allow ^↑ and ^↓ to work also during "search filtering"

Let's say I have a huge list of secrets, to the point that ^↑ and ^↓ is not feasible.
I would still like to sort some secrets together.
It would be great if when i use the search feature to find relevant secrets through pattern search, that when i use ^↑ and ^↓ the entries are placed together.

Example: Interested secrets are in lines 1,2,3,4 and 1235

  • When i search i manage to filter just those lines
  • Go to the last entry (line 1235)
  • Press ^↑
  • Line 1235 will become Line 5

Support Termux

Since safecloset is very useable now, I migrated my secret management fully to it. I hope I can run it on my Android devices. I tried build it under Termux, but I got this error:
Screenshot_20211117-185636_Termux

Do you know how to solve it? Since it's from a color related crate, is it possible to remove color support if not easy to solve. Thanks.

Can't use mouse select cell content

I'm on Windows and use SafeCloset 0.5.2. When I use mouse to select the cell content, SafeCloset exits with an error message Error: Crossbeam(RecvError). Is SafeCloset designed so that the user is not allowed to select text inside the program with the mouse? I'm using Windows Terminal and by default Windows Terminal will copy the selection to clipboard. And that's why I was making the selection.
selection_error

Newline doesn't work on Windows

In the document it states that

You may add newlines in values with ctrl enter

and

alt-Enter : New line in the currently edited value

However, I tried both on Windows and it doesn't work. I tried both Windows Terminal and the old school cmd.exe, same result.

Question mark doesn't work

I'm using v0.2.5 and when safecloset starts, the ? shortcut has never worked. Below is the log. I started safecloset, pressed ? three times and ctrl+x exited. It seems safecloset did receive the key.

08:38:15.620 [INFO] cli_log::init: Starting safecloset v0.2.5 with log level DEBUG
08:38:15.621 [INFO] safecloset::cli: args: Args {
    version: false,
    hide: false,
    open: false,
    path: Some(
        "test",
    ),
}
08:38:15.888 [DEBUG] safecloset::tui::app: user event: Ok(Resize(107, 29))
08:38:20.380 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('?'), modifiers: SHIFT }))
08:38:20.747 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('?'), modifiers: SHIFT }))
08:38:21.077 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('?'), modifiers: SHIFT }))
08:38:23.290 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('x'), modifiers: CONTROL }))
08:38:23.290 [DEBUG] safecloset::tui::app_state: user requests save and quit
08:38:23.290 [DEBUG] safecloset::tui::app_state: self.close_drawer_input(false) took 300ns
08:38:23.290 [DEBUG] safecloset::tui::app: user requests quit
08:38:23.290 [INFO] safecloset: bye

Also as you can see in the following screen snapshot, there are duplicate help information at the bottom when I started safecloset.
image
The length of the first help line is not equal to the second line, which is a little weird. For example, when I copy a cell, it looks like this.
image

Inconsistent password pasting behavior

I don't know if this trivial behavior is caused by safecloset or the terminal. It behaves exactly the same on Windows Terminal, cmd.exe and the native PowerShell console. It behaves like this.

issue5.mp4

Not a big issue, just curious why it behaves like this.

Could you add command line version of the program?

Thanks for creating safecloset. It's a very useful utility!

Current SC use TUI for everything. If there is a command line interface so that users can add, query, delete, change drawer entries, that would make the program more versatile and can be used under more situations.

Feature request: Let the user customize some common parameters and probably save to a config file

Right now some behaviors are hardcoded in SafeCloset. For example, the user must provide a pretty strong drawer password. If yo u left SafeCloset for a period of time it will automatically close itself. I think if behaviors like these could be customized by the user will make it more useful. You may say enforce a strong password and quickly close a closet are SafeCloset's security features. But there are some cases that the user may want a short password (easier to type) and want it keep open for a longer time. For example, if the information in a drawer is not that sensitive, but the user does want to protect it to some level, he can use SafeCloset with a short password.

My suggestion is, if the user run safecloset without a configuration file (which is the default), safecloset will run with its default behavior. If the user create a safecloset.config file and put some customization parameter in it, safecloset will use the parameters there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.