Replying to Avatar hodlbod

**Security Update**

I've got some bad news for you guys. This morning, as I was adding error handling to flotilla, I discovered that Coracle has been sending user session objects to bugsnag when reporting errors.

Who is affected: Users who triggered an error in Coracle while signed in with their private key, since December 5th 2023.

What I've done:

- I immediately released a new version of Coracle, both to web and to zap.store

- I have deleted the affected apks from my releases

- I have deleted all my error data from bugsnag

- I have deleted my bugsnag project and rotated my api key, so lingering error reports will be dropped

- I have audited my code for use of the session object to ensure nothing else like this is happening

What you should do:

- If you're logged in with your private key, log out

- Hard refresh the page to ensure you have the latest version of Coracle

The bottom line is that if you signed in to Coracle with your private key, it has been shared with me and with bugsnag. In practical terms, your keys should still be secure, since they were sent over TLS, and have been deleted. But there is no guarantee I can offer that they are in fact gone.

I take my users' privacy seriously. My error reporting implementation doesn't record user IPs, it redacts identifying data, and it allows users to opt-out. I also warn the user when they attempt to enter an nsec into a text field. In this case, I simply screwed up, and I sincerely apologize. Reply to this note if you have any questions.

I assume this is a good reason to always use signing extensions yes? That would avert issues like this, unless the extension itself was somehow compromised or had a bug, is that right?

Reply to this note

Please Login to reply.

Discussion

Yep, remote signers and browser extensions are a great solution for this, and have been around for years now.

Perhaps it would make sense to post a list of signing extensions on the login page, and recommend that people use those rather than entering an nsec, or perhaps you already do that?

Yep, nsec login is already discouraged in Coracle's login process.

Why have it even as an option?

Keys are simple, external 3rd party dependencies aren't (and, as you note, may not be any more secure). It's all about ease of use for non-technical users. But the days of nsec login are numbered, we just need really solid flows for secure custody. nsec.app comes close.

Entering a private key into a web app is much less secure than a signer app or extension. However, a signer app still can have its issues, just less.

A few of the issues:

- Phishing attempts from similar looking domains.

- Hot loading code from a remote server, not signed releases from the maintainer.

- Encourages entering nsec somewhat carelessly into more than one web app. It could be entered into a clipboard, which as been another vector of attack.

- Users habits of this type of behavior from passwords on every other web app. Passwords can be reset via email resets, a private key can not be reset. It can thus not communicate the importance of it not leaking, and thus careless backups and storage.

None of that is good for non-technical users.

Great points. Web apps also have lots more supply chain attack vectors than single-purpose signers might. I especially like your point about training users. Lowering security to accommodate UX doesn't do anyone any favors.

What are your thoughts on https://app.nsecbunker.com/?

It's a good start, but ultimately a custodial honeypot. Self-hosted bunkers are much better, but hard for normies. Multisig could be a great way to solve this, I know it's been worked on some.

start establishing the self hosted bunker paradigm now. its going to be necessary for the internet of the future

The use case for it I think is limited to cases in which delegation is a need, for example for an organization with employees.

It being any kind of added safety or security, I think is a far stretch and confusing use of naming.

It's often custodial and by that nature already leaked; not your keys, not your profile. As for it being self-hosted, a simple signer app that isn't remotely accessible or managed has much less risk.

I am guessing two possibilities:

1. The friction to onboard new users would be pretty high as it currently stands, if they have to go and figure out using a key extension.

2. The developer, in this case @hodlbod, would need to trust that the signing extension options are excellent, and have been audited rigorously.

I can imagine that as a developer, if one knows one is acting in good faith, it might be easier to trust oneself and one’s intentions, than those of others?

Curious to hear thoughts, esp from developers nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z nostr:npub16c0nh3dnadzqpm76uctf5hqhe2lny344zsmpm6feee9p5rdxaa9q586nvr nostr:npub1g53mukxnjkcmr94fhryzkqutdz2ukq4ks0gvy5af25rgmwsl4ngq43drvk nostr:npub1v0lxxxxutpvrelsksy8cdhgfux9l6a42hsj2qzquu2zk7vc9qnkszrqj49 nostr:npub1xdtducdnjerex88gkg2qk2atsdlqsyxqaag4h05jmcpyspqt30wscmntxy

Nsec login definitely doesn't make much sense, aside from "bunkers are high friction for now so Damus users should just paste nsec". This will improve as bunkers improve, I will share a significant step forward in this area next week.

Local nsec signup makes total sense - let users start asap but then let them export nsec to a bunker. Nostr-login widget has this option built-in, only works with nsec.app for now but will be proposed as NIP upgrade when we are confident it's good enough.

I agree, nsec.app is the smoothest experience I've seen so far. Thinking about seeing if I can integrate it into the onboarding experience in Coracle, friction notwithstanding.

Awesome! I'm sure there's a lot to improve there, please let me know if you have ideas or issues.

Your last sentence is important--what you're really asking (or assuming) is that we can "trust" the code more in signing extensions (and frankly that may not be the case).

This is one of the weaknesses in the open source community. We all assume that because the code is available to all, it's "good".

But what really happens (in more cases that we might want to admit) is the only "audit" the code receives is from the original developer--I'd even dare to say that most projects out on git hub probably receive very little (if any) code review prior to being released.

Yes, I guess I am hoping (!) that the code for a signing extension would be rigorously reviewed.. and even then, I am aware it could have a vulnerability (but any code could have that, so at some point we (esp us non-coders) have to *trust* the code 😅)

Well, there's the rub...unless you go in and review the code yourself, you must end up trusting others...

And when someone like nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn posts "hey, we have an issue" I automatically trust that developer even more.

What I *really* worry about is dishonest projects / developers, and you see it all the time. Someone releases an app on the Play Store that does something nefarious...happens more often that most realize.

And look at all the data breaches out there--those are code mistakes that ARE audited (heavily) and still they happen...

I hear you. What do you see as the solution?

I don’t have one, though I do see it is probably a good idea to let new users know that this issue has not been solved, and that they need to be aware that there is a chance their nsec could be compromised.

Of course, that would cause friction too, but my approach with onboarding people to both #bitcoin and #nostr is to remind them that this is all a big experiment, and we are part of it, part of creating the potential for freedom, even as we move into a digital age.

Agreed. Unless you've diligently ensured your nsec has continuously remained isolated from the Internet (which might be nobody), it's prudent to operate as if your nsec has already been compromised.