swimlane / pyattck

A Python package to interact with the Mitre ATT&CK Framework
MIT License
467 stars 87 forks source link

TypeError: __init__() missing 2 required positional arguments: 'id' and 'type' #138

Closed cr-MeroujanAntonyan closed 1 year ago

cr-MeroujanAntonyan commented 1 year ago

Describe the bug Latest version installed, example snipped is throwing an exception

Code Steps to reproduce the behavior:

from pyattck import Attck

attack = Attck()

for technique in attack.enterprise.techniques:
    print(technique.id)
    print(technique.name)
    for subtechnique in technique.techniques:
        print(subtechnique.id)
        print(subtechnique.name)

Exception

Traceback (most recent call last):
  File "/Users/.../PycharmProjects/scripting/test.py", line 5, in <module>
    for technique in attack.enterprise.techniques:
  File "/Users/.../PycharmProjects/scripting/venv/lib/python3.9/site-packages/pyattck/attck.py", line 255, in enterprise
    from .enterprise import EnterpriseAttck
  File "/Users/.../PycharmProjects/scripting/venv/lib/python3.9/site-packages/pyattck/enterprise.py", line 7, in <module>
    class EnterpriseAttck(Base):
  File "/Users/.../PycharmProjects/scripting/venv/lib/python3.9/site-packages/pyattck/enterprise.py", line 44, in EnterpriseAttck
    __nist_controls_json = NistControls(**Base.config.get_data("nist_controls_json"))
TypeError: __init__() missing 2 required positional arguments: 'id' and 'type'

Desktop (please complete the following information):

Context Downgrading did not help

cr-MeroujanAntonyan commented 1 year ago

The data URLs are returning 403:

image

This must be the issue. RIP automated runs for last night x)

nbyt3 commented 1 year ago

Also seeing this same issue

MSAdministrator commented 1 year ago

Yeah sorry all - I am no longer with Swimlane and don't have access to the data. Some changes they made broke these links.

MSAdministrator commented 1 year ago

This should be resolved now. Please reopen if not.