Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find optimal GitHub security settings #23

Closed
EvgeniiaVak opened this issue Jul 6, 2023 · 13 comments
Closed

Find optimal GitHub security settings #23

EvgeniiaVak opened this issue Jul 6, 2023 · 13 comments
Assignees
Labels
epic Overview issue with multiple sub-issues security

Comments

@EvgeniiaVak
Copy link
Member

EvgeniiaVak commented Jul 6, 2023

We need to ensure our code base is safe. It's hard to do something irreversibly, because lots of people (well... I think 3 atm) have local copies of almost all the code at all times, but as we grow that might miss some malicious PR, especially if the hackers team up.
Initially, we only set up the main branch protection rules, maybe we need something more? How do we add new members? What is the right process of vetting 3rd party apps? Etc.

@EvgeniiaVak EvgeniiaVak converted this from a draft issue Jul 6, 2023
@EvgeniiaVak
Copy link
Member Author

Example of a 3rd party apps that could potentially be problematic - Github Bot, or Discord integration bot. The question is how safe is it to add those things? Currently we don't have any secrets (for example env. vars for deployment) setup, but we might have in the future. Given that the apps have access to the settings, do they have access to the secrets? Do the apps have more permissions than the member default?

I don't like that there is no open source for the Telegram bot (@RepServ or did I miss it somewhere?). @ArthurQuantize is there source code for Discord bot?

I don't like how much permissions this app asks for
Screenshot 2023-07-17 at 17 49 07

@EvgeniiaVak EvgeniiaVak added the epic Overview issue with multiple sub-issues label Jul 17, 2023
@RepServ
Copy link

RepServ commented Jul 17, 2023

@EvgeniiaVak very important issue you've raised. I'll check for more details and get back please. Thanks...

@RepServ
Copy link

RepServ commented Jul 19, 2023

@EvgeniiaVak very important issue you've raised. I'll check for more details and get back please. Thanks...

From my checks it's not open source. That's risky, especially if it can access github secrets. I've removed it's link to DeXter github account. Please go ahead and revoke access.

NB:
I couldn't find anything on the discord plugin either.

@EvgeniiaVak
Copy link
Member Author

I revoked the telegram bot application access:

Screenshot 2023-08-09 at 09 01 19

->

Screenshot 2023-08-09 at 09 02 06

@EvgeniiaVak
Copy link
Member Author

I'm going to leave discord on because it's not an app, but a webhook for events, so it can only see the events stream, but not settings or something like that.
Screenshot 2023-08-09 at 09 07 59

@ArthurQuantize
Copy link

ArthurQuantize commented Aug 9, 2023 via email

@RepServ
Copy link

RepServ commented Aug 9, 2023 via email

@fliebenberg
Copy link
Contributor

We need to finalise this issue as it relates to new contributors to the project. I would suggest we create roles that we can assign people to as they gain trust.
Contributor -> members who can contribute to issues, fork the project and make PRs but cannot approve PRs or merge.
Developer -> members who can approve PRs
Admin _> can change member status and add new members

Not a github expert, but think this can be done. @EvgeniiaVak keen to hear you opinion since you have been "running" github very professionally for us up to now.
Keen to hear other opinions so we can set this up. I expect more developers to start joining so it will help to get the process sorted.

@EvgeniiaVak
Copy link
Member Author

In my opinion, it's not an urgent issue, anyone in the world can make a fork already (so nobody is blocked and anyone can work on issues). The right to approve requests and merge needs to be earned... somehow... I don't know how though. If we just grant approve-and-merge rights to anyone who asks, that is good for newcomers to feel welcome and that's good, but it's also risky.

I like the Contributor / Developer (I think it's Maintainer in GitHub terms) / Admin suggestion. This will require some time to get it right though. As we not only want to define the roles, we need to set up a system on how to decide who can gain any of these roles and how.

The The good place to start - https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization - for a person (a member, but not an owner) to gain those roles (technically) we need to create teams and assign people to those teams, also a bit of hustle. If possible, let's postpone this one till after the MVP.

@EvgeniiaVak EvgeniiaVak moved this from Todo to Launch in development Aug 29, 2023
@EvgeniiaVak EvgeniiaVak moved this from Launch to Todo in development Dec 26, 2023
@EvgeniiaVak EvgeniiaVak moved this from Todo to In Progress in development Jan 16, 2024
@EvgeniiaVak EvgeniiaVak self-assigned this Jan 16, 2024
@yuliaSharabi
Copy link
Contributor

I believe we are lucking a procedure with best practices for PR review, PR approvals and acsess control (roles).
We can start with having the read.me called "PR guidlies" and seperate it to phases - review, approve, who can submit/approve etc..
I am willing to start this task. @EvgeniiaVak .
There are more to be done, security wise.
Use GitHub's Security Features: such as Dependabot for automatic dependency updates, Code Scanning for finding vulnerabilities, and Secret Scanning

Usfull resources:
securing-your-repository,
securing-accounts.

@EvgeniiaVak
Copy link
Member Author

EvgeniiaVak commented Jan 20, 2024

We have some procedure around PRs and autodeploy (PR with update to readme is welcome, also maybe @yuliaSharabi you have some suggestion to edit this procedure):

  • deployment for mainnet happens automatically from main branch (for testnet from the PR previews, links are generated in each PR)
  • main branch can be updated only via a PR
  • anyone can create a fork and make a PR, only org owners and developers can create a branch in this repo and make a PR
  • anyone can leave comments in PRs
  • org owners, developers and testers can review PRs (leave approvals, require changes)
  • [WIP] for a PR to be able get merged, it needs at least 2 approvals, and at least 1 approval from a code owner (do not confuse with org owners)
  • [WIP] code owners are specified in CODEOWNERS file (add CODEOWNERS file #214), currently it's developers for all the code, and testers for e2e folder

I'm not sure who specifically can merge (click the merge button) a PR, after it gets at least 2 approvals and at least 1 approval from a code owner, maybe only org owners (aka repo admins in this case), or maybe developers and testers can do it too.

@EvgeniiaVak
Copy link
Member Author

@yuliaSharabi here is the updated https://github.com/DeXter-on-Radix/website/settings/security_analysis , let me know if you think we should add/enable anything else
screencapture-github-DeXter-on-Radix-website-settings-security-analysis-2024-01-20-11_09_08

@EvgeniiaVak EvgeniiaVak moved this from In Progress to Todo in development Feb 14, 2024
@EvgeniiaVak EvgeniiaVak moved this from Todo to In Progress in development Feb 14, 2024
@EvgeniiaVak
Copy link
Member Author

Closing this, because the security discussion moved to Discord (restricted access channel)

@github-project-automation github-project-automation bot moved this from In Progress to Done in development Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Overview issue with multiple sub-issues security
Projects
Archived in project
Development

No branches or pull requests

5 participants