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

acs conversion #275

Merged
merged 17 commits into from
Oct 8, 2021
Merged

acs conversion #275

merged 17 commits into from
Oct 8, 2021

Conversation

rpiazza
Copy link
Contributor

@rpiazza rpiazza commented Sep 30, 2021

No description provided.

@rpiazza rpiazza self-assigned this Sep 30, 2021
@rpiazza rpiazza requested a review from emmanvg September 30, 2021 21:38
@rpiazza rpiazza assigned clenk and unassigned rpiazza Sep 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2021

Codecov Report

Merging #275 (08515f5) into master (85ed052) will decrease coverage by 0.22%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #275      +/-   ##
==========================================
- Coverage   68.22%   67.99%   -0.23%     
==========================================
  Files          19       20       +1     
  Lines        6564     6811     +247     
==========================================
+ Hits         4478     4631     +153     
- Misses       2086     2180      +94     
Impacted Files Coverage Δ
stix2elevator/__init__.py 84.09% <ø> (ø)
stix2elevator/cli.py 0.00% <0.00%> (ø)
stix2elevator/convert_pattern.py 74.15% <50.00%> (-0.42%) ⬇️
stix2elevator/convert_to_acs.py 56.81% <56.81%> (ø)
stix2elevator/options.py 77.22% <60.00%> (-0.50%) ⬇️
stix2elevator/convert_stix.py 81.69% <80.00%> (+0.20%) ⬆️
stix2elevator/utils.py 89.90% <83.33%> (-0.25%) ⬇️
stix2elevator/missing_policy.py 25.09% <100.00%> (ø)
stix2elevator/test/test_idioms.py 74.60% <100.00%> (+2.02%) ⬆️
stix2elevator/test/test_main.py 100.00% <100.00%> (ø)
... and 3 more

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 85ed052...08515f5. Read the comment docs.

Copy link
Contributor

@clenk clenk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ACS json schema says these are required properties: create_date_time, responsible_entity_custodian, policy_reference, control_set. If their STIX 1.x counterparts were required, should we give warnings about them being missing? If they weren't required in STIX 1.x are there default values we could use? In order to prevent outputting json that will fail to validate against the schema.

setup.py Outdated Show resolved Hide resolved
stix2elevator/convert_stix.py Outdated Show resolved Hide resolved
stix2elevator/convert_stix.py Outdated Show resolved Hide resolved
stix2elevator/convert_to_acs.py Show resolved Hide resolved
stix2elevator/convert_to_acs.py Show resolved Hide resolved
stix2elevator/convert_to_acs.py Outdated Show resolved Hide resolved
stix2elevator/convert_to_acs.py Outdated Show resolved Hide resolved
stix2elevator/convert_to_acs.py Outdated Show resolved Hide resolved
Copy link
Contributor

@clenk clenk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

if derivative_classification.classified_on:
cd["classified_on"] = convert_timestamp_to_string(derivative_classification.classified_on)
if derivative_classification.derived_from:
cd["dervived_from"] = str(derivative_classification.derived_from)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd["dervived_from"] = str(derivative_classification.derived_from)
cd["derived_from"] = str(derivative_classification.derived_from)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@rpiazza rpiazza merged commit 3bc461a into master Oct 8, 2021
@rpiazza rpiazza deleted the acs-conversion branch December 4, 2021 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants