redcanaryco / vscode-attack

Visual Studio Code extension for MITRE ATT&CK
BSD 3-Clause "New" or "Revised" License
52 stars 12 forks source link

New command: insertLink #8

Closed rctgardner closed 3 years ago

rctgardner commented 3 years ago

Closes issue #2

This PR concerns two main changes:

  1. A new completion format - link - which will insert a raw link to the attack.mitre.org website when attempting to complete any ATT&CK object by ID or name
  2. A new command: vscode-attack.insertLink. This command allows users to convert preexisting ATT&CK object IDs and names into Markdown-formatted links either by placing a cursor in the text or highlighting one or multiple words to wrap the link around. At the moment, markdown files are the only ones supported, but more can be added easily in the future.
    • One important caveat of multi-word support is that it only exists when highlighting text. For example, attempting to link Defense Evasion to TA0005 requires the user to select + highlight both words completely, without extra space. Merely placing a cursor in either word or the space in between is not enough.
    • Another caveat is revoked techniques are not supported by the insertLink command at all