center-for-threat-informed-defense / attack-flow

Attack Flow helps executives, SOC managers, and defenders easily understand how attackers compose ATT&CK techniques into attacks by developing a representation of attack flows, modeling attack flows for a small corpus of incidents, and creating visualization tools to display attack flows.
https://ctid.io/attack-flow
Apache License 2.0
522 stars 83 forks source link

AF-156 Hide Tactic+Technique References from Flow #80

Closed nikorev closed 11 months ago

nikorev commented 12 months ago

Currently works, but before merging I want to review the interaction of the diagram model typescript files and the vue components to ensure everything is being verified correctly. _isvisible has been split to _is_visiblechart and _is_visiblesidebar to denote whether a property should be visible on the chart's node and/or property-editor sidebar.

Property declarations were updated in builder.config.ts to setup the schema, blocking the tactic+technique references from rendering on the chart while still being viewable/editable in the sidebar.

A couple discussion points I'd like to chat about pre-merge:

  1. BranchBlockModel.ts and DictionaryBlockModel.ts were both updated. For checking the visibility of these fields, I used _is_visiblechart since this seemed to lay out the boilerplate which the vue-component would later use to populate the chart's/diagram's UI node with properties. Is this the right thinking?
  2. DictionaryField.vue vs DictionaryFieldContents.vue. How do each of these handle the rendering individual nodes to the screen? I was surprised to find success when verifying visibility with _is_visiblechart with DictionaryField.vue, but _is_visiblesidebar with DictionaryFieldContents.vue. I would think both of these would want to use _is_visiblechart, but that wasn't the case.
  3. Property editor component (PropertyEditor.vue) verifies visibility using _is_visiblesidebar, but the behavior didn't change when verifying with _is_visiblechart. This should've technically made the _techniqueref and _tacticref disappear from the property editor sidebar, unless this is a change that needs to be made in EditorSidebar.vue. I swayed away from modifying EditorSidebar.vue for now since this didn't do any visibility checking previously; my "first pass" at this ticket was to transition existing _isvisible calls to the new sidebar+chart solution. In summary, what is the relationship of PropertyEditor.vue vs EditorSidebar.vue?
sonarcloud[bot] commented 11 months ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
7.7% 7.7% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint