oasis-open / cti-stix-elevator

OASIS Cyber Threat Intelligence (CTI) TC Open Repository: Convert STIX 1.2 XML to STIX 2.x JSON
https://stix2-elevator.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
49 stars 23 forks source link

Hostname bug #281

Closed rpiazza closed 2 years ago

rpiazza commented 2 years ago

do this last

rpiazza commented 2 years ago

Look in convert_pattern.py for the change to the code.

The example observable-with-networkconnection-pattern.json tests hostname for src, and ip_address for dst

I tested it with both, and the warning message was printed. However, since we don't check the warning messages when testing, I'm not sure adding it to the idioms would be useful. What do you think?

clenk commented 2 years ago

It's okay without, but adding it to the idioms would at least exercise each code branch and ensure they don't raise any errors.

codecov-commenter commented 2 years ago

Codecov Report

Merging #281 (5621ced) into master (9bba779) will increase coverage by 0.03%. The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #281      +/-   ##
==========================================
+ Coverage   68.22%   68.26%   +0.03%     
==========================================
  Files          20       20              
  Lines        6984     6986       +2     
==========================================
+ Hits         4765     4769       +4     
+ Misses       2219     2217       -2     
Impacted Files Coverage Δ
stix2elevator/options.py 77.47% <ø> (ø)
stix2elevator/convert_pattern.py 73.95% <75.00%> (+0.14%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9bba779...5621ced. Read the comment docs.