oasis-open / cti-pattern-validator

OASIS TC Open Repository: Validate patterns used to express cyber observable content in STIX Indicators
https://stix2-patterns.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
26 stars 23 forks source link

Fix hash validation code to work with '*' selector #79

Closed chisholm closed 4 years ago

chisholm commented 4 years ago

Fixes #77

The hash type can't be determined if '*' is used, so hash validation is skipped in that case.

codecov-commenter commented 4 years ago

Codecov Report

Merging #79 into master will decrease coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
- Coverage   82.11%   82.07%   -0.05%     
==========================================
  Files          31       31              
  Lines        4871     4865       -6     
==========================================
- Hits         4000     3993       -7     
- Misses        871      872       +1     
Impacted Files Coverage Δ
stix2patterns/test/v20/test_validator.py 100.00% <ø> (ø)
stix2patterns/test/v21/test_validator.py 100.00% <ø> (ø)
stix2patterns/v20/object_validator.py 100.00% <100.00%> (ø)
stix2patterns/v21/object_validator.py 100.00% <100.00%> (ø)
stix2patterns/v21/grammars/STIXPatternParser.py 79.41% <0.00%> (-0.06%) :arrow_down:
stix2patterns/test/v20/test_inspector.py 100.00% <0.00%> (ø)
stix2patterns/test/v21/test_inspector.py 100.00% <0.00%> (ø)

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 f819fc5...40bd8ed. Read the comment docs.