mitre-attack / mitre-attack/mitreattack-python
[Bug] TAXII 2.0 Server Has Been Retired
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 743
- Forks
- 176
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
Using the exporters such as Excel or SVG using the default taxii source should retrieve the proper data and produce the expected exported output.
Actual Behavior
navlayers.ToExcel() hangs because the server "https://cti-taxii.mitre.org/taxii" has been retired as of December 18th blog link
Steps to Reproduce the Problem
For example: calling the following function navlayers.ToExcel(domain="enterprise", source="taxii") just hangs
Possible Solution
Migrating to the TAXII 2.1 server. The problem exists in navlayers/exporters/matrix_gen.py in the __init__ method of the MatrixGen class.
class MatrixGen:
"""A MatrixGen object."""
def __init__(self, source="taxii", resource=None, domain="enterprise"):
"""Initialize - Creates a matrix generator object.
:param source: Source to utilize (taxii, remote, or local)
:param resource: string path to local cache of stix data (local) or url of an ATT&CK Workbench (remote)
"""
self.convert_data = {}
self.collections = dict()
if source.lower() not in ["taxii", "local", "remote", "memorystore"]:
logger.error(
f"Unable to generate matrix, source {source} is not one of [taxii | remote | local | memorystore]"
)
raise ValueError
if source.lower() == "taxii":
self.server = Server("https://cti-taxii.mitre.org/taxii")
self.api_root = self.server.api_roots[0]
for collection in self.api_root.collections:
if collection.title != "PRE-ATT&CK":
tc = Collection("https://cti-taxii.mitre.org/stix/collections/" + collection.id)
self.collections[collection.title.split(" ")[0].lower()] = TAXIICollectionSource(tc)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in navlayers/exporters/matrix_gen.py, specifically the MatrixGen.init method and its TAXII source setup. Reproduce the hang with navlayers.ToExcel(domain="enterprise", source="taxii") and verify that the Excel and SVG exporters retrieve data and produce their expected output without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100