mitre-attack / mitre-attack/mitreattack-python

[Bug] Error while trying to serialize stix object

Open
#207 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
743
Forks
176
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

Printing stix data using normal print command, also tried with MitreAttackData.print_stix_object() function

Actual Behavior

I receive the following error: serialize() should be provided by the STIX2 base class.

Steps to Reproduce the Problem

  1. Get a stix object (in my case with mitre_attack_data=MitreAttackData("tmp/enterprise-attack/enterprise-attack.json") and then I tried to create a list all_data_components=MitreAttackData.get_datacomponents(mitre_attack_data)
  2. Try to print, serialize() or MitreAttackData.print_stix_object() a stix type object from the created list
  3. Error described above should occur

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the error with MitreAttackData("tmp/enterprise-attack/enterprise-attack.json"), get_datacomponents(), and a STIX object from the resulting list. Trace the serialization path used by print, serialize(), and MitreAttackData.print_stix_object(); done means these objects can be printed or serialized without the STIX2 base-class error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.