Releases: polyswarm/polyswarm-artifact
1.4.3 Release
1.4.0 Release
-
Feature reproduce earlier
jsonschema
annotations and integrity checks withpydantic
validations. These are synthesized from type annotations on the underlying object at runtime and provide type & value checks as well as in-depth information about the source and cause of the invalid data. -
Feature Convert all existing
jsonschema
annotations tomypy
-typed classes (theget_schema()
&schema
methods now return automatically synthesized JSON schemas for the corresponding class). This also introduces the following automatically-defined methods & attributes:dict()
returns a dictionary of the model's fields and valuesjson()
returns a JSON string representation dict()copy()
returns a deep copy of the modelparse_obj()
a utility for loading any object into a model with error handling if the object is not a dictionaryschema()
returns a dictionary representing the model as JSON Schemaschema_json()
returns a JSON string representation of schema()__fields_set__
Set of names of fields which were set when the model instance was initialised__fields__
a dictionary of the model's fields__config__
the configuration class for the model
-
Note Equality checks between descendants of
Schema
and dict-like objects now excludes all default field arguments to theSchema
object before comparison. -
Feature Add validations to all new class instances which supply initialization arguments (e.g
Verdict()
is still valid, howeverVerdict(ip_addresses=["blah"])
would raise aValueError
) -
Note All methods which set a property and return
self
are now defined with the@chainable
decorator -
Note Added
set_analysis_conclusion(self, heuristic: bool = None)
method toVerdict
, this method is intended to set "analysis conclusions" on the underlying object, e.g:
Verdict().set_malware_family("unknown").set_analysis_conclusion(heuristic=True)
- Note Allow
URLArtifact
to passuri
alone and have it'sprotocol
field automatically filled in. - Note Hash properties on
FileArtifact
(md5
,sha1
&sha256
) now validate both length and hex-only characters. - Note
FileArtifact
'ssize
attribute must be a positive integer - Note
Verdict
'sip_addresses
property must be a list of IPv4 or IPv6-like strings. - Note
Verdict
'sdomains
property now validates any hostname-like object with a TLD
1.3.3 Release
1.3.3 Release (2020-04-10)
- Fix - Pin
jsonschema
version to preventRefResolutionError
1.3.2 Release
1.3.2 Release (2020-01-07)
- Fix - Stop reading files when validating json
1.3.1 Release
1.3.1 Release (2019-09-12)
- Fix - Add error handling in
decode_content()
1.3.0 Release
1.3.0 Release (2019-09-9)
- Feature - Add
decode_content()
to decode bytes content based on ArtifactType
1.2.1 Release
1.2.1 Release (2019-07-9)
- Feature - Add Python 3.5.4 support
1.2.0 Release
1.2.0 Release (2019-07-3)
- Feature - Add Bounty
.json
file andSchema
implementations for easily building matching Bounty artifact metadata.
1.1.1 Release
1.1.1 Release (2019-06-07)
- Fix - Change
architecure
toarchitecture
1.1.0 Release
1.1.0 Release (2019-05-29)
- Feature - Add Schema
.json
files andSchema
implementations for easily building matching JSON strings