Giter Site home page Giter Site logo

kure's People

Contributors

brittonhayes avatar ggp1 avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kure's Issues

error: invalid length

I'm trying to use a key file and getting error error: invalid length. I tried x509 key file as well as just a simple hash string in a file and the same error.

Out of memory error

Kure is throwing OOM error below even though I have lots of memory.

$ free -m
              total        used        free      shared  buff/cache   available
Mem:           3933        3554         103           0         275        1313
Swap:          1024         397         626
$ kure ls
Enter master password: 
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0xac392f, 0x16)
        C:/Program Files/Go/src/runtime/panic.go:1117 +0x72
runtime.sysMap(0xc004000000, 0x40000000, 0xf5c8f0)
        C:/Program Files/Go/src/runtime/mem_linux.go:169 +0xc6
runtime.(*mheap).sysAlloc(0xf43800, 0x40000000, 0x42bf97, 0xf43808)
        C:/Program Files/Go/src/runtime/malloc.go:729 +0x1e5
runtime.(*mheap).grow(0xf43800, 0x20000, 0x0)
        C:/Program Files/Go/src/runtime/mheap.go:1346 +0x85
runtime.(*mheap).allocSpan(0xf43800, 0x20000, 0xc000190100, 0x7f8cc1891668)
        C:/Program Files/Go/src/runtime/mheap.go:1173 +0x609
runtime.(*mheap).alloc.func1()
        C:/Program Files/Go/src/runtime/mheap.go:910 +0x59
runtime.systemstack(0x0)
        C:/Program Files/Go/src/runtime/asm_amd64.s:379 +0x66
runtime.mstart()
        C:/Program Files/Go/src/runtime/proc.go:1246

goroutine 1 [running]:
runtime.systemstack_switch()
        C:/Program Files/Go/src/runtime/asm_amd64.s:339 fp=0xc0001237e0 sp=0xc0001237d8 pc=0x46a7a0
runtime.(*mheap).alloc(0xf43800, 0x20000, 0xc000120101, 0x40d42a)
        C:/Program Files/Go/src/runtime/mheap.go:904 +0x85 fp=0xc000123830 sp=0xc0001237e0 pc=0x427c45
runtime.(*mcache).allocLarge(0x7f8ce86eba68, 0x40000000, 0xc0001b0101, 0x7f8cc1891668)
        C:/Program Files/Go/src/runtime/mcache.go:224 +0x97 fp=0xc000123888 sp=0xc000123830 pc=0x4182b7
runtime.mallocgc(0x40000000, 0x9f9960, 0x1, 0xc0001be000)
        C:/Program Files/Go/src/runtime/malloc.go:1078 +0x925 fp=0xc000123910 sp=0xc000123888 pc=0x40dee5
runtime.makeslice(0x9f9960, 0x100000, 0x100000, 0xe3936e4be40b3259)
        C:/Program Files/Go/src/runtime/slice.go:98 +0x6c fp=0xc000123940 sp=0xc000123910 pc=0x44df6c
golang.org/x/crypto/argon2.initBlocks(0xc0001ba000, 0x800100000, 0x29, 0xc0000feabd, 0x20)
        F:/Gasti/Go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:160 +0x59 fp=0xc0001239a0 sp=0xc000123940 pc=0x803239
golang.org/x/crypto/argon2.deriveKey(0x2, 0x7f8cc188ffd7, 0x29, 0x29, 0xc0000feabd, 0x20, 0x20, 0x0, 0x0, 0x0, ...)
        F:/Gasti/Go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:115 +0x1dc fp=0xc000123a90 sp=0xc0001239a0 pc=0x802cfc
golang.org/x/crypto/argon2.IDKey(...)
        F:/Gasti/Go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:99
github.com/GGP1/kure/crypt.deriveKey(0xc0000feabd, 0x20, 0x20, 0x1, 0x1, 0x4, 0x4, 0x1, 0x0)
        F:/Gasti/Go/src/github.com/GGP1/kure/crypt/crypt.go:123 +0x2a6 fp=0xc000123b68 sp=0xc000123a90 pc=0x809086
github.com/GGP1/kure/crypt.Decrypt(0xc0000fea81, 0x5c, 0x5c, 0x5c, 0x10000000000001, 0x100000008, 0x0, 0x0)
        F:/Gasti/Go/src/github.com/GGP1/kure/crypt/crypt.go:68 +0x9c fp=0xc000123c30 sp=0xc000123b68 pc=0x808a3c
github.com/GGP1/kure/auth.Login.func1(0xc000200500, 0xf5a4b0, 0x0, 0x0, 0x0, 0x0)
        F:/Gasti/Go/src/github.com/GGP1/kure/auth/auth.go:63 +0x18f fp=0xc000123ce0 sp=0xc000123c30 pc=0x918baf
