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

Encryption doesnt work #42

Closed
zodman opened this issue Nov 20, 2024 · 2 comments
Closed

Encryption doesnt work #42

zodman opened this issue Nov 20, 2024 · 2 comments
Labels
invalid This doesn't seem right

Comments

@zodman
Copy link

zodman commented Nov 20, 2024


$ cd ~/.config/dotfiles/
$ echo "foo" > a.txt
$ RUST_BACKTRACE=full tuckr e a  a/a.txt 
Password: 
thread 'main' panicked at src/secrets.rs:99:61:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0:     0x557ad58f4326 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h9754a6437f1de22a
   1:     0x557ad594277b - core::fmt::write::hb706a393bb60a06f
   2:     0x557ad58fbd79 - std::io::Write::write_fmt::h9b447dc5d824d0bd
   3:     0x557ad59268d6 - std::panicking::default_hook::{{closure}}::h227952daede9dd84
   4:     0x557ad5926566 - std::panicking::default_hook::h31626ee1feb8ee2a
   5:     0x557ad5926da1 - std::panicking::rust_panic_with_hook::h76d2aa694a00748e
   6:     0x557ad58f4877 - std::panicking::begin_panic_handler::{{closure}}::h8855a344ffa1638b
   7:     0x557ad58f4539 - std::sys::backtrace::__rust_end_short_backtrace::h3110d0cbfbf26886
   8:     0x557ad5926a14 - rust_begin_unwind
   9:     0x557ad5817c53 - core::panicking::panic_fmt::h3af706d0346c1c60
  10:     0x557ad5817866 - core::result::unwrap_failed::h2ba69a02b8a8418b
  11:     0x557ad586df06 - tuckr::secrets::encrypt_cmd::h7ad09229bd3a0ed9
  12:     0x557ad5841360 - tuckr::main::hc4f41920779b90c8
  13:     0x557ad5851bf3 - std::sys::backtrace::__rust_begin_short_backtrace::h6573d554991a3bc2
  14:     0x557ad584ca99 - std::rt::lang_start::{{closure}}::h5fa6474094c2c86d
  15:     0x557ad5929d15 - std::rt::lang_start_internal::h2084fce485147f46
  16:     0x557ad584ca85 - main
  17:     0x7fc57eabe27e - __libc_start_call_main
  18:     0x7fc57eabe339 - __libc_start_main_alias_2
  19:     0x557ad5818045 - _start
  20:                0x0 - <unknown>

$ tuckr --version
tuckr 0.10.0

@RaphGL
Copy link
Owner

RaphGL commented Nov 22, 2024

You created a file with the relative path a.txt but passed to tuckr a/a.txt which is a directory that does not exist, so it caused a panic. I'll improve the error message for this.


Also, if you're attempting to use the secrets functionality for anything that is crucial, I'd advise against using it for now. Since the secrets are using SHA256 for passwords and if you're a known target they could potentially be able to bruteforce your password.
There's already an issue for it (#35) which should in theory mean it would be shipped on 0.11

If you still need secrets, a potentially better solution is to create a hook that uses something like gpg so you could still just run
tuckr set deploy-secrets and tuckr set remove-secrets or something of that sort.

@RaphGL RaphGL added the invalid This doesn't seem right label Nov 22, 2024
@RaphGL RaphGL closed this as completed in 8613eb5 Nov 22, 2024
@zodman
Copy link
Author

zodman commented Nov 23, 2024

Nice thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants