Polyswarm-artifact

Latest version: v2.0.0

Safety actively analyzes 702106 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.4.3

* **Fix** - Add `ScanMedata` as an identical alternative to `Verdict`

1.4.0

- **Feature** reproduce earlier [`jsonschema`](https://pypi.org/project/jsonschema/) annotations and integrity checks with [`pydantic`](https://pydantic-docs.helpmanual.io/) 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`](https://pypi.org/project/jsonschema/) annotations to `mypy`-typed classes (the `get_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 values
- ``json()``
returns a JSON string representation dict()
- ``copy()``
returns a deep copy of the model
- ``parse_obj()``
a utility for loading any object into a model with error handling if the object is not a dictionary
- ``schema()``
returns a dictionary representing the model as JSON Schema
- ``schema_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 the `Schema` object before comparison.
- **Feature** Add validations to all new class instances which supply initialization arguments (e.g `Verdict()` is still valid, however `Verdict(ip_addresses=["blah"])` would raise a `ValueError`)
- **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 to `Verdict`, 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 pass `uri` alone and have it's `protocol` field automatically filled in.
- **Note** Hash properties on `FileArtifact` (`md5`, `sha1` & `sha256`) now validate both length and hex-only characters.
- **Note** `FileArtifact`'s `size` attribute must be a positive integer
- **Note** `Verdict`'s `ip_addresses` property must be a list of IPv4 or IPv6-like strings.
- **Note** `Verdict`'s `domains` property now validates any hostname-like object with a TLD

1.3.3

* **Fix** - Pin `jsonschema` version to prevent `RefResolutionError`

1.3.2

* **Fix** - Stop reading files when validating json

1.3.1

* **Fix** - Add error handling in `decode_content()`

1.3.0

* **Feature** - Add `decode_content()` to decode bytes content based on ArtifactType

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.