Resources from the DelhiFOSS talk: start with two access-control flaws in a fictional shop, consider the attacker's choices, and build a threat model whose controls can be checked.
A vulnerability list is the beginning. Follow the attacker, trace the system, and verify the controls.
Open the interactive demo — edit the four losses or try the presets. It runs in your browser; no installation or account is needed.
- Slides (PDF) and browser slides.
- Shop architecture, diagram and printable diagram.
- Precogly model and threat/control register.
- Hands-on Precogly walkthrough.
- Loss-matrix example and Python program.
- Authorization example, its scope and tests.
- Exercises and further reading.
GitHub displays the PDF and Markdown directly. To use the HTML slides, interactive matrix and bundled Precogly editor, download or clone the repository and run it locally.
Requires Python 3.10+ and a modern browser. No package installation, account or internet connection is required after downloading the repository.
git clone https://github.com/sidd190/DELHIFOSS_14.git
cd DELHIFOSS_14
bash start.shOpen http://127.0.0.1:4173 for the resources and http://127.0.0.1:4174/guest for Precogly. Keep the terminal running; Ctrl+C stops both servers. On Windows, run python scripts/serve.py. If those ports are already in use, stop the earlier instance before starting another.
python3 game-theory/payoff.py
python3 -m unittest discover -s tests -vThe browser slides use arrow keys or space to advance and F for fullscreen.
Customers can read their orders and change the delivery address before dispatch. Administrators perform privileged operations. T1 examines missing ownership checks on reads and writes; T2 examines missing permission checks on administrative operations. A denied write must leave the stored order unchanged.
The game uses the following invented losses. The defender minimizes; the attacker maximizes.
| Defender | Attack API | Attack admin |
|---|---|---|
| Fix API | 2 | 8 |
| Harden admin | 4 | 5 |
For the attacker, Attack API is strictly dominated: 8 > 2 and 5 > 4. Against Attack admin, the defender chooses Harden admin, giving loss 5 instead of 8. Hardening admin is a best response here, not a dominant defensive strategy.
The four questions connect the decision to the application:
- What are we working on?
- What can go wrong?
- What are we going to do about it?
- Did we do a good enough job?
The small in-memory code example checks ownership, address-edit eligibility and administrative permission. Its tests include rejected-write state checks and deliberate guard-removal checks. It is not a deployed shop, authentication system or database transaction design. Real implementations need consistent endpoint authorization and atomic handling of dispatch status and address updates.
The Precogly frontend is pinned to commit 775a32647263ed7f25e1515fe6df7a8828812e1c. Its import, linked threats/controls, save and reopen workflow was checked. This does not establish compatibility with every interchange consumer or prove the application secure. See bundle provenance and licenses.
The larger-shop figure is a hypothetical design extension. The executable example and saved model cover the smaller shop.
Edit the matrix or make a copy of the threat model. Start from the exercises, change one thing, and explain which control or test must change with it.
The audience slide source is presentation/slides.source.json. Run python3 scripts/build_slides.py after changing it. Diagrams are editable SVG files. To regenerate the model from its authoring JSON, see threat-model/README.md.
Original examples and slides are MIT licensed. The bundled Precogly build and dependencies retain their own licenses and notices under vendor/precogly/.
The live matrix is published from docs/ through GitHub Pages. After editing demo/matrix.html, run python3 scripts/build_demo.py and commit the regenerated docs/index.html.
Web photographs and illustrations retain their Creative Commons licenses; see asset credits. The meme captions are fictional.
The current deck uses a hands-on Precogly walkthrough after the tool introduction. The meme panels use credited web assets and fictional captions.