03 / 07 · Cybersecurity
Security audit of Apart, the desktop app for calls and groups that I built: I reviewed the Electron, Appwrite and server function code, found 8 issues, fixed 6 in version 0.7.1 and proved each fix with tests and a production check.
- Role
- Auditor and author of the fixes
- Status
- Done, fixed in version 0.7.1
- Type
- CYBERSECURITY · CODE REVIEW
- Year
- 2026

- 8
- findings, from high to informational
- 6
- fixed and shipped in 0.7.1
- 14/14
- security tests passing
/The problem
- Apart already had rules on the server, but some tables accepted writes straight from the app.
- A rule that only exists in the interface can be bypassed by anyone talking to the API directly.
- Link previews fetched pages on behalf of any user, which calls for care with internal addresses.
/Discovery
I read the code of the Electron main process, the bridge to the page, the local server, the content security policy, the permissions of every table and every action of the server function. For each write the question was the same: who can do this without going through the app? Findings came from reading the code, rated by severity, with evidence and a suggested fix.
What it taught me
- 01Table permissions say who can create, not what can be created.
- 02Every rule has to exist on the server; the interface only mirrors it.
- 03A fix is only done when there is a test that would fail without it.
/The solution
A server-side check for everything the app writes directly, defense in depth in the app and tests that prove each fix.
/Decisions
- 01
Check on the event, without slowing the chat
The server function checks every message, reaction and sound as soon as it is created. Sending stays instant, and anything invalid is deleted.
- 02
Check the address after DNS
Link previews refuse internal addresses after resolving the name and on every redirect, not just by the text of the link.
- 03
Minimal permissions in Electron
The app window only gets what it uses: microphone, camera, screen and notifications. The YouTube player gets nothing.
- 04
Prove it before and after shipping
14 automated tests, a dry run against real data that changes nothing, and a forged row created in production to watch the server delete it.
/Gallery
/Technologies
Next project