github.com/spf13/cobra.(*Command).execute(0xc000200500, 0xf5a4b0, 0x0, 0x0, 0xc000200500, 0xf5a4b0)
        F:/Gasti/Go/pkg/mod/github.com/spf13/[email protected]/command.go:841 +0x523 fp=0xc000123da0 sp=0xc000123ce0 pc=0x904303
github.com/spf13/cobra.(*Command).ExecuteC(0xeafc40, 0xaebed0, 0xb7c898, 0xb6ad20)
        F:/Gasti/Go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375 fp=0xc000123e80 sp=0xc000123da0 pc=0x904dd5
github.com/spf13/cobra.(*Command).Execute(...)
        F:/Gasti/Go/pkg/mod/github.com/spf13/[email protected]/command.go:897
github.com/GGP1/kure/commands/root.Execute(0xc000152200, 0xc000152200, 0xc000000180)
        F:/Gasti/Go/src/github.com/GGP1/kure/commands/root/root.go:41 +0x3b fp=0xc000123eb0 sp=0xc000123e80 pc=0x98d51b
main.main()
        F:/Gasti/Go/src/github.com/GGP1/kure/main.go:33 +0x1b3 fp=0xc000123f88 sp=0xc000123eb0 pc=0x98e873
runtime.main()
        C:/Program Files/Go/src/runtime/proc.go:225 +0x256 fp=0xc000123fe0 sp=0xc000123f88 pc=0x438bd6
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000123fe8 sp=0xc000123fe0 pc=0x46c4a1

goroutine 18 [sleep]:
time.Sleep(0x1dcd6500)
        C:/Program Files/Go/src/runtime/time.go:193 +0xd2
github.com/awnumar/memguard/core.NewCoffer.func1(0xc0000a0240)
        F:/Gasti/Go/pkg/mod/github.com/awnumar/[email protected]/core/coffer.go:43 +0x2a
created by github.com/awnumar/memguard/core.NewCoffer
        F:/Gasti/Go/pkg/mod/github.com/awnumar/[email protected]/core/coffer.go:40 +0xd6

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
        C:/Program Files/Go/src/runtime/sigqueue.go:168 +0xa5
os/signal.loop()
        C:/Program Files/Go/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
        C:/Program Files/Go/src/os/signal/signal.go:151 +0x45

goroutine 20 [chan receive]:
github.com/GGP1/kure/sig.(*sig).Listen.func1(0xf2ae20, 0xc000152200)
        F:/Gasti/Go/src/github.com/GGP1/kure/sig/sig.go:69 +0x4c
created by github.com/GGP1/kure/sig.(*sig).Listen
        F:/Gasti/Go/src/github.com/GGP1/kure/sig/sig.go:68 +0xfd

Ctrl +d in kure session create a loop

Hello,
I am testing Kure (really promising) under Linux (Ubuntu 20.04).
I have an issue when i try to quit the session with ctrl d, it looks that i create a loop. (the help message over and over).
Thanks

Using nonce for dst in call to Seal

Hi,

On

ciphertext := gcm.Seal(nonce, nonce, data, nil)
it seems odd to use nonce as dst in AEAD.Seal(). It appears that in Seal sliceForAppend is called which increases the size of dst if it is not large enough for the result. If it increases the size, when it gets to the deriveCounter call, it will take the wrong branch and not use the intended counter calculation, see https://golang.org/src/crypto/cipher/gcm.go?s=3384:3423#L397

I'd suggest creating a new slice for dst in the call to Seal.

Config permissions issues

Description

Hey there! Really like the idea of kure and would love to use it. Unfortunately, when attempting to run kure, it appears that there are some issues with the permissions being set by the config file or even with the permissions schema deeming a config eligible for reading by kure.

This prevents me from using any subcommands because the config is read before every function call. I cannot even run the help command, so I would consider this fairly high severity.

It looks as though this was also spotted in your Github action build step here:
https://github.com/GGP1/kure/runs/1980446702#step:4:87

Expected Behavior

# Desired behavior is the following command
# followed by no error and a successfully created yaml config
kure config create

System Details

# Systems where the error 
# has been replicated
systems:
 - name: "Pop OS"
   shell: "zsh"
   prompt: "starship"

 - name: "OSX"
   shell: "zsh"
   prompt: "starship"

Possible Issues

I believe the issue is localized to the /config package in the repository as that is the only place dealing with file permissions for ~/.kure/kure.* files.

Screenshots

image
image

it command - No options to select from

What version of Kure are you using?

v0.5.0

Does this issue reproduce with the latest release?

Yes

What did you do?

kure it -> file -> cat
# or
kure it -> file -> mv

What did you expect to see?

A list of the files names

What did you see instead?

error: please provide options to select from

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.