Esempio n. 1
0
    class FeedMetadataV1Schema(Schema):
        name = fields.Str()
        created_at = RFC3339DateTime()
        updated_at = RFC3339DateTime()
        last_full_sync = RFC3339DateTime()
        enabled = fields.Boolean()
        groups = fields.List(fields.Nested(FeedGroupMetadata.FeedGroupMetadataV1Schema))

        @post_load
        def make(self, data, **kwargs):
            return FeedMetadata(**data)
Esempio n. 2
0
    class FeedGroupMetadataV1Schema(Schema):
        name = fields.Str()
        created_at = RFC3339DateTime()
        updated_at = RFC3339DateTime()
        last_sync = RFC3339DateTime()
        enabled = fields.Boolean()
        record_count = fields.Integer()

        @post_load
        def make(self, data, **kwargs):
            return FeedGroupMetadata(**data)
Esempio n. 3
0
    class ImageV1Schema(Schema):
        id = fields.Str()
        digest = fields.Str()
        user_id = fields.Str()
        state = fields.Str()
        distro_namespace = fields.Str()
        created_at = RFC3339DateTime()
        last_modified = RFC3339DateTime()
        tags = fields.List(fields.Str())

        @post_load
        def make(self, data, **kwargs):
            return Image(**data)
Esempio n. 4
0
    class VulnerabilitiesReportMetadataV1Schema(Schema):
        generated_at = RFC3339DateTime()
        uuid = fields.Str()
        generated_by = fields.Dict()

        @post_load
        def make(self, data, **kwargs):
            return VulnerabilitiesReportMetadata(**data)
Esempio n. 5
0
    class VulnerabilityV1Schema(Schema):
        vulnerability_id = fields.Str()
        description = fields.Str(allow_none=True, missing=None)
        severity = fields.Str()
        link = fields.Str()
        feed = fields.Str()
        feed_group = fields.Str()
        cvss_scores_nvd = fields.List(fields.Nested(CvssCombined.CvssCombinedV1Schema))
        cvss_scores_vendor = fields.List(
            fields.Nested(CvssCombined.CvssCombinedV1Schema)
        )
        created_at = RFC3339DateTime()
        last_modified = RFC3339DateTime()

        @post_load
        def make(self, data, **kwargs):
            return Vulnerability(**data)
Esempio n. 6
0
    class EventStatusV1Schema(Schema):
        event_id = fields.Str()
        event_timestamp = RFC3339DateTime()
        event_state = fields.Str()

        @post_load
        def make(self, data, **kwargs):
            return EventStatus(**data)
Esempio n. 7
0
    class FixedArtifactV1Schema(Schema):
        version = fields.Str()
        wont_fix = fields.Bool()
        observed_at = RFC3339DateTime()

        @post_load
        def make(self, data, **kwargs):
            return FixedArtifact(**data)
Esempio n. 8
0
    class DistroMappingV1Schema(Schema):
        from_distro = fields.Str()
        to_distro = fields.Str()
        flavor = fields.Str()
        created_at = RFC3339DateTime()

        @post_load
        def make(self, data, **kwargs):
            return DistroMapping(**data)
Esempio n. 9
0
    class MatchV1Schema(Schema):
        detected_at = RFC3339DateTime()

        @post_load
        def make(self, data, **kwargs):
            return Match(**data)
Esempio n. 10
0
 class VulnerabilitiesReportMetadataV1Schema(Schema):
     generated_at = RFC3339DateTime()
     uuid = fields.Str()
     generated_by = fields.Dict()