GithubHelp home page GithubHelp logo

jupyter-threat's Introduction

Jupyter Threat

Jupyter Threat is a threat modelling framework that is a hybrid of conventional threat modelling and threat modelling as code. It uses Jupyter notebooks to visualise and store the threat model. The threat model is formed of the theoretical part - in Markdown syntax and the diagram - with Wardley Maps to complement the output.

The Threat Modelling Process

  1. Trigger the threat modelling process within the design phase of the Software Development Lifecycle (SDLC)
  2. Clone this repo into a repo where the Threat Model will live. Other options are to have a threat modelling repo for all the threat models or to create a threat model folder in the source code repo.
  3. Communicate with developers / architects / product managers to work on the threat modelling questionnaire / template. The output should be in a report format, not Q&A. The output should be inserted in the Jupyter Notebook that will later be used during the threat modelling session.
  4. Review architectural diagrams and in collaboration with the engineering team create the data flow diagram as code
  5. Trigger a threat modelling session. On the threat modelling session:
    • confirm the flows
    • identify the threats
    • translate the threats into risks
    • identify the controls
    • create a Wardley Map to create a remediation strategy

How to Use

  1. Install Anaconda on your local environment from https://www.anaconda.com/products/individual

  2. Clone this repo to your local machine

  3. Create an Anaconda environment with the environment.yml file and activate it

  4. Run the Jupyter notebook from the folder where you cloned the repository

  5. Create a Develop branch on the repo and ask the developers to work on the Develop branch (see the section above). Use other branching strategies if the threat model is in the source code repo. An option is to create a threat-model branch then.

  6. Once the initial assessment is completed proceed to create a diagram as code using Diagrams https://diagrams.mingrammer.com/

  7. To create a Wardley map as code use https://github.com/anjackson/ipywardley

WARNING: Use only on your local machine

Getting involved

Please contribute by creating a PR. If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

More Threat Modelling as Code Frameworks:

Special Thank You

  • A special thank you to Dinis Cruz for being an everlasting source of ideas and inspiration, especially when it comes down to nifty techy cool solutions
  • Special thank you to Simon Wardley for his Wardley Maps and for supporting my Wardley Mapping Journey

To do:

  • Improve README
  • Review Dependencies
  • Optimise Code

jupyter-threat's People

Contributors

p3tra-wp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jupyter-threat's Issues

environment.yml and unresolved packages

When I try to build the environment with conda,

conda env create -f environment.yml

I get an error stating the following:

ResolvePackageNotFound:
  - markupsafe==2.0.1=py36h9ed2024_0
  - readline==8.1.2=hca72f7f_1
  - sip==4.19.8=py36h0a44026_0
  - gettext==0.21.0=h7535e17_0
  - pip==21.2.2=py36hecd8cb5_0
  - ca-certificates==2021.10.8=h033912b_0
  - pyrsistent==0.17.3=py36haf1e3a3_0
  - nodejs==12.4.0=h6de7cb9_0
  - tornado==6.1=py36h9ed2024_0
  - zlib==1.2.11=h4dc903c_4
  - certifi==2021.5.30=py36h79c6626_0
  - libpng==1.6.37=ha441bb4_0
  - libsodium==1.0.18=h1de35cc_0
  - pyqt==5.9.2=py36h655552a_2
  - xz==5.2.5=h1de35cc_0
  - zeromq==4.3.4=h23ab428_0
  - sqlite==3.37.0=h707629a_0
  - argon2-cffi==20.1.0=py36h9ed2024_1
  - traitlets==4.3.3=py36hecd8cb5_0
  - dbus==1.13.18=h18a8e69_0
  - ncurses==6.3=hca72f7f_2
  - llvm-openmp==12.0.0=h0dcd299_1
  - notebook==6.4.3=py36hecd8cb5_0
  - tk==8.6.11=h7bc2e8c_0
  - appnope==0.1.2=py36hecd8cb5_1001
  - expat==2.4.1=h23ab428_2
  - libcxx==12.0.0=h2f01273_0
  - glib==2.69.1=hdf23fa2_0
  - setuptools==58.0.4=py36hecd8cb5_0
  - icu==58.2=h0a44026_3
  - cffi==1.14.6=py36h2125817_0
  - pcre==8.45=h23ab428_0
  - pyzmq==22.2.1=py36h23ab428_1
  - libffi==3.3=hb1e8313_2
  - pandocfilters==1.4.3=py36hecd8cb5_1
  - jpeg==9d=h9ed2024_0
  - terminado==0.9.4=py36hecd8cb5_0
  - openssl==1.1.1l=h0d85af4_0
  - libxml2==2.9.12=hcdb78fc_0
  - jupyter_core==4.8.1=py36hecd8cb5_0
  - mistune==0.8.4=py36h1de35cc_0
  - qt==5.9.7=h468cd18_1
  - pandoc==2.12=hecd8cb5_0
  - libiconv==1.16=h1de35cc_0

Not sure if I am doing something wrong or if the packages are no longer resolvable.

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.