Skip to content

Commit

Permalink
Add prototype GTK UI
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Dec 23, 2023
1 parent dcc2fb8 commit 6f30d75
Show file tree
Hide file tree
Showing 22 changed files with 605 additions and 1,394 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
goldwarden*
goldwarden
__pycache__
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ Run a command with injected environment variables
goldwarden run -- <command>
```

Autofill
Autofill (Flatpak only?)
```
goldwarden autofill --layout <keyboard-layout>
dbus-send --type=method_call --dest=com.quexten.goldwarden /com/quexten/goldwarden com.quexten.goldwarden.Autofill.autofill
```
(Create a hotkey for this depending on your desktop environment)

Expand Down
12 changes: 11 additions & 1 deletion agent/actions/logins.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func handleGetLoginCipher(request messages.IPCMessage, cfg *config.Config, vault
}

func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx *sockets.CallingContext) (response messages.IPCMessage, err error) {
if approved, err := pinentry.GetApproval("Approve List Credentials", fmt.Sprintf("%s on %s>%s>%s is trying to list credentials (name & username)", ctx.UserName, ctx.GrandParentProcessName, ctx.ParentProcessName, ctx.ProcessName)); err != nil || !approved {
if approved, err := pinentry.GetApproval("Approve List Credentials", fmt.Sprintf("%s on %s>%s>%s is trying access all credentials", ctx.UserName, ctx.GrandParentProcessName, ctx.ParentProcessName, ctx.ProcessName)); err != nil || !approved {
response, err = messages.IPCMessageFromPayload(messages.ActionResponse{
Success: false,
Message: "not approved",
Expand All @@ -123,6 +123,7 @@ func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, va

var decryptedName []byte = []byte{}
var decryptedUsername []byte = []byte{}
var decryptedPassword []byte = []byte{}

if !login.Name.IsNull() {
decryptedName, err = crypto.DecryptWith(login.Name, key)
Expand All @@ -140,10 +141,19 @@ func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, va
}
}

if !login.Login.Password.IsNull() {
decryptedPassword, err = crypto.DecryptWith(login.Login.Password, key)
if err != nil {
actionsLog.Warn("Could not decrypt login:" + err.Error())
continue
}
}

decryptedLoginCiphers = append(decryptedLoginCiphers, messages.DecryptedLoginCipher{
Name: string(decryptedName),
Username: string(decryptedUsername),
UUID: login.ID.String(),
Password: string(decryptedPassword),
})

// prevent deadlock from enclaves
Expand Down
78 changes: 0 additions & 78 deletions autofill/autofill.go

This file was deleted.

Loading

0 comments on commit 6f30d75

Please sign in to comment.