Giter Club home page Giter Club logo

elevation-of-privilege's Introduction

Elevation of Privilege

Build Status Maintainability Test Coverage

Elevation of Privilege (EoP) is the easy way to get started and learn threat modeling. It is a card game that developers, architects or security experts can play.

The deployed version can be found here: https://elevation-of-privilege.herokuapp.com/

Running

There are two components that need to be started in order to run the game.

  1. Server
  2. UI/Client

Development/local

The server can be started using:

npm run server

There are 3 koa apps that bind on the respective ports:

Application Description Environment Variable Default
Server The game server for boardgame, exposes socket.io endpoints SERVER_PORT 8000
Lobby API Internal API for lobby operations, should not be exposed publicly INTERNAL_API_PORT 8002
Public API Public API to create games and retrieve game info API_PORT 8001

The UI can be started using:

npm run start

The UI can also be built and served statically, keep in mind that the values of the port numbers will be hard coded in the generated files.

Docker

The docker image uses supervisord to run both the UI and the server in the same container. The UI is built and served using nginx, it is also used to proxy requests from /api to the public API.

docker build . -t eop:latest
docker run --rm -it -p 8080:80 eop:latest

This would start EoP on port 8080 and would be accessible at http://localhost:8080/.

TODO

  • Spectator mode
  • UI fixes (optimizations, smaller screens)
  • Upload an image instead of a model. Might need restructuring as we rely on diagram components + reporting would change
  • Optimize the card sprite sheet (can look at SVGs)
  • Improve test coverage, write tests for possible game states and moves
  • Refactor and have reusable components
  • Optimize component renders through shouldComponentUpdate
  • Optimize docker image, currently using ubuntu:latest
  • Write contributing guide

Credits

The game was originally invented by Adam Shostack at Microsoft. The EoP Whitepaper written by Adam can be downloaded which describes the motivation, experience and lessons learned in creating the game.

The motivation for creating this online version of the game at Careem was due to a large number of teams working remotely across several geographies and we wanted to scale our method of teaching threat modeling to our engineering teams.

The game is built using boardgame.io, a framework for developing turn based games. The graphics, icons and card images used in this version were extracted from the original card game built by Microsoft.

Made with ๐Ÿ’š at Careem

elevation-of-privilege's People

Contributors

dehydr8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.