Skip to content

Security concerns in case a bad-actor scenario happens #102

@sarpik

Description

@sarpik

Hey there, thanks for the great tool!

I was concerned about the possible security issues, e.g. a bad actor could steal everyone's notes with just a single faulty commit.

The potential impact is high because the source of the backup tool is centralized (this github repo), and the default schedule to run the tool (cron schedule in the provided github workflow that almost nobody changes) is often (hourly).


Currently, the way one is recommended to setup the backup github workflow includes this step:

      -   name: Setup dependencies
          run: |
            pip install git+https://github.com/MatthieuBizien/roam-to-git.git@master

the problem with this is:

  1. there's no clear version - it's just the master branch (this is more a problem if you're going to make breaking changes in the future),
  2. even if there was a set version, a bad actor could still steal all of one's notes with a single faulty commit,
  3. and since the default provided cron inerval is hourly, it would take maximum 1h to steal all notes from the users of this tool who haven't implemented counter-measures themselves.

the main problem is that the user does not control the backup code that will be ran (it's centralized). if they're security-conscious - they might as well assume the code ran there is arbitrary, because it could be.

the work-around currently is to fork the roam-to-git repository and replace the source in the same .github/workflows/main.yml:

-            pip install git+https://github.com/MatthieuBizien/roam-to-git.git@master
+            pip install git+https://github.com/your-username/roam-to-git.git@master

which makes you, the individual user, in control of the updates to the code (syncing from upstream becomes manual - and that's what we want, since we can now verify code changes ourselves, and that doesn't need to happen often either).

but this is what the "advanced" users are doing. Until we find a better solution - perhaps this should be the recommended, if not the only, default?

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions