history.push('/')}
11 | />
12 | );
13 | };
14 |
15 | export default withRouter(Logo);
16 |
--------------------------------------------------------------------------------
/src/client/components/board/board.css:
--------------------------------------------------------------------------------
1 | .model {
2 | position: fixed;
3 | left: 0;
4 | width: 100%;
5 | }
6 |
7 | .status-bar {
8 | border-bottom: 1px solid #ccc;
9 | padding: 5px;
10 | }
11 |
12 | .timer-wrapper {
13 | position: fixed;
14 | left: 5px;
15 | bottom: 5px;
16 | background-color: white;
17 | }
18 |
19 | .player-wrap {
20 | position: relative;
21 | }
22 |
23 | .player-wrap:hover {
24 | z-index: 1;
25 | }
--------------------------------------------------------------------------------
/src/client/components/dealtcard/dealtcard.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import DealtCard from './dealtcard';
4 | import { DEFAULT_GAME_MODE } from '../../../utils/constants';
5 |
6 | it('renders without crashing', () => {
7 | const div = document.createElement('div');
8 | ReactDOM.render(| Name | 32 |Passed | 33 |Card | 34 |Score | 35 |
|---|---|---|---|
|
41 | {this.props.names[idx]}
42 | {parseInt(this.props.playerID) === idx && (
43 |
44 | (you)
45 |
46 | )}
47 | |
48 |
49 | {hasPassed(idx, this) && (
50 | ✓
51 | )}
52 | |
53 | 54 | 55 | {getCardDisplayName( 56 | this.props.gameMode, 57 | this.props.cards[idx], 58 | )} 59 | 60 | | 61 |
62 | |
64 |
29 | The Elevation of Privilege game is designed to be the easiest 30 | way to start looking at your design from a security 31 | perspective. It's one way to threat model, intended to be 32 | picked up and used by any development group. 33 |
34 |35 | Because the game uses STRIDE threats, it gives you a framework 36 | for thinking, and specific actionable examples of those 37 | threats. 38 |
39 || Spoofing | 44 |Impersonating something or someone else | 45 |
|---|---|
| Tampering | 48 |Modifying data or code | 49 |
| Repudiation | 52 |Claiming not to have performed an action | 53 |
| Information Disclosure | 56 |57 | Exposing information to someone not authorized to see it 58 | | 59 |
| Denial of Service | 62 |Denying or degrading service to users | 63 |
| Elevation of Privilege | 66 |Gain capabilities without proper authorization | 67 |
72 | An Elevation of Privilege game is usually initiated for one of 73 | a few reasons. Those include because a group of developers has 74 | a system or feature to threat model, because someone wants to 75 | learn or teach the skill, or because someone has picked up a 76 | copy of the game and wants to explore. 77 |
78 |79 | This is a super-set of all non-game motivations to threat 80 | model. In any case, it is important to start with a system to 81 | be threat modelled, and an architectural diagram of that 82 | system should be available. A whiteboard diagram is ideal if 83 | participants agree it is reasonably accurate and it shows 84 | programs, data flows and data stores. For this version of the 85 | game, players should use a model created on{' '} 86 | 91 | Threat Dragon 92 | 93 | . If no such model exists, it needs to be created before play 94 | starts. 95 |
96 |97 | Players need a way to track bugs hence using a Threat Dragon 98 | model is ideal. 99 |
100 |102 | Play starts by dealing out the entire deck (which is 103 | automatically done when the game is created), and ensuring 104 | players are familiar with the rules. 105 |
106 |108 | A player (most likely an engineer) developing the system would 109 | explain the diagram to everyone playing. 110 |
111 |112 | Play starts with the player with the 3 of Tampering, and then 113 | proceeds clockwise around the table in tricks. 114 |
115 |116 | The game has two phases, Play and{' '} 117 | Threat Identification 118 |
119 |120 | In the Play phase, the current player would 121 | only be able to navigate through the diagram and/or select 122 | components. 123 |
124 |125 | When a card is dealt, the{' '} 126 | Threat Identification phase begins and 127 | players in any order can interact with the model and add 128 | threats or pass. 129 |
130 |After all players pass, only then would the play resume.
131 |132 | Each trick is played 'in' the suit that was led. 133 | That is, each player must play a card of that suit if they 134 | have one. Playing a card consists of reading it aloud, and 135 | explaining how it applies to the system being threat modelled 136 | and the component affected. The players can record their 137 | threat by selecting the component and adding the associated 138 | threat. 139 |
140 |141 | Playing a card where a player knows of a compensating control 142 | is less exciting, but still valid, because it allows for 143 | discussion of compensating controls, and helps newcomers to 144 | threat modelling understand the cycle of discovery and 145 | mitigation. 146 |
147 |148 | If the player has no cards left in the suit that was led, then 149 | they may play a card from any suit, the game does that 150 | automatically and only valid cards are available to be played. 151 | After each player has played a card, the trick is won by the 152 | player who has played the highest card in either the suit that 153 | was led or in the 'trump' suit, Elevation of 154 | Privilege. 155 |
156 |157 | The highest card is the highest value card played in the suit 158 | led, unless there was one or more trump card played. If a 159 | trump card has been played, the highest value trump card is 160 | the winning card. 161 |
162 |163 | A point is awarded for every threat identified and for every 164 | hand that is won. 165 |
166 |167 | The final model with the threats can be downloaded at the end 168 | of the game. 169 |
170 |172 | The game was originally invented by{' '} 173 | 178 | Adam Shostack 179 | {' '} 180 | at Microsoft. The{' '} 181 | 186 | EoP Whitepaper 187 | {' '} 188 | written by Adam can be downloaded which describes the 189 | motivation, experience and lessons learned in creating the 190 | game. 191 |
192 |193 | The motivation for creating this online version of the game at 194 | Careem was due to a large number of teams working remotely 195 | across several geographies and we wanted to scale our method 196 | of teaching threat modeling to our engineering teams. 197 |
198 |199 | The game is built using{' '} 200 | boardgame.io, a framework 201 | for developing turn based games. The graphics, icons and card 202 | images used in this version were extracted from the original 203 | card game built by Microsoft. 204 |
205 |