Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 3.01 KB

File metadata and controls

60 lines (38 loc) · 3.01 KB

Threat Composer Browser Extension

Introduction

This extension/add-on allows you to view web accessible Threat Composer exports (.tc.json) with one click directly in your browser. The Threat Composer web-app is baked into the extension itself.

The extension supports the following integrations where a ‘View in Threat Composer’ button is added to the page:

  • GitHub Code Browser
  • Amazon Code Catalyst
  • ‘View Raw’ anywhere online so long as the URL includes reference to .tc.json (Note: on Firefox it does not work on githubusercontent.com due to the sandbox CSP directive)

Build

  1. Clone this repo
  2. Run the main build script (./scripts/build.sh) to build everything (including the browser extension)

For any other guidance see the Development section of the main README

Load locally

Google Chrome

  1. Open Chrome, then goto chrome://extensions
  2. Enable 'Developer mode'
  3. Click on 'Load unpacked'
  4. Point it at the ./.output/chrome-mv3 directory and click Open

Mozilla Firefox

  1. Open Firefox, then goto about:debugging
  2. Click on 'This Firefox' then 'Load Temporary Add-on...'
  3. Point it at any file with the ./.output/firefox-mv2 and click Open

Create ZIP file

Google Chrome

  1. Go to the root of the extension package - cd ./packages/threat-composer-app-browser-extension
  2. Run yarn run zip - look in ./.output/ for ZIP file
  3. To load locally open Chrome, then goto chrome://extensions, enable developer mode, then drag-and-drop the ZIP file onto the page to load.

Mozilla Firefox

  1. Go to the root of the extension package - cd ./packages/threat-composer-app-browser-extension
  2. Run yarn run zip:firefox - look in ./.output/ for ZIP file

Development

Google Chrome

  1. Go to the root of the extension package - cd ./packages/threat-composer-app-browser-extension
  2. Run yarn run dev
  3. In your browser navigate to a hosted Threat Composer file on a supported integration - example1, example2 and example3

Mozilla Firefox

  1. Go to the root of the extension package - cd ./packages/threat-composer-app-browser-extension
  2. Run yarn run dev:firefox
  3. In your browser navigate to a hosted Threat Composer file on a supported integration - example1 and example2. Note: on Firefox it does not work on githubusercontent.com due to the sandbox CSP directive.