redcanaryco / vscode-attack

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

ATT&CK version comparison is incorrect #23

Open rctgardner opened 2 years ago

rctgardner commented 2 years ago

ATT&CK v11 just came out: https://github.com/mitre/cti/releases/tag/ATT%26CK-v11.0

but the extension doesn't recognize the new version

...
[2022-04-25T21:37:51.137Z] Checking extension cache for MITRE ATT&CK mapping.
[2022-04-25T21:37:51.530Z] Nothing to do. Cached version is on latest ATT&CK version 9.0
...
ForensicITGuy commented 2 years ago

Did some troubleshooting on this @rctgardner , looks like the enterprise-attack.9.0.json gets downloaded even when you clear the cache.

rctgardner commented 2 years ago

Thanks for adding that @ForensicITGuy ! I bet this is a string sorting vs number sorting problem, and '9' is getting sorted ahead of '10'. I'll try to address this soon

slw07g commented 1 year ago

Maybe using the compare-versions package be a quick way to patch this.

And maybe a long-term it might be worth having a setting available for users to specify which ATT&CK version they want to use.