Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 'Pre' from get_stix_objects() function #49

Closed
Cyb3rWard0g opened this issue Jan 20, 2022 · 1 comment
Closed

Remove 'Pre' from get_stix_objects() function #49

Cyb3rWard0g opened this issue Jan 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Cyb3rWard0g
Copy link
Collaborator

'PRE' matrix is already deprecated.
Function get_stix_objects() runs get_pre() function. It needs to be removed.

@Cyb3rWard0g Cyb3rWard0g added the enhancement New feature or request label Jan 20, 2022
@Cyb3rWard0g
Copy link
Collaborator Author

I ended up keeping it simple with the following function:

def get_stix_objects(self, stix_format=True):
        attack_stix_objects = dict()
        attack_stix_objects['enterprise'] = self.get_enterprise()
        attack_stix_objects['mobile'] = self.get_mobile()
        attack_stix_objects['ics'] = self.get_ics()
        
        if not stix_format:
            for matrix in attack_stix_objects.keys():
                for resource_type in attack_stix_objects[matrix].keys():
                    attack_stix_objects[matrix][resource_type] = self.translate_stix_objects(attack_stix_objects[matrix][resource_type])
        return attack_stix_objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant