All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.fraunhofer.iem.spha.model.adapter.osv.OsvVulnerabilityDto.kt Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2024 Fraunhofer IEM. All rights reserved.
 *
 * Licensed under the MIT license. See LICENSE file in the project root for details.
 *
 * SPDX-License-Identifier: MIT
 * License-Filename: LICENSE
 */

package de.fraunhofer.iem.spha.model.adapter.osv

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class OsvVulnerabilityDto(
    @SerialName("affected") val affected: List,
    @SerialName("severity") val severity: Severity,
    @SerialName("details") val details: String,
    @SerialName("id") val id: String,
    @SerialName("modified") val modified: String,
    @SerialName("published") val published: String,
    @SerialName("references") val references: List,
    @SerialName("schema_version") val schemaVersion: String,
    @SerialName("summary") val summary: String,
)

@Serializable
data class Event(
    @SerialName("fixed") val fixed: String,
    @SerialName("introduced") val introduced: String,
)

@Serializable
data class Affected(
    @SerialName("package") val packageX: Package,
    @SerialName("ranges") val ranges: List,
)

@Serializable
data class Severity(
    //    Severity Type	Score Description
    //    CVSS_V2	A CVSS vector string representing the unique characteristics and severity of the
    // vulnerability using a version of the Common Vulnerability Scoring System notation that is ==
    // 2.0 (e.g."AV:L/AC:M/Au:N/C:N/I:P/A:C").
    //
    // CVSS_V3	A CVSS vector string representing the unique characteristics and severity of the
    // vulnerability using a version of the Common Vulnerability Scoring System notation that is >=
    // 3.0 and < 4.0 (e.g."CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N").
    //
    // CVSS_V4	A CVSS vector string representing the unique characterictics and severity of the
    // vulnerability using a version on the Common Vulnerability Scoring System notation that is >=
    // 4.0 and < 5.0 (e.g. "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N").
    @SerialName("type") val type: String,
    @SerialName("score") val score: String,
)

@Serializable
data class Package(
    @SerialName("ecosystem") val ecosystem: String,
    @SerialName("name") val name: String,
)

@Serializable
data class Range(
    @SerialName("events") val events: List,
    @SerialName("repo") val repo: String,
    @SerialName("type") val type: String,
)

@Serializable
data class Reference(@SerialName("type") val type: String, @SerialName("url") val url: String)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy