mitre-attack / mitre-attack/attack-website

Decouple the generation of settings.js from update-attack.py

Open
#402 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
588
Forks
174
Avg merge
13d 4h
Merged PRs (30d)
2

Description

The main Pelican build process generates a file called settings.js which includes three vars:

var base_url = “/“;
var build_uuid = “5144be18-993a-4aa4-bb2e-124dd2ce41b8”;
var tour_steps = {‘matrix’: ‘matrices/enterprise’, ‘technique’: ‘techniques/T1548’, ‘subtechnique’: ‘techniques/T1548/002’, ‘relationships’: {‘step3’: [‘T1003-004’, 5], ‘step2’: [‘T1555’, 3], ‘obj_id’: ‘software/S0349’}};

Two of these vars, base_url, and build_uuid are used by the search module.

The search module should be capable of generating or referencing these vars independently. We need to devise a solution that decouples these vars from the Pelican build process.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the Pelican build process and update-attack.py produce settings.js, then inspect how the search module reads base_url and build_uuid. Define an approach for generating or referencing those variables independently of the build process. Done means the search module no longer depends on settings.js being generated by the Pelican build.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
build-system, web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.