Welcome, and thank you for considering contributing to COVID Shield!
First, please review this document and the Code of Conduct.
COVID Shield takes security very seriously. In the interest of coordinated disclosure, we request that you report any potential vulnerabilities privately in accordance with our Security Policy.
If you'd like to contribute a documentation or static file change, feel free to fork the project in GitHub and open a pull request from that fork against this repository.
- Fork https://github.com/CovidShield/server to your account.
- Clone your fork of the CovidShield/server repo locally by running
git clone https://github.com/<username>/server.git
. - Enter the repo directory
cd server
. - Run
docker-compose up
.
Note: It is normal to see a few errors from the retrieval service exiting initially while the MySQL database is instantiated
- Go (tested with 1.14)
- Ruby (tested with 2.6.5)
- Bundler
- protobuf (tested with libprotoc 3.11.4)
- protoc-gen-go (may only be needed to change
proto/*
) - libsodium
- docker-compose
- MySQL
Run make
or make release
to build a release version of the servers.
# example...
export DATABASE_URL="root@tcp(localhost)/covidshield"
export KEY_CLAIM_TOKEN=thisisatoken=302
./build/release/key-retrieval migrate-db
PORT=8000 ./build/release/key-submission
PORT=8001 ./build/release/key-retrieval
Note that 302 is a MCC: 302 represents Canada.
Set your database connection details using environment variables (note that the database will be clobbered so ensure that you don't use a production database):
$ export DB_USER=<username>
$ export DB_PASS=<password>
$ export DB_HOST=<hostname>
$ export DB_NAME=<test database name>
Then, ensure the appropriate requirements are installed:
$ bundle install
Finally, run:
$ make test
Once you're happy with your changes, please fork the repository and push your code to your fork, then open a pull request against this repository.