diff --git a/hooks/persistence-defectdojo/README.md b/hooks/persistence-defectdojo/README.md index 00cffd91f2..a93dfce3d8 100644 --- a/hooks/persistence-defectdojo/README.md +++ b/hooks/persistence-defectdojo/README.md @@ -26,6 +26,20 @@ uses the Nikto JSON format while DefectDojo uses the XML format. ::: +After uploading the results to DefectDojo it will use the findings parsed by DefectDojo to overwrite the +original secureCodeBox findings identified by the parser. This lets you access the finding metadata like the false +positive and duplicate status from DefectDojo in further ReadOnly hooks, e.g. send out slack notification +for non-duplicate & non-false positive findings only. + +:::caution + +Be careful when using the DefectDojo Hook in combination with other ReadAndWrite hooks. The secureCodeBox currently has +no way to guarantee that one ReadAndWrite hook gets executed before another ReadAndWrite hook. This can lead to +"lost update" problems as the DefectDojo hook will overwrite all findings, which disregards the results of previously +run ReadAndWrite hooks. +ReadOnly hooks work fine with the DefectDojo hook as they are always executed after ReadAndWrite Hooks. +::: + ## Runtime Configuration The hook will automatically import the scan results into an engagement in DefectDojo. @@ -112,6 +126,7 @@ helm upgrade --install dd secureCodeBox/persistence-defectdojo \ | defectdojo.authentication.apiKeyKey | string | `"apikey"` | Name of the apikey key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs | | defectdojo.authentication.userSecret | string | `"defectdojo-credentials"` | Link a pre-existing generic secret with `username` and `apikey` key / value pairs | | defectdojo.authentication.usernameKey | string | `"username"` | Name of the username key in the `userSecret` secret. Use this if you already have a secret with different key / value pairs | +| defectdojo.syncFindingsBack | bool | `true` | Syncs back (two way sync) all imported findings from DefectDojo to SCB Findings Store, set to false to only import the findings to DefectDojo (one way sync). | | defectdojo.url | string | `"http://defectdojo-django.default.svc"` | Url to the DefectDojo Instance | | image.repository | string | `"docker.io/securecodebox/persistence-defectdojo"` | Hook image repository | | image.tag | string | `nil` | Container image tag | diff --git a/hooks/persistence-defectdojo/README.md.gotmpl b/hooks/persistence-defectdojo/README.md.gotmpl index c22dc19345..5c04a373cd 100644 --- a/hooks/persistence-defectdojo/README.md.gotmpl +++ b/hooks/persistence-defectdojo/README.md.gotmpl @@ -26,6 +26,20 @@ uses the Nikto JSON format while DefectDojo uses the XML format. ::: +After uploading the results to DefectDojo it will use the findings parsed by DefectDojo to overwrite the +original secureCodeBox findings identified by the parser. This lets you access the finding metadata like the false +positive and duplicate status from DefectDojo in further ReadOnly hooks, e.g. send out slack notification +for non-duplicate & non-false positive findings only. + +:::caution + +Be careful when using the DefectDojo Hook in combination with other ReadAndWrite hooks. The secureCodeBox currently has +no way to guarantee that one ReadAndWrite hook gets executed before another ReadAndWrite hook. This can lead to +"lost update" problems as the DefectDojo hook will overwrite all findings, which disregards the results of previously +run ReadAndWrite hooks. +ReadOnly hooks work fine with the DefectDojo hook as they are always executed after ReadAndWrite Hooks. +::: + ## Runtime Configuration The hook will automatically import the scan results into an engagement in DefectDojo. diff --git a/hooks/persistence-defectdojo/build.gradle b/hooks/persistence-defectdojo/build.gradle index 34b538277b..a0e40b3757 100644 --- a/hooks/persistence-defectdojo/build.gradle +++ b/hooks/persistence-defectdojo/build.gradle @@ -16,7 +16,7 @@ repositories { } dependencies { - implementation 'io.kubernetes:client-java:10.0.0' + implementation 'io.kubernetes:client-java:12.0.0' implementation 'io.securecodebox:defectdojo-client:0.0.12-SNAPSHOT' diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1Scan.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1Scan.java index dd27c42a06..19f2c0785d 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1Scan.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1Scan.java @@ -31,7 +31,7 @@ * Scan is the Schema for the scans API */ @ApiModel(description = "Scan is the Schema for the scans API") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1Scan implements io.kubernetes.client.common.KubernetesObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanList.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanList.java index 82fd3d19d9..93807a3b91 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanList.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanList.java @@ -32,7 +32,7 @@ * ScanList is a list of Scan */ @ApiModel(description = "ScanList is a list of Scan") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanList implements io.kubernetes.client.common.KubernetesListObject { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpec.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpec.java index d8626321d5..d9c093e927 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpec.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpec.java @@ -22,6 +22,8 @@ import com.google.gson.stream.JsonWriter; import io.securecodebox.models.V1ScanSpecCascades; import io.securecodebox.models.V1ScanSpecEnv; +import io.securecodebox.models.V1ScanSpecVolumeMounts; +import io.securecodebox.models.V1ScanSpecVolumes; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; @@ -32,7 +34,7 @@ * ScanSpec defines the desired state of Scan */ @ApiModel(description = "ScanSpec defines the desired state of Scan") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpec { public static final String SERIALIZED_NAME_CASCADES = "cascades"; @SerializedName(SERIALIZED_NAME_CASCADES) @@ -50,6 +52,14 @@ public class V1ScanSpec { @SerializedName(SERIALIZED_NAME_SCAN_TYPE) private String scanType; + public static final String SERIALIZED_NAME_VOLUME_MOUNTS = "volumeMounts"; + @SerializedName(SERIALIZED_NAME_VOLUME_MOUNTS) + private List volumeMounts = null; + + public static final String SERIALIZED_NAME_VOLUMES = "volumes"; + @SerializedName(SERIALIZED_NAME_VOLUMES) + private List volumes = null; + public V1ScanSpec cascades(V1ScanSpecCascades cascades) { @@ -120,11 +130,11 @@ public V1ScanSpec addParametersItem(String parametersItem) { } /** - * Get parameters + * All CLI parameters to configure the scan container. * @return parameters **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(value = "All CLI parameters to configure the scan container.") public List getParameters() { return parameters; @@ -143,11 +153,11 @@ public V1ScanSpec scanType(String scanType) { } /** - * Get scanType + * The name of the scanType which should be started. * @return scanType **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The name of the scanType which should be started.") public String getScanType() { return scanType; @@ -159,6 +169,68 @@ public void setScanType(String scanType) { } + public V1ScanSpec volumeMounts(List volumeMounts) { + + this.volumeMounts = volumeMounts; + return this; + } + + public V1ScanSpec addVolumeMountsItem(V1ScanSpecVolumeMounts volumeMountsItem) { + if (this.volumeMounts == null) { + this.volumeMounts = new ArrayList(); + } + this.volumeMounts.add(volumeMountsItem); + return this; + } + + /** + * VolumeMounts allows to specify volume mounts for the scan container. + * @return volumeMounts + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "VolumeMounts allows to specify volume mounts for the scan container.") + + public List getVolumeMounts() { + return volumeMounts; + } + + + public void setVolumeMounts(List volumeMounts) { + this.volumeMounts = volumeMounts; + } + + + public V1ScanSpec volumes(List volumes) { + + this.volumes = volumes; + return this; + } + + public V1ScanSpec addVolumesItem(V1ScanSpecVolumes volumesItem) { + if (this.volumes == null) { + this.volumes = new ArrayList(); + } + this.volumes.add(volumesItem); + return this; + } + + /** + * Volumes allows to specify volumes for the scan container. + * @return volumes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Volumes allows to specify volumes for the scan container.") + + public List getVolumes() { + return volumes; + } + + + public void setVolumes(List volumes) { + this.volumes = volumes; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -171,12 +243,14 @@ public boolean equals(Object o) { return Objects.equals(this.cascades, v1ScanSpec.cascades) && Objects.equals(this.env, v1ScanSpec.env) && Objects.equals(this.parameters, v1ScanSpec.parameters) && - Objects.equals(this.scanType, v1ScanSpec.scanType); + Objects.equals(this.scanType, v1ScanSpec.scanType) && + Objects.equals(this.volumeMounts, v1ScanSpec.volumeMounts) && + Objects.equals(this.volumes, v1ScanSpec.volumes); } @Override public int hashCode() { - return Objects.hash(cascades, env, parameters, scanType); + return Objects.hash(cascades, env, parameters, scanType, volumeMounts, volumes); } @@ -188,6 +262,8 @@ public String toString() { sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n"); sb.append(" scanType: ").append(toIndentedString(scanType)).append("\n"); + sb.append(" volumeMounts: ").append(toIndentedString(volumeMounts)).append("\n"); + sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAwsElasticBlockStore.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAwsElasticBlockStore.java new file mode 100644 index 0000000000..6d9f10f197 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAwsElasticBlockStore.java @@ -0,0 +1,186 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ +@ApiModel(description = "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecAwsElasticBlockStore { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_PARTITION = "partition"; + @SerializedName(SERIALIZED_NAME_PARTITION) + private Integer partition; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_VOLUME_I_D = "volumeID"; + @SerializedName(SERIALIZED_NAME_VOLUME_I_D) + private String volumeID; + + + public V1ScanSpecAwsElasticBlockStore fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecAwsElasticBlockStore partition(Integer partition) { + + this.partition = partition; + return this; + } + + /** + * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). + * @return partition + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).") + + public Integer getPartition() { + return partition; + } + + + public void setPartition(Integer partition) { + this.partition = partition; + } + + + public V1ScanSpecAwsElasticBlockStore readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecAwsElasticBlockStore volumeID(String volumeID) { + + this.volumeID = volumeID; + return this; + } + + /** + * Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + * @return volumeID + **/ + @ApiModelProperty(required = true, value = "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore") + + public String getVolumeID() { + return volumeID; + } + + + public void setVolumeID(String volumeID) { + this.volumeID = volumeID; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecAwsElasticBlockStore v1ScanSpecAwsElasticBlockStore = (V1ScanSpecAwsElasticBlockStore) o; + return Objects.equals(this.fsType, v1ScanSpecAwsElasticBlockStore.fsType) && + Objects.equals(this.partition, v1ScanSpecAwsElasticBlockStore.partition) && + Objects.equals(this.readOnly, v1ScanSpecAwsElasticBlockStore.readOnly) && + Objects.equals(this.volumeID, v1ScanSpecAwsElasticBlockStore.volumeID); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, partition, readOnly, volumeID); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecAwsElasticBlockStore {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" partition: ").append(toIndentedString(partition)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" volumeID: ").append(toIndentedString(volumeID)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAzureDisk.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAzureDisk.java new file mode 100644 index 0000000000..8ccf45f013 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAzureDisk.java @@ -0,0 +1,243 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + */ +@ApiModel(description = "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecAzureDisk { + public static final String SERIALIZED_NAME_CACHING_MODE = "cachingMode"; + @SerializedName(SERIALIZED_NAME_CACHING_MODE) + private String cachingMode; + + public static final String SERIALIZED_NAME_DISK_NAME = "diskName"; + @SerializedName(SERIALIZED_NAME_DISK_NAME) + private String diskName; + + public static final String SERIALIZED_NAME_DISK_U_R_I = "diskURI"; + @SerializedName(SERIALIZED_NAME_DISK_U_R_I) + private String diskURI; + + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_KIND = "kind"; + @SerializedName(SERIALIZED_NAME_KIND) + private String kind; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + + public V1ScanSpecAzureDisk cachingMode(String cachingMode) { + + this.cachingMode = cachingMode; + return this; + } + + /** + * Host Caching mode: None, Read Only, Read Write. + * @return cachingMode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Host Caching mode: None, Read Only, Read Write.") + + public String getCachingMode() { + return cachingMode; + } + + + public void setCachingMode(String cachingMode) { + this.cachingMode = cachingMode; + } + + + public V1ScanSpecAzureDisk diskName(String diskName) { + + this.diskName = diskName; + return this; + } + + /** + * The Name of the data disk in the blob storage + * @return diskName + **/ + @ApiModelProperty(required = true, value = "The Name of the data disk in the blob storage") + + public String getDiskName() { + return diskName; + } + + + public void setDiskName(String diskName) { + this.diskName = diskName; + } + + + public V1ScanSpecAzureDisk diskURI(String diskURI) { + + this.diskURI = diskURI; + return this; + } + + /** + * The URI the data disk in the blob storage + * @return diskURI + **/ + @ApiModelProperty(required = true, value = "The URI the data disk in the blob storage") + + public String getDiskURI() { + return diskURI; + } + + + public void setDiskURI(String diskURI) { + this.diskURI = diskURI; + } + + + public V1ScanSpecAzureDisk fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecAzureDisk kind(String kind) { + + this.kind = kind; + return this; + } + + /** + * Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared + * @return kind + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared") + + public String getKind() { + return kind; + } + + + public void setKind(String kind) { + this.kind = kind; + } + + + public V1ScanSpecAzureDisk readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecAzureDisk v1ScanSpecAzureDisk = (V1ScanSpecAzureDisk) o; + return Objects.equals(this.cachingMode, v1ScanSpecAzureDisk.cachingMode) && + Objects.equals(this.diskName, v1ScanSpecAzureDisk.diskName) && + Objects.equals(this.diskURI, v1ScanSpecAzureDisk.diskURI) && + Objects.equals(this.fsType, v1ScanSpecAzureDisk.fsType) && + Objects.equals(this.kind, v1ScanSpecAzureDisk.kind) && + Objects.equals(this.readOnly, v1ScanSpecAzureDisk.readOnly); + } + + @Override + public int hashCode() { + return Objects.hash(cachingMode, diskName, diskURI, fsType, kind, readOnly); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecAzureDisk {\n"); + sb.append(" cachingMode: ").append(toIndentedString(cachingMode)).append("\n"); + sb.append(" diskName: ").append(toIndentedString(diskName)).append("\n"); + sb.append(" diskURI: ").append(toIndentedString(diskURI)).append("\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAzureFile.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAzureFile.java new file mode 100644 index 0000000000..1a1ce8c73c --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecAzureFile.java @@ -0,0 +1,156 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + */ +@ApiModel(description = "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecAzureFile { + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_NAME = "secretName"; + @SerializedName(SERIALIZED_NAME_SECRET_NAME) + private String secretName; + + public static final String SERIALIZED_NAME_SHARE_NAME = "shareName"; + @SerializedName(SERIALIZED_NAME_SHARE_NAME) + private String shareName; + + + public V1ScanSpecAzureFile readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecAzureFile secretName(String secretName) { + + this.secretName = secretName; + return this; + } + + /** + * the name of secret that contains Azure Storage Account Name and Key + * @return secretName + **/ + @ApiModelProperty(required = true, value = "the name of secret that contains Azure Storage Account Name and Key") + + public String getSecretName() { + return secretName; + } + + + public void setSecretName(String secretName) { + this.secretName = secretName; + } + + + public V1ScanSpecAzureFile shareName(String shareName) { + + this.shareName = shareName; + return this; + } + + /** + * Share Name + * @return shareName + **/ + @ApiModelProperty(required = true, value = "Share Name") + + public String getShareName() { + return shareName; + } + + + public void setShareName(String shareName) { + this.shareName = shareName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecAzureFile v1ScanSpecAzureFile = (V1ScanSpecAzureFile) o; + return Objects.equals(this.readOnly, v1ScanSpecAzureFile.readOnly) && + Objects.equals(this.secretName, v1ScanSpecAzureFile.secretName) && + Objects.equals(this.shareName, v1ScanSpecAzureFile.shareName); + } + + @Override + public int hashCode() { + return Objects.hash(readOnly, secretName, shareName); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecAzureFile {\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretName: ").append(toIndentedString(secretName)).append("\n"); + sb.append(" shareName: ").append(toIndentedString(shareName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascades.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascades.java index a9c412a2dc..0aec2e38d4 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascades.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascades.java @@ -33,7 +33,7 @@ * A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. */ @ApiModel(description = "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecCascades { public static final String SERIALIZED_NAME_MATCH_EXPRESSIONS = "matchExpressions"; @SerializedName(SERIALIZED_NAME_MATCH_EXPRESSIONS) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascadesMatchExpressions.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascadesMatchExpressions.java index a474d90acf..8be46dc420 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascadesMatchExpressions.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCascadesMatchExpressions.java @@ -30,7 +30,7 @@ * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. */ @ApiModel(description = "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecCascadesMatchExpressions { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCephfs.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCephfs.java new file mode 100644 index 0000000000..3d3e3a722b --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCephfs.java @@ -0,0 +1,252 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecCephfsSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + */ +@ApiModel(description = "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecCephfs { + public static final String SERIALIZED_NAME_MONITORS = "monitors"; + @SerializedName(SERIALIZED_NAME_MONITORS) + private List monitors = new ArrayList(); + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_FILE = "secretFile"; + @SerializedName(SERIALIZED_NAME_SECRET_FILE) + private String secretFile; + + public static final String SERIALIZED_NAME_SECRET_REF = "secretRef"; + @SerializedName(SERIALIZED_NAME_SECRET_REF) + private V1ScanSpecCephfsSecretRef secretRef; + + public static final String SERIALIZED_NAME_USER = "user"; + @SerializedName(SERIALIZED_NAME_USER) + private String user; + + + public V1ScanSpecCephfs monitors(List monitors) { + + this.monitors = monitors; + return this; + } + + public V1ScanSpecCephfs addMonitorsItem(String monitorsItem) { + this.monitors.add(monitorsItem); + return this; + } + + /** + * Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * @return monitors + **/ + @ApiModelProperty(required = true, value = "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it") + + public List getMonitors() { + return monitors; + } + + + public void setMonitors(List monitors) { + this.monitors = monitors; + } + + + public V1ScanSpecCephfs path(String path) { + + this.path = path; + return this; + } + + /** + * Optional: Used as the mounted root, rather than the full Ceph tree, default is / + * @return path + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: Used as the mounted root, rather than the full Ceph tree, default is /") + + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + + public V1ScanSpecCephfs readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecCephfs secretFile(String secretFile) { + + this.secretFile = secretFile; + return this; + } + + /** + * Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * @return secretFile + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it") + + public String getSecretFile() { + return secretFile; + } + + + public void setSecretFile(String secretFile) { + this.secretFile = secretFile; + } + + + public V1ScanSpecCephfs secretRef(V1ScanSpecCephfsSecretRef secretRef) { + + this.secretRef = secretRef; + return this; + } + + /** + * Get secretRef + * @return secretRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecCephfsSecretRef getSecretRef() { + return secretRef; + } + + + public void setSecretRef(V1ScanSpecCephfsSecretRef secretRef) { + this.secretRef = secretRef; + } + + + public V1ScanSpecCephfs user(String user) { + + this.user = user; + return this; + } + + /** + * Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * @return user + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it") + + public String getUser() { + return user; + } + + + public void setUser(String user) { + this.user = user; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecCephfs v1ScanSpecCephfs = (V1ScanSpecCephfs) o; + return Objects.equals(this.monitors, v1ScanSpecCephfs.monitors) && + Objects.equals(this.path, v1ScanSpecCephfs.path) && + Objects.equals(this.readOnly, v1ScanSpecCephfs.readOnly) && + Objects.equals(this.secretFile, v1ScanSpecCephfs.secretFile) && + Objects.equals(this.secretRef, v1ScanSpecCephfs.secretRef) && + Objects.equals(this.user, v1ScanSpecCephfs.user); + } + + @Override + public int hashCode() { + return Objects.hash(monitors, path, readOnly, secretFile, secretRef, user); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecCephfs {\n"); + sb.append(" monitors: ").append(toIndentedString(monitors)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretFile: ").append(toIndentedString(secretFile)).append("\n"); + sb.append(" secretRef: ").append(toIndentedString(secretRef)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCephfsSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCephfsSecretRef.java new file mode 100644 index 0000000000..fc864ac4ab --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCephfsSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + */ +@ApiModel(description = "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecCephfsSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecCephfsSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecCephfsSecretRef v1ScanSpecCephfsSecretRef = (V1ScanSpecCephfsSecretRef) o; + return Objects.equals(this.name, v1ScanSpecCephfsSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecCephfsSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCinder.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCinder.java new file mode 100644 index 0000000000..7214b432e1 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCinder.java @@ -0,0 +1,187 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecCinderSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ +@ApiModel(description = "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecCinder { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_REF = "secretRef"; + @SerializedName(SERIALIZED_NAME_SECRET_REF) + private V1ScanSpecCinderSecretRef secretRef; + + public static final String SERIALIZED_NAME_VOLUME_I_D = "volumeID"; + @SerializedName(SERIALIZED_NAME_VOLUME_I_D) + private String volumeID; + + + public V1ScanSpecCinder fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecCinder readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecCinder secretRef(V1ScanSpecCinderSecretRef secretRef) { + + this.secretRef = secretRef; + return this; + } + + /** + * Get secretRef + * @return secretRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecCinderSecretRef getSecretRef() { + return secretRef; + } + + + public void setSecretRef(V1ScanSpecCinderSecretRef secretRef) { + this.secretRef = secretRef; + } + + + public V1ScanSpecCinder volumeID(String volumeID) { + + this.volumeID = volumeID; + return this; + } + + /** + * volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + * @return volumeID + **/ + @ApiModelProperty(required = true, value = "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md") + + public String getVolumeID() { + return volumeID; + } + + + public void setVolumeID(String volumeID) { + this.volumeID = volumeID; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecCinder v1ScanSpecCinder = (V1ScanSpecCinder) o; + return Objects.equals(this.fsType, v1ScanSpecCinder.fsType) && + Objects.equals(this.readOnly, v1ScanSpecCinder.readOnly) && + Objects.equals(this.secretRef, v1ScanSpecCinder.secretRef) && + Objects.equals(this.volumeID, v1ScanSpecCinder.volumeID); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, readOnly, secretRef, volumeID); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecCinder {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretRef: ").append(toIndentedString(secretRef)).append("\n"); + sb.append(" volumeID: ").append(toIndentedString(volumeID)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCinderSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCinderSecretRef.java new file mode 100644 index 0000000000..da588b3269 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCinderSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Optional: points to a secret object containing parameters used to connect to OpenStack. + */ +@ApiModel(description = "Optional: points to a secret object containing parameters used to connect to OpenStack.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecCinderSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecCinderSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecCinderSecretRef v1ScanSpecCinderSecretRef = (V1ScanSpecCinderSecretRef) o; + return Objects.equals(this.name, v1ScanSpecCinderSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecCinderSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecConfigMap.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecConfigMap.java new file mode 100644 index 0000000000..30b7de2bc8 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecConfigMap.java @@ -0,0 +1,198 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecConfigMapItems; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * ConfigMap represents a configMap that should populate this volume + */ +@ApiModel(description = "ConfigMap represents a configMap that should populate this volume") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecConfigMap { + public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; + @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) + private Integer defaultMode; + + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_OPTIONAL = "optional"; + @SerializedName(SERIALIZED_NAME_OPTIONAL) + private Boolean optional; + + + public V1ScanSpecConfigMap defaultMode(Integer defaultMode) { + + this.defaultMode = defaultMode; + return this; + } + + /** + * Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * @return defaultMode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.") + + public Integer getDefaultMode() { + return defaultMode; + } + + + public void setDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + } + + + public V1ScanSpecConfigMap items(List items) { + + this.items = items; + return this; + } + + public V1ScanSpecConfigMap addItemsItem(V1ScanSpecConfigMapItems itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + public V1ScanSpecConfigMap name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public V1ScanSpecConfigMap optional(Boolean optional) { + + this.optional = optional; + return this; + } + + /** + * Specify whether the ConfigMap or its keys must be defined + * @return optional + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specify whether the ConfigMap or its keys must be defined") + + public Boolean getOptional() { + return optional; + } + + + public void setOptional(Boolean optional) { + this.optional = optional; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecConfigMap v1ScanSpecConfigMap = (V1ScanSpecConfigMap) o; + return Objects.equals(this.defaultMode, v1ScanSpecConfigMap.defaultMode) && + Objects.equals(this.items, v1ScanSpecConfigMap.items) && + Objects.equals(this.name, v1ScanSpecConfigMap.name) && + Objects.equals(this.optional, v1ScanSpecConfigMap.optional); + } + + @Override + public int hashCode() { + return Objects.hash(defaultMode, items, name, optional); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecConfigMap {\n"); + sb.append(" defaultMode: ").append(toIndentedString(defaultMode)).append("\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" optional: ").append(toIndentedString(optional)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecConfigMapItems.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecConfigMapItems.java new file mode 100644 index 0000000000..59c8be8ecb --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecConfigMapItems.java @@ -0,0 +1,156 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Maps a string key to a path within a volume. + */ +@ApiModel(description = "Maps a string key to a path within a volume.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecConfigMapItems { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_MODE = "mode"; + @SerializedName(SERIALIZED_NAME_MODE) + private Integer mode; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + + public V1ScanSpecConfigMapItems key(String key) { + + this.key = key; + return this; + } + + /** + * The key to project. + * @return key + **/ + @ApiModelProperty(required = true, value = "The key to project.") + + public String getKey() { + return key; + } + + + public void setKey(String key) { + this.key = key; + } + + + public V1ScanSpecConfigMapItems mode(Integer mode) { + + this.mode = mode; + return this; + } + + /** + * Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * @return mode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.") + + public Integer getMode() { + return mode; + } + + + public void setMode(Integer mode) { + this.mode = mode; + } + + + public V1ScanSpecConfigMapItems path(String path) { + + this.path = path; + return this; + } + + /** + * The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + * @return path + **/ + @ApiModelProperty(required = true, value = "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.") + + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecConfigMapItems v1ScanSpecConfigMapItems = (V1ScanSpecConfigMapItems) o; + return Objects.equals(this.key, v1ScanSpecConfigMapItems.key) && + Objects.equals(this.mode, v1ScanSpecConfigMapItems.mode) && + Objects.equals(this.path, v1ScanSpecConfigMapItems.path); + } + + @Override + public int hashCode() { + return Objects.hash(key, mode, path); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecConfigMapItems {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCsi.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCsi.java new file mode 100644 index 0000000000..12060ed249 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCsi.java @@ -0,0 +1,227 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecCsiNodePublishSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). + */ +@ApiModel(description = "CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecCsi { + public static final String SERIALIZED_NAME_DRIVER = "driver"; + @SerializedName(SERIALIZED_NAME_DRIVER) + private String driver; + + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_NODE_PUBLISH_SECRET_REF = "nodePublishSecretRef"; + @SerializedName(SERIALIZED_NAME_NODE_PUBLISH_SECRET_REF) + private V1ScanSpecCsiNodePublishSecretRef nodePublishSecretRef; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_VOLUME_ATTRIBUTES = "volumeAttributes"; + @SerializedName(SERIALIZED_NAME_VOLUME_ATTRIBUTES) + private Map volumeAttributes = null; + + + public V1ScanSpecCsi driver(String driver) { + + this.driver = driver; + return this; + } + + /** + * Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + * @return driver + **/ + @ApiModelProperty(required = true, value = "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.") + + public String getDriver() { + return driver; + } + + + public void setDriver(String driver) { + this.driver = driver; + } + + + public V1ScanSpecCsi fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecCsi nodePublishSecretRef(V1ScanSpecCsiNodePublishSecretRef nodePublishSecretRef) { + + this.nodePublishSecretRef = nodePublishSecretRef; + return this; + } + + /** + * Get nodePublishSecretRef + * @return nodePublishSecretRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecCsiNodePublishSecretRef getNodePublishSecretRef() { + return nodePublishSecretRef; + } + + + public void setNodePublishSecretRef(V1ScanSpecCsiNodePublishSecretRef nodePublishSecretRef) { + this.nodePublishSecretRef = nodePublishSecretRef; + } + + + public V1ScanSpecCsi readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Specifies a read-only configuration for the volume. Defaults to false (read/write). + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies a read-only configuration for the volume. Defaults to false (read/write).") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecCsi volumeAttributes(Map volumeAttributes) { + + this.volumeAttributes = volumeAttributes; + return this; + } + + public V1ScanSpecCsi putVolumeAttributesItem(String key, String volumeAttributesItem) { + if (this.volumeAttributes == null) { + this.volumeAttributes = new HashMap(); + } + this.volumeAttributes.put(key, volumeAttributesItem); + return this; + } + + /** + * VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + * @return volumeAttributes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.") + + public Map getVolumeAttributes() { + return volumeAttributes; + } + + + public void setVolumeAttributes(Map volumeAttributes) { + this.volumeAttributes = volumeAttributes; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecCsi v1ScanSpecCsi = (V1ScanSpecCsi) o; + return Objects.equals(this.driver, v1ScanSpecCsi.driver) && + Objects.equals(this.fsType, v1ScanSpecCsi.fsType) && + Objects.equals(this.nodePublishSecretRef, v1ScanSpecCsi.nodePublishSecretRef) && + Objects.equals(this.readOnly, v1ScanSpecCsi.readOnly) && + Objects.equals(this.volumeAttributes, v1ScanSpecCsi.volumeAttributes); + } + + @Override + public int hashCode() { + return Objects.hash(driver, fsType, nodePublishSecretRef, readOnly, volumeAttributes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecCsi {\n"); + sb.append(" driver: ").append(toIndentedString(driver)).append("\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" nodePublishSecretRef: ").append(toIndentedString(nodePublishSecretRef)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" volumeAttributes: ").append(toIndentedString(volumeAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCsiNodePublishSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCsiNodePublishSecretRef.java new file mode 100644 index 0000000000..f6c240c0d9 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecCsiNodePublishSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + */ +@ApiModel(description = "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecCsiNodePublishSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecCsiNodePublishSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecCsiNodePublishSecretRef v1ScanSpecCsiNodePublishSecretRef = (V1ScanSpecCsiNodePublishSecretRef) o; + return Objects.equals(this.name, v1ScanSpecCsiNodePublishSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecCsiNodePublishSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPI.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPI.java new file mode 100644 index 0000000000..c27385378a --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPI.java @@ -0,0 +1,140 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecDownwardAPIItems; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * DownwardAPI represents downward API about the pod that should populate this volume + */ +@ApiModel(description = "DownwardAPI represents downward API about the pod that should populate this volume") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecDownwardAPI { + public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; + @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) + private Integer defaultMode; + + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + + public V1ScanSpecDownwardAPI defaultMode(Integer defaultMode) { + + this.defaultMode = defaultMode; + return this; + } + + /** + * Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * @return defaultMode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.") + + public Integer getDefaultMode() { + return defaultMode; + } + + + public void setDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + } + + + public V1ScanSpecDownwardAPI items(List items) { + + this.items = items; + return this; + } + + public V1ScanSpecDownwardAPI addItemsItem(V1ScanSpecDownwardAPIItems itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Items is a list of downward API volume file + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Items is a list of downward API volume file") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecDownwardAPI v1ScanSpecDownwardAPI = (V1ScanSpecDownwardAPI) o; + return Objects.equals(this.defaultMode, v1ScanSpecDownwardAPI.defaultMode) && + Objects.equals(this.items, v1ScanSpecDownwardAPI.items); + } + + @Override + public int hashCode() { + return Objects.hash(defaultMode, items); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecDownwardAPI {\n"); + sb.append(" defaultMode: ").append(toIndentedString(defaultMode)).append("\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIFieldRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIFieldRef.java new file mode 100644 index 0000000000..6f099fcce3 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIFieldRef.java @@ -0,0 +1,128 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + */ +@ApiModel(description = "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecDownwardAPIFieldRef { + public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; + @SerializedName(SERIALIZED_NAME_API_VERSION) + private String apiVersion; + + public static final String SERIALIZED_NAME_FIELD_PATH = "fieldPath"; + @SerializedName(SERIALIZED_NAME_FIELD_PATH) + private String fieldPath; + + + public V1ScanSpecDownwardAPIFieldRef apiVersion(String apiVersion) { + + this.apiVersion = apiVersion; + return this; + } + + /** + * Version of the schema the FieldPath is written in terms of, defaults to \"v1\". + * @return apiVersion + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".") + + public String getApiVersion() { + return apiVersion; + } + + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + + public V1ScanSpecDownwardAPIFieldRef fieldPath(String fieldPath) { + + this.fieldPath = fieldPath; + return this; + } + + /** + * Path of the field to select in the specified API version. + * @return fieldPath + **/ + @ApiModelProperty(required = true, value = "Path of the field to select in the specified API version.") + + public String getFieldPath() { + return fieldPath; + } + + + public void setFieldPath(String fieldPath) { + this.fieldPath = fieldPath; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecDownwardAPIFieldRef v1ScanSpecDownwardAPIFieldRef = (V1ScanSpecDownwardAPIFieldRef) o; + return Objects.equals(this.apiVersion, v1ScanSpecDownwardAPIFieldRef.apiVersion) && + Objects.equals(this.fieldPath, v1ScanSpecDownwardAPIFieldRef.fieldPath); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, fieldPath); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecDownwardAPIFieldRef {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" fieldPath: ").append(toIndentedString(fieldPath)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIItems.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIItems.java new file mode 100644 index 0000000000..f9cbbed65e --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIItems.java @@ -0,0 +1,188 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecDownwardAPIFieldRef; +import io.securecodebox.models.V1ScanSpecDownwardAPIResourceFieldRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * DownwardAPIVolumeFile represents information to create the file containing the pod field + */ +@ApiModel(description = "DownwardAPIVolumeFile represents information to create the file containing the pod field") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecDownwardAPIItems { + public static final String SERIALIZED_NAME_FIELD_REF = "fieldRef"; + @SerializedName(SERIALIZED_NAME_FIELD_REF) + private V1ScanSpecDownwardAPIFieldRef fieldRef; + + public static final String SERIALIZED_NAME_MODE = "mode"; + @SerializedName(SERIALIZED_NAME_MODE) + private Integer mode; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_RESOURCE_FIELD_REF = "resourceFieldRef"; + @SerializedName(SERIALIZED_NAME_RESOURCE_FIELD_REF) + private V1ScanSpecDownwardAPIResourceFieldRef resourceFieldRef; + + + public V1ScanSpecDownwardAPIItems fieldRef(V1ScanSpecDownwardAPIFieldRef fieldRef) { + + this.fieldRef = fieldRef; + return this; + } + + /** + * Get fieldRef + * @return fieldRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecDownwardAPIFieldRef getFieldRef() { + return fieldRef; + } + + + public void setFieldRef(V1ScanSpecDownwardAPIFieldRef fieldRef) { + this.fieldRef = fieldRef; + } + + + public V1ScanSpecDownwardAPIItems mode(Integer mode) { + + this.mode = mode; + return this; + } + + /** + * Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * @return mode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.") + + public Integer getMode() { + return mode; + } + + + public void setMode(Integer mode) { + this.mode = mode; + } + + + public V1ScanSpecDownwardAPIItems path(String path) { + + this.path = path; + return this; + } + + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + * @return path + **/ + @ApiModelProperty(required = true, value = "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'") + + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + + public V1ScanSpecDownwardAPIItems resourceFieldRef(V1ScanSpecDownwardAPIResourceFieldRef resourceFieldRef) { + + this.resourceFieldRef = resourceFieldRef; + return this; + } + + /** + * Get resourceFieldRef + * @return resourceFieldRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecDownwardAPIResourceFieldRef getResourceFieldRef() { + return resourceFieldRef; + } + + + public void setResourceFieldRef(V1ScanSpecDownwardAPIResourceFieldRef resourceFieldRef) { + this.resourceFieldRef = resourceFieldRef; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecDownwardAPIItems v1ScanSpecDownwardAPIItems = (V1ScanSpecDownwardAPIItems) o; + return Objects.equals(this.fieldRef, v1ScanSpecDownwardAPIItems.fieldRef) && + Objects.equals(this.mode, v1ScanSpecDownwardAPIItems.mode) && + Objects.equals(this.path, v1ScanSpecDownwardAPIItems.path) && + Objects.equals(this.resourceFieldRef, v1ScanSpecDownwardAPIItems.resourceFieldRef); + } + + @Override + public int hashCode() { + return Objects.hash(fieldRef, mode, path, resourceFieldRef); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecDownwardAPIItems {\n"); + sb.append(" fieldRef: ").append(toIndentedString(fieldRef)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" resourceFieldRef: ").append(toIndentedString(resourceFieldRef)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIResourceFieldRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIResourceFieldRef.java new file mode 100644 index 0000000000..34da4a6030 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecDownwardAPIResourceFieldRef.java @@ -0,0 +1,157 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + */ +@ApiModel(description = "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecDownwardAPIResourceFieldRef { + public static final String SERIALIZED_NAME_CONTAINER_NAME = "containerName"; + @SerializedName(SERIALIZED_NAME_CONTAINER_NAME) + private String containerName; + + public static final String SERIALIZED_NAME_DIVISOR = "divisor"; + @SerializedName(SERIALIZED_NAME_DIVISOR) + private String divisor; + + public static final String SERIALIZED_NAME_RESOURCE = "resource"; + @SerializedName(SERIALIZED_NAME_RESOURCE) + private String resource; + + + public V1ScanSpecDownwardAPIResourceFieldRef containerName(String containerName) { + + this.containerName = containerName; + return this; + } + + /** + * Container name: required for volumes, optional for env vars + * @return containerName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Container name: required for volumes, optional for env vars") + + public String getContainerName() { + return containerName; + } + + + public void setContainerName(String containerName) { + this.containerName = containerName; + } + + + public V1ScanSpecDownwardAPIResourceFieldRef divisor(String divisor) { + + this.divisor = divisor; + return this; + } + + /** + * Specifies the output format of the exposed resources, defaults to \"1\" + * @return divisor + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specifies the output format of the exposed resources, defaults to \"1\"") + + public String getDivisor() { + return divisor; + } + + + public void setDivisor(String divisor) { + this.divisor = divisor; + } + + + public V1ScanSpecDownwardAPIResourceFieldRef resource(String resource) { + + this.resource = resource; + return this; + } + + /** + * Required: resource to select + * @return resource + **/ + @ApiModelProperty(required = true, value = "Required: resource to select") + + public String getResource() { + return resource; + } + + + public void setResource(String resource) { + this.resource = resource; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecDownwardAPIResourceFieldRef v1ScanSpecDownwardAPIResourceFieldRef = (V1ScanSpecDownwardAPIResourceFieldRef) o; + return Objects.equals(this.containerName, v1ScanSpecDownwardAPIResourceFieldRef.containerName) && + Objects.equals(this.divisor, v1ScanSpecDownwardAPIResourceFieldRef.divisor) && + Objects.equals(this.resource, v1ScanSpecDownwardAPIResourceFieldRef.resource); + } + + @Override + public int hashCode() { + return Objects.hash(containerName, divisor, resource); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecDownwardAPIResourceFieldRef {\n"); + sb.append(" containerName: ").append(toIndentedString(containerName)).append("\n"); + sb.append(" divisor: ").append(toIndentedString(divisor)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecEmptyDir.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecEmptyDir.java new file mode 100644 index 0000000000..5f3c941f52 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecEmptyDir.java @@ -0,0 +1,129 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + */ +@ApiModel(description = "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecEmptyDir { + public static final String SERIALIZED_NAME_MEDIUM = "medium"; + @SerializedName(SERIALIZED_NAME_MEDIUM) + private String medium; + + public static final String SERIALIZED_NAME_SIZE_LIMIT = "sizeLimit"; + @SerializedName(SERIALIZED_NAME_SIZE_LIMIT) + private String sizeLimit; + + + public V1ScanSpecEmptyDir medium(String medium) { + + this.medium = medium; + return this; + } + + /** + * What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + * @return medium + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir") + + public String getMedium() { + return medium; + } + + + public void setMedium(String medium) { + this.medium = medium; + } + + + public V1ScanSpecEmptyDir sizeLimit(String sizeLimit) { + + this.sizeLimit = sizeLimit; + return this; + } + + /** + * Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + * @return sizeLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir") + + public String getSizeLimit() { + return sizeLimit; + } + + + public void setSizeLimit(String sizeLimit) { + this.sizeLimit = sizeLimit; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecEmptyDir v1ScanSpecEmptyDir = (V1ScanSpecEmptyDir) o; + return Objects.equals(this.medium, v1ScanSpecEmptyDir.medium) && + Objects.equals(this.sizeLimit, v1ScanSpecEmptyDir.sizeLimit); + } + + @Override + public int hashCode() { + return Objects.hash(medium, sizeLimit); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecEmptyDir {\n"); + sb.append(" medium: ").append(toIndentedString(medium)).append("\n"); + sb.append(" sizeLimit: ").append(toIndentedString(sizeLimit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecEnv.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecEnv.java index 70affdb0ff..48053ba442 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecEnv.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecEnv.java @@ -29,7 +29,7 @@ * EnvVar represents an environment variable present in a Container. */ @ApiModel(description = "EnvVar represents an environment variable present in a Container.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecEnv { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFc.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFc.java new file mode 100644 index 0000000000..4f5362d13c --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFc.java @@ -0,0 +1,234 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + */ +@ApiModel(description = "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecFc { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_LUN = "lun"; + @SerializedName(SERIALIZED_NAME_LUN) + private Integer lun; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_TARGET_W_W_NS = "targetWWNs"; + @SerializedName(SERIALIZED_NAME_TARGET_W_W_NS) + private List targetWWNs = null; + + public static final String SERIALIZED_NAME_WWIDS = "wwids"; + @SerializedName(SERIALIZED_NAME_WWIDS) + private List wwids = null; + + + public V1ScanSpecFc fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecFc lun(Integer lun) { + + this.lun = lun; + return this; + } + + /** + * Optional: FC target lun number + * @return lun + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: FC target lun number") + + public Integer getLun() { + return lun; + } + + + public void setLun(Integer lun) { + this.lun = lun; + } + + + public V1ScanSpecFc readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecFc targetWWNs(List targetWWNs) { + + this.targetWWNs = targetWWNs; + return this; + } + + public V1ScanSpecFc addTargetWWNsItem(String targetWWNsItem) { + if (this.targetWWNs == null) { + this.targetWWNs = new ArrayList(); + } + this.targetWWNs.add(targetWWNsItem); + return this; + } + + /** + * Optional: FC target worldwide names (WWNs) + * @return targetWWNs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: FC target worldwide names (WWNs)") + + public List getTargetWWNs() { + return targetWWNs; + } + + + public void setTargetWWNs(List targetWWNs) { + this.targetWWNs = targetWWNs; + } + + + public V1ScanSpecFc wwids(List wwids) { + + this.wwids = wwids; + return this; + } + + public V1ScanSpecFc addWwidsItem(String wwidsItem) { + if (this.wwids == null) { + this.wwids = new ArrayList(); + } + this.wwids.add(wwidsItem); + return this; + } + + /** + * Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + * @return wwids + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.") + + public List getWwids() { + return wwids; + } + + + public void setWwids(List wwids) { + this.wwids = wwids; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecFc v1ScanSpecFc = (V1ScanSpecFc) o; + return Objects.equals(this.fsType, v1ScanSpecFc.fsType) && + Objects.equals(this.lun, v1ScanSpecFc.lun) && + Objects.equals(this.readOnly, v1ScanSpecFc.readOnly) && + Objects.equals(this.targetWWNs, v1ScanSpecFc.targetWWNs) && + Objects.equals(this.wwids, v1ScanSpecFc.wwids); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, lun, readOnly, targetWWNs, wwids); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecFc {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" lun: ").append(toIndentedString(lun)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" targetWWNs: ").append(toIndentedString(targetWWNs)).append("\n"); + sb.append(" wwids: ").append(toIndentedString(wwids)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlexVolume.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlexVolume.java new file mode 100644 index 0000000000..f3d9dacfee --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlexVolume.java @@ -0,0 +1,227 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecFlexVolumeSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + */ +@ApiModel(description = "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecFlexVolume { + public static final String SERIALIZED_NAME_DRIVER = "driver"; + @SerializedName(SERIALIZED_NAME_DRIVER) + private String driver; + + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_OPTIONS = "options"; + @SerializedName(SERIALIZED_NAME_OPTIONS) + private Map options = null; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_REF = "secretRef"; + @SerializedName(SERIALIZED_NAME_SECRET_REF) + private V1ScanSpecFlexVolumeSecretRef secretRef; + + + public V1ScanSpecFlexVolume driver(String driver) { + + this.driver = driver; + return this; + } + + /** + * Driver is the name of the driver to use for this volume. + * @return driver + **/ + @ApiModelProperty(required = true, value = "Driver is the name of the driver to use for this volume.") + + public String getDriver() { + return driver; + } + + + public void setDriver(String driver) { + this.driver = driver; + } + + + public V1ScanSpecFlexVolume fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script. + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecFlexVolume options(Map options) { + + this.options = options; + return this; + } + + public V1ScanSpecFlexVolume putOptionsItem(String key, String optionsItem) { + if (this.options == null) { + this.options = new HashMap(); + } + this.options.put(key, optionsItem); + return this; + } + + /** + * Optional: Extra command options if any. + * @return options + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: Extra command options if any.") + + public Map getOptions() { + return options; + } + + + public void setOptions(Map options) { + this.options = options; + } + + + public V1ScanSpecFlexVolume readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecFlexVolume secretRef(V1ScanSpecFlexVolumeSecretRef secretRef) { + + this.secretRef = secretRef; + return this; + } + + /** + * Get secretRef + * @return secretRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecFlexVolumeSecretRef getSecretRef() { + return secretRef; + } + + + public void setSecretRef(V1ScanSpecFlexVolumeSecretRef secretRef) { + this.secretRef = secretRef; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecFlexVolume v1ScanSpecFlexVolume = (V1ScanSpecFlexVolume) o; + return Objects.equals(this.driver, v1ScanSpecFlexVolume.driver) && + Objects.equals(this.fsType, v1ScanSpecFlexVolume.fsType) && + Objects.equals(this.options, v1ScanSpecFlexVolume.options) && + Objects.equals(this.readOnly, v1ScanSpecFlexVolume.readOnly) && + Objects.equals(this.secretRef, v1ScanSpecFlexVolume.secretRef); + } + + @Override + public int hashCode() { + return Objects.hash(driver, fsType, options, readOnly, secretRef); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecFlexVolume {\n"); + sb.append(" driver: ").append(toIndentedString(driver)).append("\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretRef: ").append(toIndentedString(secretRef)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlexVolumeSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlexVolumeSecretRef.java new file mode 100644 index 0000000000..f4df099fd8 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlexVolumeSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. + */ +@ApiModel(description = "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecFlexVolumeSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecFlexVolumeSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecFlexVolumeSecretRef v1ScanSpecFlexVolumeSecretRef = (V1ScanSpecFlexVolumeSecretRef) o; + return Objects.equals(this.name, v1ScanSpecFlexVolumeSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecFlexVolumeSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlocker.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlocker.java new file mode 100644 index 0000000000..1832b7881f --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecFlocker.java @@ -0,0 +1,129 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + */ +@ApiModel(description = "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecFlocker { + public static final String SERIALIZED_NAME_DATASET_NAME = "datasetName"; + @SerializedName(SERIALIZED_NAME_DATASET_NAME) + private String datasetName; + + public static final String SERIALIZED_NAME_DATASET_U_U_I_D = "datasetUUID"; + @SerializedName(SERIALIZED_NAME_DATASET_U_U_I_D) + private String datasetUUID; + + + public V1ScanSpecFlocker datasetName(String datasetName) { + + this.datasetName = datasetName; + return this; + } + + /** + * Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + * @return datasetName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated") + + public String getDatasetName() { + return datasetName; + } + + + public void setDatasetName(String datasetName) { + this.datasetName = datasetName; + } + + + public V1ScanSpecFlocker datasetUUID(String datasetUUID) { + + this.datasetUUID = datasetUUID; + return this; + } + + /** + * UUID of the dataset. This is unique identifier of a Flocker dataset + * @return datasetUUID + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "UUID of the dataset. This is unique identifier of a Flocker dataset") + + public String getDatasetUUID() { + return datasetUUID; + } + + + public void setDatasetUUID(String datasetUUID) { + this.datasetUUID = datasetUUID; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecFlocker v1ScanSpecFlocker = (V1ScanSpecFlocker) o; + return Objects.equals(this.datasetName, v1ScanSpecFlocker.datasetName) && + Objects.equals(this.datasetUUID, v1ScanSpecFlocker.datasetUUID); + } + + @Override + public int hashCode() { + return Objects.hash(datasetName, datasetUUID); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecFlocker {\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" datasetUUID: ").append(toIndentedString(datasetUUID)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGcePersistentDisk.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGcePersistentDisk.java new file mode 100644 index 0000000000..14f1c9635a --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGcePersistentDisk.java @@ -0,0 +1,186 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + */ +@ApiModel(description = "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecGcePersistentDisk { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_PARTITION = "partition"; + @SerializedName(SERIALIZED_NAME_PARTITION) + private Integer partition; + + public static final String SERIALIZED_NAME_PD_NAME = "pdName"; + @SerializedName(SERIALIZED_NAME_PD_NAME) + private String pdName; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + + public V1ScanSpecGcePersistentDisk fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecGcePersistentDisk partition(Integer partition) { + + this.partition = partition; + return this; + } + + /** + * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * @return partition + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk") + + public Integer getPartition() { + return partition; + } + + + public void setPartition(Integer partition) { + this.partition = partition; + } + + + public V1ScanSpecGcePersistentDisk pdName(String pdName) { + + this.pdName = pdName; + return this; + } + + /** + * Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * @return pdName + **/ + @ApiModelProperty(required = true, value = "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk") + + public String getPdName() { + return pdName; + } + + + public void setPdName(String pdName) { + this.pdName = pdName; + } + + + public V1ScanSpecGcePersistentDisk readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecGcePersistentDisk v1ScanSpecGcePersistentDisk = (V1ScanSpecGcePersistentDisk) o; + return Objects.equals(this.fsType, v1ScanSpecGcePersistentDisk.fsType) && + Objects.equals(this.partition, v1ScanSpecGcePersistentDisk.partition) && + Objects.equals(this.pdName, v1ScanSpecGcePersistentDisk.pdName) && + Objects.equals(this.readOnly, v1ScanSpecGcePersistentDisk.readOnly); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, partition, pdName, readOnly); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecGcePersistentDisk {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" partition: ").append(toIndentedString(partition)).append("\n"); + sb.append(" pdName: ").append(toIndentedString(pdName)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGitRepo.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGitRepo.java new file mode 100644 index 0000000000..99267bef94 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGitRepo.java @@ -0,0 +1,157 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. + */ +@ApiModel(description = "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecGitRepo { + public static final String SERIALIZED_NAME_DIRECTORY = "directory"; + @SerializedName(SERIALIZED_NAME_DIRECTORY) + private String directory; + + public static final String SERIALIZED_NAME_REPOSITORY = "repository"; + @SerializedName(SERIALIZED_NAME_REPOSITORY) + private String repository; + + public static final String SERIALIZED_NAME_REVISION = "revision"; + @SerializedName(SERIALIZED_NAME_REVISION) + private String revision; + + + public V1ScanSpecGitRepo directory(String directory) { + + this.directory = directory; + return this; + } + + /** + * Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + * @return directory + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.") + + public String getDirectory() { + return directory; + } + + + public void setDirectory(String directory) { + this.directory = directory; + } + + + public V1ScanSpecGitRepo repository(String repository) { + + this.repository = repository; + return this; + } + + /** + * Repository URL + * @return repository + **/ + @ApiModelProperty(required = true, value = "Repository URL") + + public String getRepository() { + return repository; + } + + + public void setRepository(String repository) { + this.repository = repository; + } + + + public V1ScanSpecGitRepo revision(String revision) { + + this.revision = revision; + return this; + } + + /** + * Commit hash for the specified revision. + * @return revision + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Commit hash for the specified revision.") + + public String getRevision() { + return revision; + } + + + public void setRevision(String revision) { + this.revision = revision; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecGitRepo v1ScanSpecGitRepo = (V1ScanSpecGitRepo) o; + return Objects.equals(this.directory, v1ScanSpecGitRepo.directory) && + Objects.equals(this.repository, v1ScanSpecGitRepo.repository) && + Objects.equals(this.revision, v1ScanSpecGitRepo.revision); + } + + @Override + public int hashCode() { + return Objects.hash(directory, repository, revision); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecGitRepo {\n"); + sb.append(" directory: ").append(toIndentedString(directory)).append("\n"); + sb.append(" repository: ").append(toIndentedString(repository)).append("\n"); + sb.append(" revision: ").append(toIndentedString(revision)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGlusterfs.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGlusterfs.java new file mode 100644 index 0000000000..ea33b6cd40 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecGlusterfs.java @@ -0,0 +1,156 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md + */ +@ApiModel(description = "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecGlusterfs { + public static final String SERIALIZED_NAME_ENDPOINTS = "endpoints"; + @SerializedName(SERIALIZED_NAME_ENDPOINTS) + private String endpoints; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + + public V1ScanSpecGlusterfs endpoints(String endpoints) { + + this.endpoints = endpoints; + return this; + } + + /** + * EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + * @return endpoints + **/ + @ApiModelProperty(required = true, value = "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod") + + public String getEndpoints() { + return endpoints; + } + + + public void setEndpoints(String endpoints) { + this.endpoints = endpoints; + } + + + public V1ScanSpecGlusterfs path(String path) { + + this.path = path; + return this; + } + + /** + * Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + * @return path + **/ + @ApiModelProperty(required = true, value = "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod") + + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + + public V1ScanSpecGlusterfs readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecGlusterfs v1ScanSpecGlusterfs = (V1ScanSpecGlusterfs) o; + return Objects.equals(this.endpoints, v1ScanSpecGlusterfs.endpoints) && + Objects.equals(this.path, v1ScanSpecGlusterfs.path) && + Objects.equals(this.readOnly, v1ScanSpecGlusterfs.readOnly); + } + + @Override + public int hashCode() { + return Objects.hash(endpoints, path, readOnly); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecGlusterfs {\n"); + sb.append(" endpoints: ").append(toIndentedString(endpoints)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecHostPath.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecHostPath.java new file mode 100644 index 0000000000..6f2a63fcc3 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecHostPath.java @@ -0,0 +1,128 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. + */ +@ApiModel(description = "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecHostPath { + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + + public V1ScanSpecHostPath path(String path) { + + this.path = path; + return this; + } + + /** + * Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + * @return path + **/ + @ApiModelProperty(required = true, value = "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath") + + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + + public V1ScanSpecHostPath type(String type) { + + this.type = type; + return this; + } + + /** + * Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath") + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecHostPath v1ScanSpecHostPath = (V1ScanSpecHostPath) o; + return Objects.equals(this.path, v1ScanSpecHostPath.path) && + Objects.equals(this.type, v1ScanSpecHostPath.type); + } + + @Override + public int hashCode() { + return Objects.hash(path, type); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecHostPath {\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecIscsi.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecIscsi.java new file mode 100644 index 0000000000..14e48a99d6 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecIscsi.java @@ -0,0 +1,398 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecIscsiSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md + */ +@ApiModel(description = "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecIscsi { + public static final String SERIALIZED_NAME_CHAP_AUTH_DISCOVERY = "chapAuthDiscovery"; + @SerializedName(SERIALIZED_NAME_CHAP_AUTH_DISCOVERY) + private Boolean chapAuthDiscovery; + + public static final String SERIALIZED_NAME_CHAP_AUTH_SESSION = "chapAuthSession"; + @SerializedName(SERIALIZED_NAME_CHAP_AUTH_SESSION) + private Boolean chapAuthSession; + + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_INITIATOR_NAME = "initiatorName"; + @SerializedName(SERIALIZED_NAME_INITIATOR_NAME) + private String initiatorName; + + public static final String SERIALIZED_NAME_IQN = "iqn"; + @SerializedName(SERIALIZED_NAME_IQN) + private String iqn; + + public static final String SERIALIZED_NAME_ISCSI_INTERFACE = "iscsiInterface"; + @SerializedName(SERIALIZED_NAME_ISCSI_INTERFACE) + private String iscsiInterface; + + public static final String SERIALIZED_NAME_LUN = "lun"; + @SerializedName(SERIALIZED_NAME_LUN) + private Integer lun; + + public static final String SERIALIZED_NAME_PORTALS = "portals"; + @SerializedName(SERIALIZED_NAME_PORTALS) + private List portals = null; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_REF = "secretRef"; + @SerializedName(SERIALIZED_NAME_SECRET_REF) + private V1ScanSpecIscsiSecretRef secretRef; + + public static final String SERIALIZED_NAME_TARGET_PORTAL = "targetPortal"; + @SerializedName(SERIALIZED_NAME_TARGET_PORTAL) + private String targetPortal; + + + public V1ScanSpecIscsi chapAuthDiscovery(Boolean chapAuthDiscovery) { + + this.chapAuthDiscovery = chapAuthDiscovery; + return this; + } + + /** + * whether support iSCSI Discovery CHAP authentication + * @return chapAuthDiscovery + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "whether support iSCSI Discovery CHAP authentication") + + public Boolean getChapAuthDiscovery() { + return chapAuthDiscovery; + } + + + public void setChapAuthDiscovery(Boolean chapAuthDiscovery) { + this.chapAuthDiscovery = chapAuthDiscovery; + } + + + public V1ScanSpecIscsi chapAuthSession(Boolean chapAuthSession) { + + this.chapAuthSession = chapAuthSession; + return this; + } + + /** + * whether support iSCSI Session CHAP authentication + * @return chapAuthSession + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "whether support iSCSI Session CHAP authentication") + + public Boolean getChapAuthSession() { + return chapAuthSession; + } + + + public void setChapAuthSession(Boolean chapAuthSession) { + this.chapAuthSession = chapAuthSession; + } + + + public V1ScanSpecIscsi fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecIscsi initiatorName(String initiatorName) { + + this.initiatorName = initiatorName; + return this; + } + + /** + * Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name> will be created for the connection. + * @return initiatorName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.") + + public String getInitiatorName() { + return initiatorName; + } + + + public void setInitiatorName(String initiatorName) { + this.initiatorName = initiatorName; + } + + + public V1ScanSpecIscsi iqn(String iqn) { + + this.iqn = iqn; + return this; + } + + /** + * Target iSCSI Qualified Name. + * @return iqn + **/ + @ApiModelProperty(required = true, value = "Target iSCSI Qualified Name.") + + public String getIqn() { + return iqn; + } + + + public void setIqn(String iqn) { + this.iqn = iqn; + } + + + public V1ScanSpecIscsi iscsiInterface(String iscsiInterface) { + + this.iscsiInterface = iscsiInterface; + return this; + } + + /** + * iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + * @return iscsiInterface + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).") + + public String getIscsiInterface() { + return iscsiInterface; + } + + + public void setIscsiInterface(String iscsiInterface) { + this.iscsiInterface = iscsiInterface; + } + + + public V1ScanSpecIscsi lun(Integer lun) { + + this.lun = lun; + return this; + } + + /** + * iSCSI Target Lun number. + * @return lun + **/ + @ApiModelProperty(required = true, value = "iSCSI Target Lun number.") + + public Integer getLun() { + return lun; + } + + + public void setLun(Integer lun) { + this.lun = lun; + } + + + public V1ScanSpecIscsi portals(List portals) { + + this.portals = portals; + return this; + } + + public V1ScanSpecIscsi addPortalsItem(String portalsItem) { + if (this.portals == null) { + this.portals = new ArrayList(); + } + this.portals.add(portalsItem); + return this; + } + + /** + * iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + * @return portals + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).") + + public List getPortals() { + return portals; + } + + + public void setPortals(List portals) { + this.portals = portals; + } + + + public V1ScanSpecIscsi readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecIscsi secretRef(V1ScanSpecIscsiSecretRef secretRef) { + + this.secretRef = secretRef; + return this; + } + + /** + * Get secretRef + * @return secretRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecIscsiSecretRef getSecretRef() { + return secretRef; + } + + + public void setSecretRef(V1ScanSpecIscsiSecretRef secretRef) { + this.secretRef = secretRef; + } + + + public V1ScanSpecIscsi targetPortal(String targetPortal) { + + this.targetPortal = targetPortal; + return this; + } + + /** + * iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + * @return targetPortal + **/ + @ApiModelProperty(required = true, value = "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).") + + public String getTargetPortal() { + return targetPortal; + } + + + public void setTargetPortal(String targetPortal) { + this.targetPortal = targetPortal; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecIscsi v1ScanSpecIscsi = (V1ScanSpecIscsi) o; + return Objects.equals(this.chapAuthDiscovery, v1ScanSpecIscsi.chapAuthDiscovery) && + Objects.equals(this.chapAuthSession, v1ScanSpecIscsi.chapAuthSession) && + Objects.equals(this.fsType, v1ScanSpecIscsi.fsType) && + Objects.equals(this.initiatorName, v1ScanSpecIscsi.initiatorName) && + Objects.equals(this.iqn, v1ScanSpecIscsi.iqn) && + Objects.equals(this.iscsiInterface, v1ScanSpecIscsi.iscsiInterface) && + Objects.equals(this.lun, v1ScanSpecIscsi.lun) && + Objects.equals(this.portals, v1ScanSpecIscsi.portals) && + Objects.equals(this.readOnly, v1ScanSpecIscsi.readOnly) && + Objects.equals(this.secretRef, v1ScanSpecIscsi.secretRef) && + Objects.equals(this.targetPortal, v1ScanSpecIscsi.targetPortal); + } + + @Override + public int hashCode() { + return Objects.hash(chapAuthDiscovery, chapAuthSession, fsType, initiatorName, iqn, iscsiInterface, lun, portals, readOnly, secretRef, targetPortal); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecIscsi {\n"); + sb.append(" chapAuthDiscovery: ").append(toIndentedString(chapAuthDiscovery)).append("\n"); + sb.append(" chapAuthSession: ").append(toIndentedString(chapAuthSession)).append("\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" initiatorName: ").append(toIndentedString(initiatorName)).append("\n"); + sb.append(" iqn: ").append(toIndentedString(iqn)).append("\n"); + sb.append(" iscsiInterface: ").append(toIndentedString(iscsiInterface)).append("\n"); + sb.append(" lun: ").append(toIndentedString(lun)).append("\n"); + sb.append(" portals: ").append(toIndentedString(portals)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretRef: ").append(toIndentedString(secretRef)).append("\n"); + sb.append(" targetPortal: ").append(toIndentedString(targetPortal)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecIscsiSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecIscsiSecretRef.java new file mode 100644 index 0000000000..9ee0144965 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecIscsiSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CHAP Secret for iSCSI target and initiator authentication + */ +@ApiModel(description = "CHAP Secret for iSCSI target and initiator authentication") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecIscsiSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecIscsiSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecIscsiSecretRef v1ScanSpecIscsiSecretRef = (V1ScanSpecIscsiSecretRef) o; + return Objects.equals(this.name, v1ScanSpecIscsiSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecIscsiSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecNfs.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecNfs.java new file mode 100644 index 0000000000..4f61cca85c --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecNfs.java @@ -0,0 +1,156 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ +@ApiModel(description = "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecNfs { + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SERVER = "server"; + @SerializedName(SERIALIZED_NAME_SERVER) + private String server; + + + public V1ScanSpecNfs path(String path) { + + this.path = path; + return this; + } + + /** + * Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * @return path + **/ + @ApiModelProperty(required = true, value = "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs") + + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + + public V1ScanSpecNfs readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecNfs server(String server) { + + this.server = server; + return this; + } + + /** + * Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * @return server + **/ + @ApiModelProperty(required = true, value = "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs") + + public String getServer() { + return server; + } + + + public void setServer(String server) { + this.server = server; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecNfs v1ScanSpecNfs = (V1ScanSpecNfs) o; + return Objects.equals(this.path, v1ScanSpecNfs.path) && + Objects.equals(this.readOnly, v1ScanSpecNfs.readOnly) && + Objects.equals(this.server, v1ScanSpecNfs.server); + } + + @Override + public int hashCode() { + return Objects.hash(path, readOnly, server); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecNfs {\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" server: ").append(toIndentedString(server)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPersistentVolumeClaim.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPersistentVolumeClaim.java new file mode 100644 index 0000000000..296037a692 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPersistentVolumeClaim.java @@ -0,0 +1,128 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + */ +@ApiModel(description = "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecPersistentVolumeClaim { + public static final String SERIALIZED_NAME_CLAIM_NAME = "claimName"; + @SerializedName(SERIALIZED_NAME_CLAIM_NAME) + private String claimName; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + + public V1ScanSpecPersistentVolumeClaim claimName(String claimName) { + + this.claimName = claimName; + return this; + } + + /** + * ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + * @return claimName + **/ + @ApiModelProperty(required = true, value = "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims") + + public String getClaimName() { + return claimName; + } + + + public void setClaimName(String claimName) { + this.claimName = claimName; + } + + + public V1ScanSpecPersistentVolumeClaim readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Will force the ReadOnly setting in VolumeMounts. Default false. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Will force the ReadOnly setting in VolumeMounts. Default false.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecPersistentVolumeClaim v1ScanSpecPersistentVolumeClaim = (V1ScanSpecPersistentVolumeClaim) o; + return Objects.equals(this.claimName, v1ScanSpecPersistentVolumeClaim.claimName) && + Objects.equals(this.readOnly, v1ScanSpecPersistentVolumeClaim.readOnly); + } + + @Override + public int hashCode() { + return Objects.hash(claimName, readOnly); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecPersistentVolumeClaim {\n"); + sb.append(" claimName: ").append(toIndentedString(claimName)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPhotonPersistentDisk.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPhotonPersistentDisk.java new file mode 100644 index 0000000000..3424894644 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPhotonPersistentDisk.java @@ -0,0 +1,128 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + */ +@ApiModel(description = "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecPhotonPersistentDisk { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_PD_I_D = "pdID"; + @SerializedName(SERIALIZED_NAME_PD_I_D) + private String pdID; + + + public V1ScanSpecPhotonPersistentDisk fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecPhotonPersistentDisk pdID(String pdID) { + + this.pdID = pdID; + return this; + } + + /** + * ID that identifies Photon Controller persistent disk + * @return pdID + **/ + @ApiModelProperty(required = true, value = "ID that identifies Photon Controller persistent disk") + + public String getPdID() { + return pdID; + } + + + public void setPdID(String pdID) { + this.pdID = pdID; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecPhotonPersistentDisk v1ScanSpecPhotonPersistentDisk = (V1ScanSpecPhotonPersistentDisk) o; + return Objects.equals(this.fsType, v1ScanSpecPhotonPersistentDisk.fsType) && + Objects.equals(this.pdID, v1ScanSpecPhotonPersistentDisk.pdID); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, pdID); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecPhotonPersistentDisk {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" pdID: ").append(toIndentedString(pdID)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPortworxVolume.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPortworxVolume.java new file mode 100644 index 0000000000..44d5124a29 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecPortworxVolume.java @@ -0,0 +1,157 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + */ +@ApiModel(description = "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecPortworxVolume { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_VOLUME_I_D = "volumeID"; + @SerializedName(SERIALIZED_NAME_VOLUME_I_D) + private String volumeID; + + + public V1ScanSpecPortworxVolume fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified. + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecPortworxVolume readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecPortworxVolume volumeID(String volumeID) { + + this.volumeID = volumeID; + return this; + } + + /** + * VolumeID uniquely identifies a Portworx volume + * @return volumeID + **/ + @ApiModelProperty(required = true, value = "VolumeID uniquely identifies a Portworx volume") + + public String getVolumeID() { + return volumeID; + } + + + public void setVolumeID(String volumeID) { + this.volumeID = volumeID; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecPortworxVolume v1ScanSpecPortworxVolume = (V1ScanSpecPortworxVolume) o; + return Objects.equals(this.fsType, v1ScanSpecPortworxVolume.fsType) && + Objects.equals(this.readOnly, v1ScanSpecPortworxVolume.readOnly) && + Objects.equals(this.volumeID, v1ScanSpecPortworxVolume.volumeID); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, readOnly, volumeID); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecPortworxVolume {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" volumeID: ").append(toIndentedString(volumeID)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjected.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjected.java new file mode 100644 index 0000000000..6c3d5449ef --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjected.java @@ -0,0 +1,136 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecProjectedSources; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Items for all in one resources secrets, configmaps, and downward API + */ +@ApiModel(description = "Items for all in one resources secrets, configmaps, and downward API") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecProjected { + public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; + @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) + private Integer defaultMode; + + public static final String SERIALIZED_NAME_SOURCES = "sources"; + @SerializedName(SERIALIZED_NAME_SOURCES) + private List sources = new ArrayList(); + + + public V1ScanSpecProjected defaultMode(Integer defaultMode) { + + this.defaultMode = defaultMode; + return this; + } + + /** + * Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * @return defaultMode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.") + + public Integer getDefaultMode() { + return defaultMode; + } + + + public void setDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + } + + + public V1ScanSpecProjected sources(List sources) { + + this.sources = sources; + return this; + } + + public V1ScanSpecProjected addSourcesItem(V1ScanSpecProjectedSources sourcesItem) { + this.sources.add(sourcesItem); + return this; + } + + /** + * list of volume projections + * @return sources + **/ + @ApiModelProperty(required = true, value = "list of volume projections") + + public List getSources() { + return sources; + } + + + public void setSources(List sources) { + this.sources = sources; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecProjected v1ScanSpecProjected = (V1ScanSpecProjected) o; + return Objects.equals(this.defaultMode, v1ScanSpecProjected.defaultMode) && + Objects.equals(this.sources, v1ScanSpecProjected.sources); + } + + @Override + public int hashCode() { + return Objects.hash(defaultMode, sources); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecProjected {\n"); + sb.append(" defaultMode: ").append(toIndentedString(defaultMode)).append("\n"); + sb.append(" sources: ").append(toIndentedString(sources)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedConfigMap.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedConfigMap.java new file mode 100644 index 0000000000..75f628a35a --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedConfigMap.java @@ -0,0 +1,169 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecConfigMapItems; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * information about the configMap data to project + */ +@ApiModel(description = "information about the configMap data to project") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecProjectedConfigMap { + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_OPTIONAL = "optional"; + @SerializedName(SERIALIZED_NAME_OPTIONAL) + private Boolean optional; + + + public V1ScanSpecProjectedConfigMap items(List items) { + + this.items = items; + return this; + } + + public V1ScanSpecProjectedConfigMap addItemsItem(V1ScanSpecConfigMapItems itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + public V1ScanSpecProjectedConfigMap name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public V1ScanSpecProjectedConfigMap optional(Boolean optional) { + + this.optional = optional; + return this; + } + + /** + * Specify whether the ConfigMap or its keys must be defined + * @return optional + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specify whether the ConfigMap or its keys must be defined") + + public Boolean getOptional() { + return optional; + } + + + public void setOptional(Boolean optional) { + this.optional = optional; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecProjectedConfigMap v1ScanSpecProjectedConfigMap = (V1ScanSpecProjectedConfigMap) o; + return Objects.equals(this.items, v1ScanSpecProjectedConfigMap.items) && + Objects.equals(this.name, v1ScanSpecProjectedConfigMap.name) && + Objects.equals(this.optional, v1ScanSpecProjectedConfigMap.optional); + } + + @Override + public int hashCode() { + return Objects.hash(items, name, optional); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecProjectedConfigMap {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" optional: ").append(toIndentedString(optional)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedDownwardAPI.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedDownwardAPI.java new file mode 100644 index 0000000000..c6ba8fa135 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedDownwardAPI.java @@ -0,0 +1,111 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecDownwardAPIItems; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * information about the downwardAPI data to project + */ +@ApiModel(description = "information about the downwardAPI data to project") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecProjectedDownwardAPI { + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + + public V1ScanSpecProjectedDownwardAPI items(List items) { + + this.items = items; + return this; + } + + public V1ScanSpecProjectedDownwardAPI addItemsItem(V1ScanSpecDownwardAPIItems itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Items is a list of DownwardAPIVolume file + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Items is a list of DownwardAPIVolume file") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecProjectedDownwardAPI v1ScanSpecProjectedDownwardAPI = (V1ScanSpecProjectedDownwardAPI) o; + return Objects.equals(this.items, v1ScanSpecProjectedDownwardAPI.items); + } + + @Override + public int hashCode() { + return Objects.hash(items); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecProjectedDownwardAPI {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedSecret.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedSecret.java new file mode 100644 index 0000000000..64755cffa9 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedSecret.java @@ -0,0 +1,169 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecConfigMapItems; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * information about the secret data to project + */ +@ApiModel(description = "information about the secret data to project") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecProjectedSecret { + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_OPTIONAL = "optional"; + @SerializedName(SERIALIZED_NAME_OPTIONAL) + private Boolean optional; + + + public V1ScanSpecProjectedSecret items(List items) { + + this.items = items; + return this; + } + + public V1ScanSpecProjectedSecret addItemsItem(V1ScanSpecConfigMapItems itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + public V1ScanSpecProjectedSecret name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public V1ScanSpecProjectedSecret optional(Boolean optional) { + + this.optional = optional; + return this; + } + + /** + * Specify whether the Secret or its key must be defined + * @return optional + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specify whether the Secret or its key must be defined") + + public Boolean getOptional() { + return optional; + } + + + public void setOptional(Boolean optional) { + this.optional = optional; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecProjectedSecret v1ScanSpecProjectedSecret = (V1ScanSpecProjectedSecret) o; + return Objects.equals(this.items, v1ScanSpecProjectedSecret.items) && + Objects.equals(this.name, v1ScanSpecProjectedSecret.name) && + Objects.equals(this.optional, v1ScanSpecProjectedSecret.optional); + } + + @Override + public int hashCode() { + return Objects.hash(items, name, optional); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecProjectedSecret {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" optional: ").append(toIndentedString(optional)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedServiceAccountToken.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedServiceAccountToken.java new file mode 100644 index 0000000000..a017493b4f --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedServiceAccountToken.java @@ -0,0 +1,157 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * information about the serviceAccountToken data to project + */ +@ApiModel(description = "information about the serviceAccountToken data to project") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecProjectedServiceAccountToken { + public static final String SERIALIZED_NAME_AUDIENCE = "audience"; + @SerializedName(SERIALIZED_NAME_AUDIENCE) + private String audience; + + public static final String SERIALIZED_NAME_EXPIRATION_SECONDS = "expirationSeconds"; + @SerializedName(SERIALIZED_NAME_EXPIRATION_SECONDS) + private Long expirationSeconds; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + + public V1ScanSpecProjectedServiceAccountToken audience(String audience) { + + this.audience = audience; + return this; + } + + /** + * Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + * @return audience + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.") + + public String getAudience() { + return audience; + } + + + public void setAudience(String audience) { + this.audience = audience; + } + + + public V1ScanSpecProjectedServiceAccountToken expirationSeconds(Long expirationSeconds) { + + this.expirationSeconds = expirationSeconds; + return this; + } + + /** + * ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + * @return expirationSeconds + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.") + + public Long getExpirationSeconds() { + return expirationSeconds; + } + + + public void setExpirationSeconds(Long expirationSeconds) { + this.expirationSeconds = expirationSeconds; + } + + + public V1ScanSpecProjectedServiceAccountToken path(String path) { + + this.path = path; + return this; + } + + /** + * Path is the path relative to the mount point of the file to project the token into. + * @return path + **/ + @ApiModelProperty(required = true, value = "Path is the path relative to the mount point of the file to project the token into.") + + public String getPath() { + return path; + } + + + public void setPath(String path) { + this.path = path; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecProjectedServiceAccountToken v1ScanSpecProjectedServiceAccountToken = (V1ScanSpecProjectedServiceAccountToken) o; + return Objects.equals(this.audience, v1ScanSpecProjectedServiceAccountToken.audience) && + Objects.equals(this.expirationSeconds, v1ScanSpecProjectedServiceAccountToken.expirationSeconds) && + Objects.equals(this.path, v1ScanSpecProjectedServiceAccountToken.path); + } + + @Override + public int hashCode() { + return Objects.hash(audience, expirationSeconds, path); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecProjectedServiceAccountToken {\n"); + sb.append(" audience: ").append(toIndentedString(audience)).append("\n"); + sb.append(" expirationSeconds: ").append(toIndentedString(expirationSeconds)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedSources.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedSources.java new file mode 100644 index 0000000000..20ec6ab01e --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecProjectedSources.java @@ -0,0 +1,191 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecProjectedConfigMap; +import io.securecodebox.models.V1ScanSpecProjectedDownwardAPI; +import io.securecodebox.models.V1ScanSpecProjectedSecret; +import io.securecodebox.models.V1ScanSpecProjectedServiceAccountToken; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Projection that may be projected along with other supported volume types + */ +@ApiModel(description = "Projection that may be projected along with other supported volume types") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecProjectedSources { + public static final String SERIALIZED_NAME_CONFIG_MAP = "configMap"; + @SerializedName(SERIALIZED_NAME_CONFIG_MAP) + private V1ScanSpecProjectedConfigMap configMap; + + public static final String SERIALIZED_NAME_DOWNWARD_A_P_I = "downwardAPI"; + @SerializedName(SERIALIZED_NAME_DOWNWARD_A_P_I) + private V1ScanSpecProjectedDownwardAPI downwardAPI; + + public static final String SERIALIZED_NAME_SECRET = "secret"; + @SerializedName(SERIALIZED_NAME_SECRET) + private V1ScanSpecProjectedSecret secret; + + public static final String SERIALIZED_NAME_SERVICE_ACCOUNT_TOKEN = "serviceAccountToken"; + @SerializedName(SERIALIZED_NAME_SERVICE_ACCOUNT_TOKEN) + private V1ScanSpecProjectedServiceAccountToken serviceAccountToken; + + + public V1ScanSpecProjectedSources configMap(V1ScanSpecProjectedConfigMap configMap) { + + this.configMap = configMap; + return this; + } + + /** + * Get configMap + * @return configMap + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecProjectedConfigMap getConfigMap() { + return configMap; + } + + + public void setConfigMap(V1ScanSpecProjectedConfigMap configMap) { + this.configMap = configMap; + } + + + public V1ScanSpecProjectedSources downwardAPI(V1ScanSpecProjectedDownwardAPI downwardAPI) { + + this.downwardAPI = downwardAPI; + return this; + } + + /** + * Get downwardAPI + * @return downwardAPI + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecProjectedDownwardAPI getDownwardAPI() { + return downwardAPI; + } + + + public void setDownwardAPI(V1ScanSpecProjectedDownwardAPI downwardAPI) { + this.downwardAPI = downwardAPI; + } + + + public V1ScanSpecProjectedSources secret(V1ScanSpecProjectedSecret secret) { + + this.secret = secret; + return this; + } + + /** + * Get secret + * @return secret + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecProjectedSecret getSecret() { + return secret; + } + + + public void setSecret(V1ScanSpecProjectedSecret secret) { + this.secret = secret; + } + + + public V1ScanSpecProjectedSources serviceAccountToken(V1ScanSpecProjectedServiceAccountToken serviceAccountToken) { + + this.serviceAccountToken = serviceAccountToken; + return this; + } + + /** + * Get serviceAccountToken + * @return serviceAccountToken + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecProjectedServiceAccountToken getServiceAccountToken() { + return serviceAccountToken; + } + + + public void setServiceAccountToken(V1ScanSpecProjectedServiceAccountToken serviceAccountToken) { + this.serviceAccountToken = serviceAccountToken; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecProjectedSources v1ScanSpecProjectedSources = (V1ScanSpecProjectedSources) o; + return Objects.equals(this.configMap, v1ScanSpecProjectedSources.configMap) && + Objects.equals(this.downwardAPI, v1ScanSpecProjectedSources.downwardAPI) && + Objects.equals(this.secret, v1ScanSpecProjectedSources.secret) && + Objects.equals(this.serviceAccountToken, v1ScanSpecProjectedSources.serviceAccountToken); + } + + @Override + public int hashCode() { + return Objects.hash(configMap, downwardAPI, secret, serviceAccountToken); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecProjectedSources {\n"); + sb.append(" configMap: ").append(toIndentedString(configMap)).append("\n"); + sb.append(" downwardAPI: ").append(toIndentedString(downwardAPI)).append("\n"); + sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); + sb.append(" serviceAccountToken: ").append(toIndentedString(serviceAccountToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecQuobyte.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecQuobyte.java new file mode 100644 index 0000000000..3a296bb674 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecQuobyte.java @@ -0,0 +1,243 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + */ +@ApiModel(description = "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecQuobyte { + public static final String SERIALIZED_NAME_GROUP = "group"; + @SerializedName(SERIALIZED_NAME_GROUP) + private String group; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_REGISTRY = "registry"; + @SerializedName(SERIALIZED_NAME_REGISTRY) + private String registry; + + public static final String SERIALIZED_NAME_TENANT = "tenant"; + @SerializedName(SERIALIZED_NAME_TENANT) + private String tenant; + + public static final String SERIALIZED_NAME_USER = "user"; + @SerializedName(SERIALIZED_NAME_USER) + private String user; + + public static final String SERIALIZED_NAME_VOLUME = "volume"; + @SerializedName(SERIALIZED_NAME_VOLUME) + private String volume; + + + public V1ScanSpecQuobyte group(String group) { + + this.group = group; + return this; + } + + /** + * Group to map volume access to Default is no group + * @return group + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Group to map volume access to Default is no group") + + public String getGroup() { + return group; + } + + + public void setGroup(String group) { + this.group = group; + } + + + public V1ScanSpecQuobyte readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecQuobyte registry(String registry) { + + this.registry = registry; + return this; + } + + /** + * Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + * @return registry + **/ + @ApiModelProperty(required = true, value = "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes") + + public String getRegistry() { + return registry; + } + + + public void setRegistry(String registry) { + this.registry = registry; + } + + + public V1ScanSpecQuobyte tenant(String tenant) { + + this.tenant = tenant; + return this; + } + + /** + * Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + * @return tenant + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin") + + public String getTenant() { + return tenant; + } + + + public void setTenant(String tenant) { + this.tenant = tenant; + } + + + public V1ScanSpecQuobyte user(String user) { + + this.user = user; + return this; + } + + /** + * User to map volume access to Defaults to serivceaccount user + * @return user + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "User to map volume access to Defaults to serivceaccount user") + + public String getUser() { + return user; + } + + + public void setUser(String user) { + this.user = user; + } + + + public V1ScanSpecQuobyte volume(String volume) { + + this.volume = volume; + return this; + } + + /** + * Volume is a string that references an already created Quobyte volume by name. + * @return volume + **/ + @ApiModelProperty(required = true, value = "Volume is a string that references an already created Quobyte volume by name.") + + public String getVolume() { + return volume; + } + + + public void setVolume(String volume) { + this.volume = volume; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecQuobyte v1ScanSpecQuobyte = (V1ScanSpecQuobyte) o; + return Objects.equals(this.group, v1ScanSpecQuobyte.group) && + Objects.equals(this.readOnly, v1ScanSpecQuobyte.readOnly) && + Objects.equals(this.registry, v1ScanSpecQuobyte.registry) && + Objects.equals(this.tenant, v1ScanSpecQuobyte.tenant) && + Objects.equals(this.user, v1ScanSpecQuobyte.user) && + Objects.equals(this.volume, v1ScanSpecQuobyte.volume); + } + + @Override + public int hashCode() { + return Objects.hash(group, readOnly, registry, tenant, user, volume); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecQuobyte {\n"); + sb.append(" group: ").append(toIndentedString(group)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" registry: ").append(toIndentedString(registry)).append("\n"); + sb.append(" tenant: ").append(toIndentedString(tenant)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" volume: ").append(toIndentedString(volume)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecRbd.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecRbd.java new file mode 100644 index 0000000000..adc5876f5f --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecRbd.java @@ -0,0 +1,309 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecRbdSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md + */ +@ApiModel(description = "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecRbd { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_IMAGE = "image"; + @SerializedName(SERIALIZED_NAME_IMAGE) + private String image; + + public static final String SERIALIZED_NAME_KEYRING = "keyring"; + @SerializedName(SERIALIZED_NAME_KEYRING) + private String keyring; + + public static final String SERIALIZED_NAME_MONITORS = "monitors"; + @SerializedName(SERIALIZED_NAME_MONITORS) + private List monitors = new ArrayList(); + + public static final String SERIALIZED_NAME_POOL = "pool"; + @SerializedName(SERIALIZED_NAME_POOL) + private String pool; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_REF = "secretRef"; + @SerializedName(SERIALIZED_NAME_SECRET_REF) + private V1ScanSpecRbdSecretRef secretRef; + + public static final String SERIALIZED_NAME_USER = "user"; + @SerializedName(SERIALIZED_NAME_USER) + private String user; + + + public V1ScanSpecRbd fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecRbd image(String image) { + + this.image = image; + return this; + } + + /** + * The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @return image + **/ + @ApiModelProperty(required = true, value = "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it") + + public String getImage() { + return image; + } + + + public void setImage(String image) { + this.image = image; + } + + + public V1ScanSpecRbd keyring(String keyring) { + + this.keyring = keyring; + return this; + } + + /** + * Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @return keyring + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it") + + public String getKeyring() { + return keyring; + } + + + public void setKeyring(String keyring) { + this.keyring = keyring; + } + + + public V1ScanSpecRbd monitors(List monitors) { + + this.monitors = monitors; + return this; + } + + public V1ScanSpecRbd addMonitorsItem(String monitorsItem) { + this.monitors.add(monitorsItem); + return this; + } + + /** + * A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @return monitors + **/ + @ApiModelProperty(required = true, value = "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it") + + public List getMonitors() { + return monitors; + } + + + public void setMonitors(List monitors) { + this.monitors = monitors; + } + + + public V1ScanSpecRbd pool(String pool) { + + this.pool = pool; + return this; + } + + /** + * The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @return pool + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it") + + public String getPool() { + return pool; + } + + + public void setPool(String pool) { + this.pool = pool; + } + + + public V1ScanSpecRbd readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecRbd secretRef(V1ScanSpecRbdSecretRef secretRef) { + + this.secretRef = secretRef; + return this; + } + + /** + * Get secretRef + * @return secretRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecRbdSecretRef getSecretRef() { + return secretRef; + } + + + public void setSecretRef(V1ScanSpecRbdSecretRef secretRef) { + this.secretRef = secretRef; + } + + + public V1ScanSpecRbd user(String user) { + + this.user = user; + return this; + } + + /** + * The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @return user + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it") + + public String getUser() { + return user; + } + + + public void setUser(String user) { + this.user = user; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecRbd v1ScanSpecRbd = (V1ScanSpecRbd) o; + return Objects.equals(this.fsType, v1ScanSpecRbd.fsType) && + Objects.equals(this.image, v1ScanSpecRbd.image) && + Objects.equals(this.keyring, v1ScanSpecRbd.keyring) && + Objects.equals(this.monitors, v1ScanSpecRbd.monitors) && + Objects.equals(this.pool, v1ScanSpecRbd.pool) && + Objects.equals(this.readOnly, v1ScanSpecRbd.readOnly) && + Objects.equals(this.secretRef, v1ScanSpecRbd.secretRef) && + Objects.equals(this.user, v1ScanSpecRbd.user); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, image, keyring, monitors, pool, readOnly, secretRef, user); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecRbd {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" keyring: ").append(toIndentedString(keyring)).append("\n"); + sb.append(" monitors: ").append(toIndentedString(monitors)).append("\n"); + sb.append(" pool: ").append(toIndentedString(pool)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretRef: ").append(toIndentedString(secretRef)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecRbdSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecRbdSecretRef.java new file mode 100644 index 0000000000..dc94360bcf --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecRbdSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ +@ApiModel(description = "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecRbdSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecRbdSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecRbdSecretRef v1ScanSpecRbdSecretRef = (V1ScanSpecRbdSecretRef) o; + return Objects.equals(this.name, v1ScanSpecRbdSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecRbdSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecScaleIO.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecScaleIO.java new file mode 100644 index 0000000000..8146a4f2b2 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecScaleIO.java @@ -0,0 +1,359 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecScaleIOSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + */ +@ApiModel(description = "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecScaleIO { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_GATEWAY = "gateway"; + @SerializedName(SERIALIZED_NAME_GATEWAY) + private String gateway; + + public static final String SERIALIZED_NAME_PROTECTION_DOMAIN = "protectionDomain"; + @SerializedName(SERIALIZED_NAME_PROTECTION_DOMAIN) + private String protectionDomain; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_REF = "secretRef"; + @SerializedName(SERIALIZED_NAME_SECRET_REF) + private V1ScanSpecScaleIOSecretRef secretRef; + + public static final String SERIALIZED_NAME_SSL_ENABLED = "sslEnabled"; + @SerializedName(SERIALIZED_NAME_SSL_ENABLED) + private Boolean sslEnabled; + + public static final String SERIALIZED_NAME_STORAGE_MODE = "storageMode"; + @SerializedName(SERIALIZED_NAME_STORAGE_MODE) + private String storageMode; + + public static final String SERIALIZED_NAME_STORAGE_POOL = "storagePool"; + @SerializedName(SERIALIZED_NAME_STORAGE_POOL) + private String storagePool; + + public static final String SERIALIZED_NAME_SYSTEM = "system"; + @SerializedName(SERIALIZED_NAME_SYSTEM) + private String system; + + public static final String SERIALIZED_NAME_VOLUME_NAME = "volumeName"; + @SerializedName(SERIALIZED_NAME_VOLUME_NAME) + private String volumeName; + + + public V1ScanSpecScaleIO fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\". + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecScaleIO gateway(String gateway) { + + this.gateway = gateway; + return this; + } + + /** + * The host address of the ScaleIO API Gateway. + * @return gateway + **/ + @ApiModelProperty(required = true, value = "The host address of the ScaleIO API Gateway.") + + public String getGateway() { + return gateway; + } + + + public void setGateway(String gateway) { + this.gateway = gateway; + } + + + public V1ScanSpecScaleIO protectionDomain(String protectionDomain) { + + this.protectionDomain = protectionDomain; + return this; + } + + /** + * The name of the ScaleIO Protection Domain for the configured storage. + * @return protectionDomain + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The name of the ScaleIO Protection Domain for the configured storage.") + + public String getProtectionDomain() { + return protectionDomain; + } + + + public void setProtectionDomain(String protectionDomain) { + this.protectionDomain = protectionDomain; + } + + + public V1ScanSpecScaleIO readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecScaleIO secretRef(V1ScanSpecScaleIOSecretRef secretRef) { + + this.secretRef = secretRef; + return this; + } + + /** + * Get secretRef + * @return secretRef + **/ + @ApiModelProperty(required = true, value = "") + + public V1ScanSpecScaleIOSecretRef getSecretRef() { + return secretRef; + } + + + public void setSecretRef(V1ScanSpecScaleIOSecretRef secretRef) { + this.secretRef = secretRef; + } + + + public V1ScanSpecScaleIO sslEnabled(Boolean sslEnabled) { + + this.sslEnabled = sslEnabled; + return this; + } + + /** + * Flag to enable/disable SSL communication with Gateway, default false + * @return sslEnabled + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Flag to enable/disable SSL communication with Gateway, default false") + + public Boolean getSslEnabled() { + return sslEnabled; + } + + + public void setSslEnabled(Boolean sslEnabled) { + this.sslEnabled = sslEnabled; + } + + + public V1ScanSpecScaleIO storageMode(String storageMode) { + + this.storageMode = storageMode; + return this; + } + + /** + * Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + * @return storageMode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.") + + public String getStorageMode() { + return storageMode; + } + + + public void setStorageMode(String storageMode) { + this.storageMode = storageMode; + } + + + public V1ScanSpecScaleIO storagePool(String storagePool) { + + this.storagePool = storagePool; + return this; + } + + /** + * The ScaleIO Storage Pool associated with the protection domain. + * @return storagePool + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The ScaleIO Storage Pool associated with the protection domain.") + + public String getStoragePool() { + return storagePool; + } + + + public void setStoragePool(String storagePool) { + this.storagePool = storagePool; + } + + + public V1ScanSpecScaleIO system(String system) { + + this.system = system; + return this; + } + + /** + * The name of the storage system as configured in ScaleIO. + * @return system + **/ + @ApiModelProperty(required = true, value = "The name of the storage system as configured in ScaleIO.") + + public String getSystem() { + return system; + } + + + public void setSystem(String system) { + this.system = system; + } + + + public V1ScanSpecScaleIO volumeName(String volumeName) { + + this.volumeName = volumeName; + return this; + } + + /** + * The name of a volume already created in the ScaleIO system that is associated with this volume source. + * @return volumeName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The name of a volume already created in the ScaleIO system that is associated with this volume source.") + + public String getVolumeName() { + return volumeName; + } + + + public void setVolumeName(String volumeName) { + this.volumeName = volumeName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecScaleIO v1ScanSpecScaleIO = (V1ScanSpecScaleIO) o; + return Objects.equals(this.fsType, v1ScanSpecScaleIO.fsType) && + Objects.equals(this.gateway, v1ScanSpecScaleIO.gateway) && + Objects.equals(this.protectionDomain, v1ScanSpecScaleIO.protectionDomain) && + Objects.equals(this.readOnly, v1ScanSpecScaleIO.readOnly) && + Objects.equals(this.secretRef, v1ScanSpecScaleIO.secretRef) && + Objects.equals(this.sslEnabled, v1ScanSpecScaleIO.sslEnabled) && + Objects.equals(this.storageMode, v1ScanSpecScaleIO.storageMode) && + Objects.equals(this.storagePool, v1ScanSpecScaleIO.storagePool) && + Objects.equals(this.system, v1ScanSpecScaleIO.system) && + Objects.equals(this.volumeName, v1ScanSpecScaleIO.volumeName); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, gateway, protectionDomain, readOnly, secretRef, sslEnabled, storageMode, storagePool, system, volumeName); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecScaleIO {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); + sb.append(" protectionDomain: ").append(toIndentedString(protectionDomain)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretRef: ").append(toIndentedString(secretRef)).append("\n"); + sb.append(" sslEnabled: ").append(toIndentedString(sslEnabled)).append("\n"); + sb.append(" storageMode: ").append(toIndentedString(storageMode)).append("\n"); + sb.append(" storagePool: ").append(toIndentedString(storagePool)).append("\n"); + sb.append(" system: ").append(toIndentedString(system)).append("\n"); + sb.append(" volumeName: ").append(toIndentedString(volumeName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecScaleIOSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecScaleIOSecretRef.java new file mode 100644 index 0000000000..f556f0c61e --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecScaleIOSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + */ +@ApiModel(description = "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecScaleIOSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecScaleIOSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecScaleIOSecretRef v1ScanSpecScaleIOSecretRef = (V1ScanSpecScaleIOSecretRef) o; + return Objects.equals(this.name, v1ScanSpecScaleIOSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecScaleIOSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecSecret.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecSecret.java new file mode 100644 index 0000000000..25cfe0307d --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecSecret.java @@ -0,0 +1,198 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecConfigMapItems; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + */ +@ApiModel(description = "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecSecret { + public static final String SERIALIZED_NAME_DEFAULT_MODE = "defaultMode"; + @SerializedName(SERIALIZED_NAME_DEFAULT_MODE) + private Integer defaultMode; + + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items = null; + + public static final String SERIALIZED_NAME_OPTIONAL = "optional"; + @SerializedName(SERIALIZED_NAME_OPTIONAL) + private Boolean optional; + + public static final String SERIALIZED_NAME_SECRET_NAME = "secretName"; + @SerializedName(SERIALIZED_NAME_SECRET_NAME) + private String secretName; + + + public V1ScanSpecSecret defaultMode(Integer defaultMode) { + + this.defaultMode = defaultMode; + return this; + } + + /** + * Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * @return defaultMode + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.") + + public Integer getDefaultMode() { + return defaultMode; + } + + + public void setDefaultMode(Integer defaultMode) { + this.defaultMode = defaultMode; + } + + + public V1ScanSpecSecret items(List items) { + + this.items = items; + return this; + } + + public V1ScanSpecSecret addItemsItem(V1ScanSpecConfigMapItems itemsItem) { + if (this.items == null) { + this.items = new ArrayList(); + } + this.items.add(itemsItem); + return this; + } + + /** + * If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + * @return items + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.") + + public List getItems() { + return items; + } + + + public void setItems(List items) { + this.items = items; + } + + + public V1ScanSpecSecret optional(Boolean optional) { + + this.optional = optional; + return this; + } + + /** + * Specify whether the Secret or its keys must be defined + * @return optional + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Specify whether the Secret or its keys must be defined") + + public Boolean getOptional() { + return optional; + } + + + public void setOptional(Boolean optional) { + this.optional = optional; + } + + + public V1ScanSpecSecret secretName(String secretName) { + + this.secretName = secretName; + return this; + } + + /** + * Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + * @return secretName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret") + + public String getSecretName() { + return secretName; + } + + + public void setSecretName(String secretName) { + this.secretName = secretName; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecSecret v1ScanSpecSecret = (V1ScanSpecSecret) o; + return Objects.equals(this.defaultMode, v1ScanSpecSecret.defaultMode) && + Objects.equals(this.items, v1ScanSpecSecret.items) && + Objects.equals(this.optional, v1ScanSpecSecret.optional) && + Objects.equals(this.secretName, v1ScanSpecSecret.secretName); + } + + @Override + public int hashCode() { + return Objects.hash(defaultMode, items, optional, secretName); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecSecret {\n"); + sb.append(" defaultMode: ").append(toIndentedString(defaultMode)).append("\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" optional: ").append(toIndentedString(optional)).append("\n"); + sb.append(" secretName: ").append(toIndentedString(secretName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecStorageos.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecStorageos.java new file mode 100644 index 0000000000..e2ad6b656c --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecStorageos.java @@ -0,0 +1,217 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecStorageosSecretRef; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + */ +@ApiModel(description = "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecStorageos { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SECRET_REF = "secretRef"; + @SerializedName(SERIALIZED_NAME_SECRET_REF) + private V1ScanSpecStorageosSecretRef secretRef; + + public static final String SERIALIZED_NAME_VOLUME_NAME = "volumeName"; + @SerializedName(SERIALIZED_NAME_VOLUME_NAME) + private String volumeName; + + public static final String SERIALIZED_NAME_VOLUME_NAMESPACE = "volumeNamespace"; + @SerializedName(SERIALIZED_NAME_VOLUME_NAMESPACE) + private String volumeNamespace; + + + public V1ScanSpecStorageos fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecStorageos readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecStorageos secretRef(V1ScanSpecStorageosSecretRef secretRef) { + + this.secretRef = secretRef; + return this; + } + + /** + * Get secretRef + * @return secretRef + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecStorageosSecretRef getSecretRef() { + return secretRef; + } + + + public void setSecretRef(V1ScanSpecStorageosSecretRef secretRef) { + this.secretRef = secretRef; + } + + + public V1ScanSpecStorageos volumeName(String volumeName) { + + this.volumeName = volumeName; + return this; + } + + /** + * VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + * @return volumeName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.") + + public String getVolumeName() { + return volumeName; + } + + + public void setVolumeName(String volumeName) { + this.volumeName = volumeName; + } + + + public V1ScanSpecStorageos volumeNamespace(String volumeNamespace) { + + this.volumeNamespace = volumeNamespace; + return this; + } + + /** + * VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + * @return volumeNamespace + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.") + + public String getVolumeNamespace() { + return volumeNamespace; + } + + + public void setVolumeNamespace(String volumeNamespace) { + this.volumeNamespace = volumeNamespace; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecStorageos v1ScanSpecStorageos = (V1ScanSpecStorageos) o; + return Objects.equals(this.fsType, v1ScanSpecStorageos.fsType) && + Objects.equals(this.readOnly, v1ScanSpecStorageos.readOnly) && + Objects.equals(this.secretRef, v1ScanSpecStorageos.secretRef) && + Objects.equals(this.volumeName, v1ScanSpecStorageos.volumeName) && + Objects.equals(this.volumeNamespace, v1ScanSpecStorageos.volumeNamespace); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, readOnly, secretRef, volumeName, volumeNamespace); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecStorageos {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" secretRef: ").append(toIndentedString(secretRef)).append("\n"); + sb.append(" volumeName: ").append(toIndentedString(volumeName)).append("\n"); + sb.append(" volumeNamespace: ").append(toIndentedString(volumeNamespace)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecStorageosSecretRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecStorageosSecretRef.java new file mode 100644 index 0000000000..f267e9b4f1 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecStorageosSecretRef.java @@ -0,0 +1,100 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + */ +@ApiModel(description = "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecStorageosSecretRef { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public V1ScanSpecStorageosSecretRef name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecStorageosSecretRef v1ScanSpecStorageosSecretRef = (V1ScanSpecStorageosSecretRef) o; + return Objects.equals(this.name, v1ScanSpecStorageosSecretRef.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecStorageosSecretRef {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFrom.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFrom.java index b6080bb6ff..9e40d4d624 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFrom.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFrom.java @@ -32,7 +32,7 @@ * Source for the environment variable's value. Cannot be used if value is not empty. */ @ApiModel(description = "Source for the environment variable's value. Cannot be used if value is not empty.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecValueFrom { public static final String SERIALIZED_NAME_CONFIG_MAP_KEY_REF = "configMapKeyRef"; @SerializedName(SERIALIZED_NAME_CONFIG_MAP_KEY_REF) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromConfigMapKeyRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromConfigMapKeyRef.java index 42f4778044..cabf13c98a 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromConfigMapKeyRef.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromConfigMapKeyRef.java @@ -28,7 +28,7 @@ * Selects a key of a ConfigMap. */ @ApiModel(description = "Selects a key of a ConfigMap.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecValueFromConfigMapKeyRef { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromFieldRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromFieldRef.java index eaab2fa603..75827f8318 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromFieldRef.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromFieldRef.java @@ -28,7 +28,7 @@ * Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. */ @ApiModel(description = "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecValueFromFieldRef { public static final String SERIALIZED_NAME_API_VERSION = "apiVersion"; @SerializedName(SERIALIZED_NAME_API_VERSION) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromResourceFieldRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromResourceFieldRef.java index d5beae2fb6..fcee30c5bd 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromResourceFieldRef.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromResourceFieldRef.java @@ -28,7 +28,7 @@ * Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. */ @ApiModel(description = "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecValueFromResourceFieldRef { public static final String SERIALIZED_NAME_CONTAINER_NAME = "containerName"; @SerializedName(SERIALIZED_NAME_CONTAINER_NAME) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromSecretKeyRef.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromSecretKeyRef.java index 94caec64b0..10f4ad6824 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromSecretKeyRef.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecValueFromSecretKeyRef.java @@ -28,7 +28,7 @@ * Selects a key of a secret in the pod's namespace */ @ApiModel(description = "Selects a key of a secret in the pod's namespace") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanSpecValueFromSecretKeyRef { public static final String SERIALIZED_NAME_KEY = "key"; @SerializedName(SERIALIZED_NAME_KEY) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVolumeMounts.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVolumeMounts.java new file mode 100644 index 0000000000..fcca7f2707 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVolumeMounts.java @@ -0,0 +1,243 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * VolumeMount describes a mounting of a Volume within a container. + */ +@ApiModel(description = "VolumeMount describes a mounting of a Volume within a container.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecVolumeMounts { + public static final String SERIALIZED_NAME_MOUNT_PATH = "mountPath"; + @SerializedName(SERIALIZED_NAME_MOUNT_PATH) + private String mountPath; + + public static final String SERIALIZED_NAME_MOUNT_PROPAGATION = "mountPropagation"; + @SerializedName(SERIALIZED_NAME_MOUNT_PROPAGATION) + private String mountPropagation; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_READ_ONLY = "readOnly"; + @SerializedName(SERIALIZED_NAME_READ_ONLY) + private Boolean readOnly; + + public static final String SERIALIZED_NAME_SUB_PATH = "subPath"; + @SerializedName(SERIALIZED_NAME_SUB_PATH) + private String subPath; + + public static final String SERIALIZED_NAME_SUB_PATH_EXPR = "subPathExpr"; + @SerializedName(SERIALIZED_NAME_SUB_PATH_EXPR) + private String subPathExpr; + + + public V1ScanSpecVolumeMounts mountPath(String mountPath) { + + this.mountPath = mountPath; + return this; + } + + /** + * Path within the container at which the volume should be mounted. Must not contain ':'. + * @return mountPath + **/ + @ApiModelProperty(required = true, value = "Path within the container at which the volume should be mounted. Must not contain ':'.") + + public String getMountPath() { + return mountPath; + } + + + public void setMountPath(String mountPath) { + this.mountPath = mountPath; + } + + + public V1ScanSpecVolumeMounts mountPropagation(String mountPropagation) { + + this.mountPropagation = mountPropagation; + return this; + } + + /** + * mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + * @return mountPropagation + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.") + + public String getMountPropagation() { + return mountPropagation; + } + + + public void setMountPropagation(String mountPropagation) { + this.mountPropagation = mountPropagation; + } + + + public V1ScanSpecVolumeMounts name(String name) { + + this.name = name; + return this; + } + + /** + * This must match the Name of a Volume. + * @return name + **/ + @ApiModelProperty(required = true, value = "This must match the Name of a Volume.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public V1ScanSpecVolumeMounts readOnly(Boolean readOnly) { + + this.readOnly = readOnly; + return this; + } + + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + * @return readOnly + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.") + + public Boolean getReadOnly() { + return readOnly; + } + + + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + + public V1ScanSpecVolumeMounts subPath(String subPath) { + + this.subPath = subPath; + return this; + } + + /** + * Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root). + * @return subPath + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).") + + public String getSubPath() { + return subPath; + } + + + public void setSubPath(String subPath) { + this.subPath = subPath; + } + + + public V1ScanSpecVolumeMounts subPathExpr(String subPathExpr) { + + this.subPathExpr = subPathExpr; + return this; + } + + /** + * Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive. + * @return subPathExpr + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.") + + public String getSubPathExpr() { + return subPathExpr; + } + + + public void setSubPathExpr(String subPathExpr) { + this.subPathExpr = subPathExpr; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecVolumeMounts v1ScanSpecVolumeMounts = (V1ScanSpecVolumeMounts) o; + return Objects.equals(this.mountPath, v1ScanSpecVolumeMounts.mountPath) && + Objects.equals(this.mountPropagation, v1ScanSpecVolumeMounts.mountPropagation) && + Objects.equals(this.name, v1ScanSpecVolumeMounts.name) && + Objects.equals(this.readOnly, v1ScanSpecVolumeMounts.readOnly) && + Objects.equals(this.subPath, v1ScanSpecVolumeMounts.subPath) && + Objects.equals(this.subPathExpr, v1ScanSpecVolumeMounts.subPathExpr); + } + + @Override + public int hashCode() { + return Objects.hash(mountPath, mountPropagation, name, readOnly, subPath, subPathExpr); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecVolumeMounts {\n"); + sb.append(" mountPath: ").append(toIndentedString(mountPath)).append("\n"); + sb.append(" mountPropagation: ").append(toIndentedString(mountPropagation)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" readOnly: ").append(toIndentedString(readOnly)).append("\n"); + sb.append(" subPath: ").append(toIndentedString(subPath)).append("\n"); + sb.append(" subPathExpr: ").append(toIndentedString(subPathExpr)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVolumes.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVolumes.java new file mode 100644 index 0000000000..ebb315b233 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVolumes.java @@ -0,0 +1,939 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.securecodebox.models.V1ScanSpecAwsElasticBlockStore; +import io.securecodebox.models.V1ScanSpecAzureDisk; +import io.securecodebox.models.V1ScanSpecAzureFile; +import io.securecodebox.models.V1ScanSpecCephfs; +import io.securecodebox.models.V1ScanSpecCinder; +import io.securecodebox.models.V1ScanSpecConfigMap; +import io.securecodebox.models.V1ScanSpecCsi; +import io.securecodebox.models.V1ScanSpecDownwardAPI; +import io.securecodebox.models.V1ScanSpecEmptyDir; +import io.securecodebox.models.V1ScanSpecFc; +import io.securecodebox.models.V1ScanSpecFlexVolume; +import io.securecodebox.models.V1ScanSpecFlocker; +import io.securecodebox.models.V1ScanSpecGcePersistentDisk; +import io.securecodebox.models.V1ScanSpecGitRepo; +import io.securecodebox.models.V1ScanSpecGlusterfs; +import io.securecodebox.models.V1ScanSpecHostPath; +import io.securecodebox.models.V1ScanSpecIscsi; +import io.securecodebox.models.V1ScanSpecNfs; +import io.securecodebox.models.V1ScanSpecPersistentVolumeClaim; +import io.securecodebox.models.V1ScanSpecPhotonPersistentDisk; +import io.securecodebox.models.V1ScanSpecPortworxVolume; +import io.securecodebox.models.V1ScanSpecProjected; +import io.securecodebox.models.V1ScanSpecQuobyte; +import io.securecodebox.models.V1ScanSpecRbd; +import io.securecodebox.models.V1ScanSpecScaleIO; +import io.securecodebox.models.V1ScanSpecSecret; +import io.securecodebox.models.V1ScanSpecStorageos; +import io.securecodebox.models.V1ScanSpecVsphereVolume; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Volume represents a named volume in a pod that may be accessed by any container in the pod. + */ +@ApiModel(description = "Volume represents a named volume in a pod that may be accessed by any container in the pod.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecVolumes { + public static final String SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE = "awsElasticBlockStore"; + @SerializedName(SERIALIZED_NAME_AWS_ELASTIC_BLOCK_STORE) + private V1ScanSpecAwsElasticBlockStore awsElasticBlockStore; + + public static final String SERIALIZED_NAME_AZURE_DISK = "azureDisk"; + @SerializedName(SERIALIZED_NAME_AZURE_DISK) + private V1ScanSpecAzureDisk azureDisk; + + public static final String SERIALIZED_NAME_AZURE_FILE = "azureFile"; + @SerializedName(SERIALIZED_NAME_AZURE_FILE) + private V1ScanSpecAzureFile azureFile; + + public static final String SERIALIZED_NAME_CEPHFS = "cephfs"; + @SerializedName(SERIALIZED_NAME_CEPHFS) + private V1ScanSpecCephfs cephfs; + + public static final String SERIALIZED_NAME_CINDER = "cinder"; + @SerializedName(SERIALIZED_NAME_CINDER) + private V1ScanSpecCinder cinder; + + public static final String SERIALIZED_NAME_CONFIG_MAP = "configMap"; + @SerializedName(SERIALIZED_NAME_CONFIG_MAP) + private V1ScanSpecConfigMap configMap; + + public static final String SERIALIZED_NAME_CSI = "csi"; + @SerializedName(SERIALIZED_NAME_CSI) + private V1ScanSpecCsi csi; + + public static final String SERIALIZED_NAME_DOWNWARD_A_P_I = "downwardAPI"; + @SerializedName(SERIALIZED_NAME_DOWNWARD_A_P_I) + private V1ScanSpecDownwardAPI downwardAPI; + + public static final String SERIALIZED_NAME_EMPTY_DIR = "emptyDir"; + @SerializedName(SERIALIZED_NAME_EMPTY_DIR) + private V1ScanSpecEmptyDir emptyDir; + + public static final String SERIALIZED_NAME_FC = "fc"; + @SerializedName(SERIALIZED_NAME_FC) + private V1ScanSpecFc fc; + + public static final String SERIALIZED_NAME_FLEX_VOLUME = "flexVolume"; + @SerializedName(SERIALIZED_NAME_FLEX_VOLUME) + private V1ScanSpecFlexVolume flexVolume; + + public static final String SERIALIZED_NAME_FLOCKER = "flocker"; + @SerializedName(SERIALIZED_NAME_FLOCKER) + private V1ScanSpecFlocker flocker; + + public static final String SERIALIZED_NAME_GCE_PERSISTENT_DISK = "gcePersistentDisk"; + @SerializedName(SERIALIZED_NAME_GCE_PERSISTENT_DISK) + private V1ScanSpecGcePersistentDisk gcePersistentDisk; + + public static final String SERIALIZED_NAME_GIT_REPO = "gitRepo"; + @SerializedName(SERIALIZED_NAME_GIT_REPO) + private V1ScanSpecGitRepo gitRepo; + + public static final String SERIALIZED_NAME_GLUSTERFS = "glusterfs"; + @SerializedName(SERIALIZED_NAME_GLUSTERFS) + private V1ScanSpecGlusterfs glusterfs; + + public static final String SERIALIZED_NAME_HOST_PATH = "hostPath"; + @SerializedName(SERIALIZED_NAME_HOST_PATH) + private V1ScanSpecHostPath hostPath; + + public static final String SERIALIZED_NAME_ISCSI = "iscsi"; + @SerializedName(SERIALIZED_NAME_ISCSI) + private V1ScanSpecIscsi iscsi; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_NFS = "nfs"; + @SerializedName(SERIALIZED_NAME_NFS) + private V1ScanSpecNfs nfs; + + public static final String SERIALIZED_NAME_PERSISTENT_VOLUME_CLAIM = "persistentVolumeClaim"; + @SerializedName(SERIALIZED_NAME_PERSISTENT_VOLUME_CLAIM) + private V1ScanSpecPersistentVolumeClaim persistentVolumeClaim; + + public static final String SERIALIZED_NAME_PHOTON_PERSISTENT_DISK = "photonPersistentDisk"; + @SerializedName(SERIALIZED_NAME_PHOTON_PERSISTENT_DISK) + private V1ScanSpecPhotonPersistentDisk photonPersistentDisk; + + public static final String SERIALIZED_NAME_PORTWORX_VOLUME = "portworxVolume"; + @SerializedName(SERIALIZED_NAME_PORTWORX_VOLUME) + private V1ScanSpecPortworxVolume portworxVolume; + + public static final String SERIALIZED_NAME_PROJECTED = "projected"; + @SerializedName(SERIALIZED_NAME_PROJECTED) + private V1ScanSpecProjected projected; + + public static final String SERIALIZED_NAME_QUOBYTE = "quobyte"; + @SerializedName(SERIALIZED_NAME_QUOBYTE) + private V1ScanSpecQuobyte quobyte; + + public static final String SERIALIZED_NAME_RBD = "rbd"; + @SerializedName(SERIALIZED_NAME_RBD) + private V1ScanSpecRbd rbd; + + public static final String SERIALIZED_NAME_SCALE_I_O = "scaleIO"; + @SerializedName(SERIALIZED_NAME_SCALE_I_O) + private V1ScanSpecScaleIO scaleIO; + + public static final String SERIALIZED_NAME_SECRET = "secret"; + @SerializedName(SERIALIZED_NAME_SECRET) + private V1ScanSpecSecret secret; + + public static final String SERIALIZED_NAME_STORAGEOS = "storageos"; + @SerializedName(SERIALIZED_NAME_STORAGEOS) + private V1ScanSpecStorageos storageos; + + public static final String SERIALIZED_NAME_VSPHERE_VOLUME = "vsphereVolume"; + @SerializedName(SERIALIZED_NAME_VSPHERE_VOLUME) + private V1ScanSpecVsphereVolume vsphereVolume; + + + public V1ScanSpecVolumes awsElasticBlockStore(V1ScanSpecAwsElasticBlockStore awsElasticBlockStore) { + + this.awsElasticBlockStore = awsElasticBlockStore; + return this; + } + + /** + * Get awsElasticBlockStore + * @return awsElasticBlockStore + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecAwsElasticBlockStore getAwsElasticBlockStore() { + return awsElasticBlockStore; + } + + + public void setAwsElasticBlockStore(V1ScanSpecAwsElasticBlockStore awsElasticBlockStore) { + this.awsElasticBlockStore = awsElasticBlockStore; + } + + + public V1ScanSpecVolumes azureDisk(V1ScanSpecAzureDisk azureDisk) { + + this.azureDisk = azureDisk; + return this; + } + + /** + * Get azureDisk + * @return azureDisk + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecAzureDisk getAzureDisk() { + return azureDisk; + } + + + public void setAzureDisk(V1ScanSpecAzureDisk azureDisk) { + this.azureDisk = azureDisk; + } + + + public V1ScanSpecVolumes azureFile(V1ScanSpecAzureFile azureFile) { + + this.azureFile = azureFile; + return this; + } + + /** + * Get azureFile + * @return azureFile + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecAzureFile getAzureFile() { + return azureFile; + } + + + public void setAzureFile(V1ScanSpecAzureFile azureFile) { + this.azureFile = azureFile; + } + + + public V1ScanSpecVolumes cephfs(V1ScanSpecCephfs cephfs) { + + this.cephfs = cephfs; + return this; + } + + /** + * Get cephfs + * @return cephfs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecCephfs getCephfs() { + return cephfs; + } + + + public void setCephfs(V1ScanSpecCephfs cephfs) { + this.cephfs = cephfs; + } + + + public V1ScanSpecVolumes cinder(V1ScanSpecCinder cinder) { + + this.cinder = cinder; + return this; + } + + /** + * Get cinder + * @return cinder + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecCinder getCinder() { + return cinder; + } + + + public void setCinder(V1ScanSpecCinder cinder) { + this.cinder = cinder; + } + + + public V1ScanSpecVolumes configMap(V1ScanSpecConfigMap configMap) { + + this.configMap = configMap; + return this; + } + + /** + * Get configMap + * @return configMap + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecConfigMap getConfigMap() { + return configMap; + } + + + public void setConfigMap(V1ScanSpecConfigMap configMap) { + this.configMap = configMap; + } + + + public V1ScanSpecVolumes csi(V1ScanSpecCsi csi) { + + this.csi = csi; + return this; + } + + /** + * Get csi + * @return csi + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecCsi getCsi() { + return csi; + } + + + public void setCsi(V1ScanSpecCsi csi) { + this.csi = csi; + } + + + public V1ScanSpecVolumes downwardAPI(V1ScanSpecDownwardAPI downwardAPI) { + + this.downwardAPI = downwardAPI; + return this; + } + + /** + * Get downwardAPI + * @return downwardAPI + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecDownwardAPI getDownwardAPI() { + return downwardAPI; + } + + + public void setDownwardAPI(V1ScanSpecDownwardAPI downwardAPI) { + this.downwardAPI = downwardAPI; + } + + + public V1ScanSpecVolumes emptyDir(V1ScanSpecEmptyDir emptyDir) { + + this.emptyDir = emptyDir; + return this; + } + + /** + * Get emptyDir + * @return emptyDir + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecEmptyDir getEmptyDir() { + return emptyDir; + } + + + public void setEmptyDir(V1ScanSpecEmptyDir emptyDir) { + this.emptyDir = emptyDir; + } + + + public V1ScanSpecVolumes fc(V1ScanSpecFc fc) { + + this.fc = fc; + return this; + } + + /** + * Get fc + * @return fc + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecFc getFc() { + return fc; + } + + + public void setFc(V1ScanSpecFc fc) { + this.fc = fc; + } + + + public V1ScanSpecVolumes flexVolume(V1ScanSpecFlexVolume flexVolume) { + + this.flexVolume = flexVolume; + return this; + } + + /** + * Get flexVolume + * @return flexVolume + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecFlexVolume getFlexVolume() { + return flexVolume; + } + + + public void setFlexVolume(V1ScanSpecFlexVolume flexVolume) { + this.flexVolume = flexVolume; + } + + + public V1ScanSpecVolumes flocker(V1ScanSpecFlocker flocker) { + + this.flocker = flocker; + return this; + } + + /** + * Get flocker + * @return flocker + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecFlocker getFlocker() { + return flocker; + } + + + public void setFlocker(V1ScanSpecFlocker flocker) { + this.flocker = flocker; + } + + + public V1ScanSpecVolumes gcePersistentDisk(V1ScanSpecGcePersistentDisk gcePersistentDisk) { + + this.gcePersistentDisk = gcePersistentDisk; + return this; + } + + /** + * Get gcePersistentDisk + * @return gcePersistentDisk + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecGcePersistentDisk getGcePersistentDisk() { + return gcePersistentDisk; + } + + + public void setGcePersistentDisk(V1ScanSpecGcePersistentDisk gcePersistentDisk) { + this.gcePersistentDisk = gcePersistentDisk; + } + + + public V1ScanSpecVolumes gitRepo(V1ScanSpecGitRepo gitRepo) { + + this.gitRepo = gitRepo; + return this; + } + + /** + * Get gitRepo + * @return gitRepo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecGitRepo getGitRepo() { + return gitRepo; + } + + + public void setGitRepo(V1ScanSpecGitRepo gitRepo) { + this.gitRepo = gitRepo; + } + + + public V1ScanSpecVolumes glusterfs(V1ScanSpecGlusterfs glusterfs) { + + this.glusterfs = glusterfs; + return this; + } + + /** + * Get glusterfs + * @return glusterfs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecGlusterfs getGlusterfs() { + return glusterfs; + } + + + public void setGlusterfs(V1ScanSpecGlusterfs glusterfs) { + this.glusterfs = glusterfs; + } + + + public V1ScanSpecVolumes hostPath(V1ScanSpecHostPath hostPath) { + + this.hostPath = hostPath; + return this; + } + + /** + * Get hostPath + * @return hostPath + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecHostPath getHostPath() { + return hostPath; + } + + + public void setHostPath(V1ScanSpecHostPath hostPath) { + this.hostPath = hostPath; + } + + + public V1ScanSpecVolumes iscsi(V1ScanSpecIscsi iscsi) { + + this.iscsi = iscsi; + return this; + } + + /** + * Get iscsi + * @return iscsi + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecIscsi getIscsi() { + return iscsi; + } + + + public void setIscsi(V1ScanSpecIscsi iscsi) { + this.iscsi = iscsi; + } + + + public V1ScanSpecVolumes name(String name) { + + this.name = name; + return this; + } + + /** + * Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * @return name + **/ + @ApiModelProperty(required = true, value = "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public V1ScanSpecVolumes nfs(V1ScanSpecNfs nfs) { + + this.nfs = nfs; + return this; + } + + /** + * Get nfs + * @return nfs + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecNfs getNfs() { + return nfs; + } + + + public void setNfs(V1ScanSpecNfs nfs) { + this.nfs = nfs; + } + + + public V1ScanSpecVolumes persistentVolumeClaim(V1ScanSpecPersistentVolumeClaim persistentVolumeClaim) { + + this.persistentVolumeClaim = persistentVolumeClaim; + return this; + } + + /** + * Get persistentVolumeClaim + * @return persistentVolumeClaim + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecPersistentVolumeClaim getPersistentVolumeClaim() { + return persistentVolumeClaim; + } + + + public void setPersistentVolumeClaim(V1ScanSpecPersistentVolumeClaim persistentVolumeClaim) { + this.persistentVolumeClaim = persistentVolumeClaim; + } + + + public V1ScanSpecVolumes photonPersistentDisk(V1ScanSpecPhotonPersistentDisk photonPersistentDisk) { + + this.photonPersistentDisk = photonPersistentDisk; + return this; + } + + /** + * Get photonPersistentDisk + * @return photonPersistentDisk + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecPhotonPersistentDisk getPhotonPersistentDisk() { + return photonPersistentDisk; + } + + + public void setPhotonPersistentDisk(V1ScanSpecPhotonPersistentDisk photonPersistentDisk) { + this.photonPersistentDisk = photonPersistentDisk; + } + + + public V1ScanSpecVolumes portworxVolume(V1ScanSpecPortworxVolume portworxVolume) { + + this.portworxVolume = portworxVolume; + return this; + } + + /** + * Get portworxVolume + * @return portworxVolume + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecPortworxVolume getPortworxVolume() { + return portworxVolume; + } + + + public void setPortworxVolume(V1ScanSpecPortworxVolume portworxVolume) { + this.portworxVolume = portworxVolume; + } + + + public V1ScanSpecVolumes projected(V1ScanSpecProjected projected) { + + this.projected = projected; + return this; + } + + /** + * Get projected + * @return projected + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecProjected getProjected() { + return projected; + } + + + public void setProjected(V1ScanSpecProjected projected) { + this.projected = projected; + } + + + public V1ScanSpecVolumes quobyte(V1ScanSpecQuobyte quobyte) { + + this.quobyte = quobyte; + return this; + } + + /** + * Get quobyte + * @return quobyte + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecQuobyte getQuobyte() { + return quobyte; + } + + + public void setQuobyte(V1ScanSpecQuobyte quobyte) { + this.quobyte = quobyte; + } + + + public V1ScanSpecVolumes rbd(V1ScanSpecRbd rbd) { + + this.rbd = rbd; + return this; + } + + /** + * Get rbd + * @return rbd + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecRbd getRbd() { + return rbd; + } + + + public void setRbd(V1ScanSpecRbd rbd) { + this.rbd = rbd; + } + + + public V1ScanSpecVolumes scaleIO(V1ScanSpecScaleIO scaleIO) { + + this.scaleIO = scaleIO; + return this; + } + + /** + * Get scaleIO + * @return scaleIO + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecScaleIO getScaleIO() { + return scaleIO; + } + + + public void setScaleIO(V1ScanSpecScaleIO scaleIO) { + this.scaleIO = scaleIO; + } + + + public V1ScanSpecVolumes secret(V1ScanSpecSecret secret) { + + this.secret = secret; + return this; + } + + /** + * Get secret + * @return secret + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecSecret getSecret() { + return secret; + } + + + public void setSecret(V1ScanSpecSecret secret) { + this.secret = secret; + } + + + public V1ScanSpecVolumes storageos(V1ScanSpecStorageos storageos) { + + this.storageos = storageos; + return this; + } + + /** + * Get storageos + * @return storageos + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecStorageos getStorageos() { + return storageos; + } + + + public void setStorageos(V1ScanSpecStorageos storageos) { + this.storageos = storageos; + } + + + public V1ScanSpecVolumes vsphereVolume(V1ScanSpecVsphereVolume vsphereVolume) { + + this.vsphereVolume = vsphereVolume; + return this; + } + + /** + * Get vsphereVolume + * @return vsphereVolume + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public V1ScanSpecVsphereVolume getVsphereVolume() { + return vsphereVolume; + } + + + public void setVsphereVolume(V1ScanSpecVsphereVolume vsphereVolume) { + this.vsphereVolume = vsphereVolume; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecVolumes v1ScanSpecVolumes = (V1ScanSpecVolumes) o; + return Objects.equals(this.awsElasticBlockStore, v1ScanSpecVolumes.awsElasticBlockStore) && + Objects.equals(this.azureDisk, v1ScanSpecVolumes.azureDisk) && + Objects.equals(this.azureFile, v1ScanSpecVolumes.azureFile) && + Objects.equals(this.cephfs, v1ScanSpecVolumes.cephfs) && + Objects.equals(this.cinder, v1ScanSpecVolumes.cinder) && + Objects.equals(this.configMap, v1ScanSpecVolumes.configMap) && + Objects.equals(this.csi, v1ScanSpecVolumes.csi) && + Objects.equals(this.downwardAPI, v1ScanSpecVolumes.downwardAPI) && + Objects.equals(this.emptyDir, v1ScanSpecVolumes.emptyDir) && + Objects.equals(this.fc, v1ScanSpecVolumes.fc) && + Objects.equals(this.flexVolume, v1ScanSpecVolumes.flexVolume) && + Objects.equals(this.flocker, v1ScanSpecVolumes.flocker) && + Objects.equals(this.gcePersistentDisk, v1ScanSpecVolumes.gcePersistentDisk) && + Objects.equals(this.gitRepo, v1ScanSpecVolumes.gitRepo) && + Objects.equals(this.glusterfs, v1ScanSpecVolumes.glusterfs) && + Objects.equals(this.hostPath, v1ScanSpecVolumes.hostPath) && + Objects.equals(this.iscsi, v1ScanSpecVolumes.iscsi) && + Objects.equals(this.name, v1ScanSpecVolumes.name) && + Objects.equals(this.nfs, v1ScanSpecVolumes.nfs) && + Objects.equals(this.persistentVolumeClaim, v1ScanSpecVolumes.persistentVolumeClaim) && + Objects.equals(this.photonPersistentDisk, v1ScanSpecVolumes.photonPersistentDisk) && + Objects.equals(this.portworxVolume, v1ScanSpecVolumes.portworxVolume) && + Objects.equals(this.projected, v1ScanSpecVolumes.projected) && + Objects.equals(this.quobyte, v1ScanSpecVolumes.quobyte) && + Objects.equals(this.rbd, v1ScanSpecVolumes.rbd) && + Objects.equals(this.scaleIO, v1ScanSpecVolumes.scaleIO) && + Objects.equals(this.secret, v1ScanSpecVolumes.secret) && + Objects.equals(this.storageos, v1ScanSpecVolumes.storageos) && + Objects.equals(this.vsphereVolume, v1ScanSpecVolumes.vsphereVolume); + } + + @Override + public int hashCode() { + return Objects.hash(awsElasticBlockStore, azureDisk, azureFile, cephfs, cinder, configMap, csi, downwardAPI, emptyDir, fc, flexVolume, flocker, gcePersistentDisk, gitRepo, glusterfs, hostPath, iscsi, name, nfs, persistentVolumeClaim, photonPersistentDisk, portworxVolume, projected, quobyte, rbd, scaleIO, secret, storageos, vsphereVolume); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecVolumes {\n"); + sb.append(" awsElasticBlockStore: ").append(toIndentedString(awsElasticBlockStore)).append("\n"); + sb.append(" azureDisk: ").append(toIndentedString(azureDisk)).append("\n"); + sb.append(" azureFile: ").append(toIndentedString(azureFile)).append("\n"); + sb.append(" cephfs: ").append(toIndentedString(cephfs)).append("\n"); + sb.append(" cinder: ").append(toIndentedString(cinder)).append("\n"); + sb.append(" configMap: ").append(toIndentedString(configMap)).append("\n"); + sb.append(" csi: ").append(toIndentedString(csi)).append("\n"); + sb.append(" downwardAPI: ").append(toIndentedString(downwardAPI)).append("\n"); + sb.append(" emptyDir: ").append(toIndentedString(emptyDir)).append("\n"); + sb.append(" fc: ").append(toIndentedString(fc)).append("\n"); + sb.append(" flexVolume: ").append(toIndentedString(flexVolume)).append("\n"); + sb.append(" flocker: ").append(toIndentedString(flocker)).append("\n"); + sb.append(" gcePersistentDisk: ").append(toIndentedString(gcePersistentDisk)).append("\n"); + sb.append(" gitRepo: ").append(toIndentedString(gitRepo)).append("\n"); + sb.append(" glusterfs: ").append(toIndentedString(glusterfs)).append("\n"); + sb.append(" hostPath: ").append(toIndentedString(hostPath)).append("\n"); + sb.append(" iscsi: ").append(toIndentedString(iscsi)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" nfs: ").append(toIndentedString(nfs)).append("\n"); + sb.append(" persistentVolumeClaim: ").append(toIndentedString(persistentVolumeClaim)).append("\n"); + sb.append(" photonPersistentDisk: ").append(toIndentedString(photonPersistentDisk)).append("\n"); + sb.append(" portworxVolume: ").append(toIndentedString(portworxVolume)).append("\n"); + sb.append(" projected: ").append(toIndentedString(projected)).append("\n"); + sb.append(" quobyte: ").append(toIndentedString(quobyte)).append("\n"); + sb.append(" rbd: ").append(toIndentedString(rbd)).append("\n"); + sb.append(" scaleIO: ").append(toIndentedString(scaleIO)).append("\n"); + sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); + sb.append(" storageos: ").append(toIndentedString(storageos)).append("\n"); + sb.append(" vsphereVolume: ").append(toIndentedString(vsphereVolume)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVsphereVolume.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVsphereVolume.java new file mode 100644 index 0000000000..63f6230930 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanSpecVsphereVolume.java @@ -0,0 +1,186 @@ +/* + * Kubernetes + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v1.18.2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package io.securecodebox.models; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + */ +@ApiModel(description = "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") +public class V1ScanSpecVsphereVolume { + public static final String SERIALIZED_NAME_FS_TYPE = "fsType"; + @SerializedName(SERIALIZED_NAME_FS_TYPE) + private String fsType; + + public static final String SERIALIZED_NAME_STORAGE_POLICY_I_D = "storagePolicyID"; + @SerializedName(SERIALIZED_NAME_STORAGE_POLICY_I_D) + private String storagePolicyID; + + public static final String SERIALIZED_NAME_STORAGE_POLICY_NAME = "storagePolicyName"; + @SerializedName(SERIALIZED_NAME_STORAGE_POLICY_NAME) + private String storagePolicyName; + + public static final String SERIALIZED_NAME_VOLUME_PATH = "volumePath"; + @SerializedName(SERIALIZED_NAME_VOLUME_PATH) + private String volumePath; + + + public V1ScanSpecVsphereVolume fsType(String fsType) { + + this.fsType = fsType; + return this; + } + + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * @return fsType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.") + + public String getFsType() { + return fsType; + } + + + public void setFsType(String fsType) { + this.fsType = fsType; + } + + + public V1ScanSpecVsphereVolume storagePolicyID(String storagePolicyID) { + + this.storagePolicyID = storagePolicyID; + return this; + } + + /** + * Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + * @return storagePolicyID + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.") + + public String getStoragePolicyID() { + return storagePolicyID; + } + + + public void setStoragePolicyID(String storagePolicyID) { + this.storagePolicyID = storagePolicyID; + } + + + public V1ScanSpecVsphereVolume storagePolicyName(String storagePolicyName) { + + this.storagePolicyName = storagePolicyName; + return this; + } + + /** + * Storage Policy Based Management (SPBM) profile name. + * @return storagePolicyName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Storage Policy Based Management (SPBM) profile name.") + + public String getStoragePolicyName() { + return storagePolicyName; + } + + + public void setStoragePolicyName(String storagePolicyName) { + this.storagePolicyName = storagePolicyName; + } + + + public V1ScanSpecVsphereVolume volumePath(String volumePath) { + + this.volumePath = volumePath; + return this; + } + + /** + * Path that identifies vSphere volume vmdk + * @return volumePath + **/ + @ApiModelProperty(required = true, value = "Path that identifies vSphere volume vmdk") + + public String getVolumePath() { + return volumePath; + } + + + public void setVolumePath(String volumePath) { + this.volumePath = volumePath; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V1ScanSpecVsphereVolume v1ScanSpecVsphereVolume = (V1ScanSpecVsphereVolume) o; + return Objects.equals(this.fsType, v1ScanSpecVsphereVolume.fsType) && + Objects.equals(this.storagePolicyID, v1ScanSpecVsphereVolume.storagePolicyID) && + Objects.equals(this.storagePolicyName, v1ScanSpecVsphereVolume.storagePolicyName) && + Objects.equals(this.volumePath, v1ScanSpecVsphereVolume.volumePath); + } + + @Override + public int hashCode() { + return Objects.hash(fsType, storagePolicyID, storagePolicyName, volumePath); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1ScanSpecVsphereVolume {\n"); + sb.append(" fsType: ").append(toIndentedString(fsType)).append("\n"); + sb.append(" storagePolicyID: ").append(toIndentedString(storagePolicyID)).append("\n"); + sb.append(" storagePolicyName: ").append(toIndentedString(storagePolicyName)).append("\n"); + sb.append(" volumePath: ").append(toIndentedString(volumePath)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatus.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatus.java index 406d0f0378..a24b63f96d 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatus.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatus.java @@ -13,6 +13,8 @@ package io.securecodebox.models; +import java.time.ZonedDateTime; +import java.time.ZonedDateTime; import java.util.Objects; import java.util.Arrays; import com.google.gson.TypeAdapter; @@ -20,20 +22,21 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.kubernetes.client.proto.Meta; import io.securecodebox.models.V1ScanStatusFindings; import io.securecodebox.models.V1ScanStatusReadAndWriteHookStatus; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.joda.time.DateTime; /** * ScanStatus defines the observed state of Scan */ @ApiModel(description = "ScanStatus defines the observed state of Scan") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanStatus { public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "errorDescription"; @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) @@ -49,7 +52,7 @@ public class V1ScanStatus { public static final String SERIALIZED_NAME_FINISHED_AT = "finishedAt"; @SerializedName(SERIALIZED_NAME_FINISHED_AT) - private DateTime finishedAt; + private String finishedAt; public static final String SERIALIZED_NAME_RAW_RESULT_DOWNLOAD_LINK = "rawResultDownloadLink"; @SerializedName(SERIALIZED_NAME_RAW_RESULT_DOWNLOAD_LINK) @@ -141,7 +144,7 @@ public void setFindings(V1ScanStatusFindings findings) { } - public V1ScanStatus finishedAt(DateTime finishedAt) { + public V1ScanStatus finishedAt(String finishedAt) { this.finishedAt = finishedAt; return this; @@ -154,12 +157,12 @@ public V1ScanStatus finishedAt(DateTime finishedAt) { @javax.annotation.Nullable @ApiModelProperty(value = "FinishedAt contains the time where the scan (including parser & hooks) has been marked as \"Done\"") - public DateTime getFinishedAt() { + public String getFinishedAt() { return finishedAt; } - public void setFinishedAt(DateTime finishedAt) { + public void setFinishedAt(String finishedAt) { this.finishedAt = finishedAt; } diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindings.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindings.java index 29b6d8d3f9..cb6bb1adb7 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindings.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindings.java @@ -32,7 +32,7 @@ * FindingStats contains the general stats about the results of the scan */ @ApiModel(description = "FindingStats contains the general stats about the results of the scan") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanStatusFindings { public static final String SERIALIZED_NAME_CATEGORIES = "categories"; @SerializedName(SERIALIZED_NAME_CATEGORIES) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindingsSeverities.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindingsSeverities.java index c64f0195d0..d07a49f569 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindingsSeverities.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusFindingsSeverities.java @@ -28,7 +28,7 @@ * FindingSeverities indicates the count of finding with the respective severity */ @ApiModel(description = "FindingSeverities indicates the count of finding with the respective severity") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanStatusFindingsSeverities { public static final String SERIALIZED_NAME_HIGH = "high"; @SerializedName(SERIALIZED_NAME_HIGH) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusReadAndWriteHookStatus.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusReadAndWriteHookStatus.java index f0a63c2de2..a6a336b9cf 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusReadAndWriteHookStatus.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/models/V1ScanStatusReadAndWriteHookStatus.java @@ -27,7 +27,7 @@ /** * V1ScanStatusReadAndWriteHookStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-10-21T08:16:15.156Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-18T15:41:43.082Z[Etc/UTC]") public class V1ScanStatusReadAndWriteHookStatus { public static final String SERIALIZED_NAME_HOOK_NAME = "hookName"; @SerializedName(SERIALIZED_NAME_HOOK_NAME) diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/DefectDojoPersistenceProvider.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/DefectDojoPersistenceProvider.java index efc8d3b815..00013a2c98 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/DefectDojoPersistenceProvider.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/DefectDojoPersistenceProvider.java @@ -17,84 +17,65 @@ */ package io.securecodebox.persistence; -import io.kubernetes.client.openapi.ApiClient; -import io.kubernetes.client.openapi.Configuration; -import io.kubernetes.client.util.ClientBuilder; -import io.kubernetes.client.util.KubeConfig; -import io.kubernetes.client.util.generic.GenericKubernetesApi; -import io.securecodebox.models.V1Scan; -import io.securecodebox.models.V1ScanList; +import io.securecodebox.persistence.config.PersistenceProviderConfig; import io.securecodebox.persistence.defectdojo.config.DefectDojoConfig; -import io.securecodebox.persistence.exceptions.DefectDojoPersistenceException; +import io.securecodebox.persistence.defectdojo.service.EndpointService; +import io.securecodebox.persistence.mapping.DefectDojoFindingToSecureCodeBoxMapper; import io.securecodebox.persistence.models.Scan; +import io.securecodebox.persistence.service.KubernetesService; +import io.securecodebox.persistence.service.S3Service; import io.securecodebox.persistence.strategies.VersionedEngagementsStrategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.FileReader; -import java.io.IOException; +import java.util.stream.Collectors; public class DefectDojoPersistenceProvider { private static final Logger LOG = LoggerFactory.getLogger(DefectDojoPersistenceProvider.class); public static void main(String[] args) throws Exception { - LOG.debug("Starting DefectDojo persistence provider"); + LOG.info("Starting DefectDojo persistence provider"); - var scan = new Scan(getScanFromKubernetes()); + var persistenceProviderConfig = new PersistenceProviderConfig(args); + + var s3Service = new S3Service(); + var kubernetesService = new KubernetesService(); + kubernetesService.init(); + + var scan = new Scan(kubernetesService.getScanFromKubernetes()); scan.validate(); var config = DefectDojoConfig.fromEnv(); - LOG.info("URL: {}", config.getUrl()); + LOG.info("Downloading Scan Report (RawResults)"); + var rawResults = s3Service.downloadRawResults(persistenceProviderConfig.getRawResultDownloadUrl()); + LOG.info("Finished Downloading Scan Report (RawResults)"); + LOG.debug("RawResults: {}", rawResults); + + LOG.info("Uploading Findings to DefectDojo at: {}", config.getUrl()); var defectdojoImportStrategy = new VersionedEngagementsStrategy(); defectdojoImportStrategy.init(config); + var defectDojoFindings = defectdojoImportStrategy.run(scan, rawResults); - defectdojoImportStrategy.run(scan); - } - - private static V1Scan getScanFromKubernetes() throws IOException { - ApiClient client; + LOG.info("Identified total Number of findings in DefectDojo: {}", defectDojoFindings.size()); - if ("true".equals(System.getenv("IS_DEV"))) { - // loading the out-of-cluster config, a kubeconfig from file-system - String kubeConfigPath = System.getProperty("user.home") + "/.kube/config"; - client = ClientBuilder.kubeconfig(KubeConfig.loadKubeConfig(new FileReader(kubeConfigPath))).build(); - } else { - client = ClientBuilder.cluster().build(); - } - - // set the global default api-client to the in-cluster one from above - Configuration.setDefaultApiClient(client); - - String scanName = System.getenv("SCAN_NAME"); - if (scanName == null) { - scanName = "nmap-scanme.nmap.org"; - } - String namespace = System.getenv("NAMESPACE"); - if (namespace == null) { - namespace = "default"; - } + if (persistenceProviderConfig.isReadAndWrite()) { + var endpointService = new EndpointService(config); + var mapper = new DefectDojoFindingToSecureCodeBoxMapper(config, endpointService); - // set the global default api-client to the in-cluster one from above - Configuration.setDefaultApiClient(client); + LOG.info("Overwriting secureCodeBox findings with the findings from DefectDojo."); - GenericKubernetesApi scanApi = - new GenericKubernetesApi<>( - V1Scan.class, - V1ScanList.class, - "execution.securecodebox.io", - "v1", - "scans", - ClientBuilder.defaultClient()); + var findings = defectDojoFindings.stream() + .map(mapper::fromDefectDojoFining) + .collect(Collectors.toList()); - var response = scanApi.get(namespace, scanName); + LOG.debug("Mapped Findings: {}", findings); - if (!response.isSuccess()) { - throw new DefectDojoPersistenceException("Failed to fetch Scan '" + scanName + "' in Namespace '" + namespace + "' from Kubernetes API"); + s3Service.overwriteFindings(persistenceProviderConfig.getFindingUploadUrl(), findings); + kubernetesService.updateScanInKubernetes(findings); } - LOG.info("Fetched Scan from Kubernetes API"); - return response.getObject(); + LOG.info("DefectDojo Persistence Completed"); } } diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/config/PersistenceProviderConfig.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/config/PersistenceProviderConfig.java new file mode 100644 index 0000000000..440a07d6ec --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/config/PersistenceProviderConfig.java @@ -0,0 +1,79 @@ +package io.securecodebox.persistence.config; + +import lombok.Getter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; + +/** + * Reads the configured Up / Download Urls for RawResults and Findings from the command line args and determines if + * the Hook is run in ReadOnly or ReadAndWrite mode based on the number of args. + */ +public class PersistenceProviderConfig { + private static final Logger LOG = LoggerFactory.getLogger(PersistenceProviderConfig.class); + + final int RAW_RESULT_DOWNLOAD_ARG_POSITION = 0; + final int FINDING_DOWNLOAD_ARG_POSITION = 1; + + final int RAW_RESULT_UPLOAD_ARG_POSITION = 2; + final int FINDING_UPLOAD_ARG_POSITION = 3; + + // Download Urls + @Getter + final String rawResultDownloadUrl; + @Getter + final String findingDownloadUrl; + + // Upload Urls + final String rawResultUploadUrl; + final String findingUploadUrl; + + public String getRawResultUploadUrl(){ + if(isReadOnly()) { + throw new RuntimeException("Cannot Access RawResult Upload URL as the hook is run is ReadOnly mode."); + } + return rawResultUploadUrl; + } + public String getFindingUploadUrl(){ + if(isReadOnly()) { + throw new RuntimeException("Cannot Access Finding Upload URL as the hook is run is ReadOnly mode."); + } + return findingUploadUrl; + } + + final boolean readOnly; + + public boolean isReadOnly() { + return readOnly; + } + + public boolean isReadAndWrite() { + return !readOnly; + } + + public PersistenceProviderConfig(String[] args) { + // Parse Hook Args passed via command line flags + if (args == null) { + throw new RuntimeException("Received `null` as command line flags. Expected exactly four (RawResult & Finding Up/Download Urls)"); + } else if (args.length == 2) { + this.readOnly = true; + + this.rawResultDownloadUrl = args[RAW_RESULT_DOWNLOAD_ARG_POSITION]; + this.findingDownloadUrl = args[FINDING_DOWNLOAD_ARG_POSITION]; + // Not set for ReadOnly hooks + this.rawResultUploadUrl = null; + this.findingUploadUrl = null; + } else if (args.length == 4) { + this.readOnly = false; + + this.rawResultDownloadUrl = args[RAW_RESULT_DOWNLOAD_ARG_POSITION]; + this.findingDownloadUrl = args[FINDING_DOWNLOAD_ARG_POSITION]; + this.rawResultUploadUrl = args[RAW_RESULT_UPLOAD_ARG_POSITION]; + this.findingUploadUrl = args[FINDING_UPLOAD_ARG_POSITION]; + } else { + LOG.error("Received unexpected command line arguments: {}", List.of(args)); + throw new RuntimeException("DefectDojo Hook received a unexpected number of command line flags. Expected exactly two (for ReadOnly Mode) or four (for ReadAndWrite mode)"); + } + } +} diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/mapping/DefectDojoFindingToSecureCodeBoxMapper.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/mapping/DefectDojoFindingToSecureCodeBoxMapper.java new file mode 100644 index 0000000000..17bf2f5d45 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/mapping/DefectDojoFindingToSecureCodeBoxMapper.java @@ -0,0 +1,88 @@ +package io.securecodebox.persistence.mapping; + +import io.securecodebox.persistence.defectdojo.config.DefectDojoConfig; +import io.securecodebox.persistence.defectdojo.models.Endpoint; +import io.securecodebox.persistence.defectdojo.service.EndpointService; +import io.securecodebox.persistence.models.Finding; +import org.springframework.web.util.UriComponentsBuilder; + +import java.util.HashMap; +import java.util.UUID; + +public class DefectDojoFindingToSecureCodeBoxMapper { + + DefectDojoConfig config; + EndpointService endpointService; + + public DefectDojoFindingToSecureCodeBoxMapper(DefectDojoConfig config, EndpointService endpointService){ + this.config = config; + this.endpointService = endpointService; + } + + public Finding fromDefectDojoFining(io.securecodebox.persistence.defectdojo.models.Finding defectDojoFinding) { + var finding = new Finding(); + + finding.setId(UUID.randomUUID().toString()); + finding.setName(defectDojoFinding.getTitle()); + finding.setCategory("DefectDojo Imported Finding"); + finding.setDescription(defectDojoFinding.getDescription()); + + var attributes = new HashMap(); + attributes.put("defectdojo.org/finding-id", defectDojoFinding.getId()); + attributes.put("defectdojo.org/finding-url", config.getUrl() + "/finding/" + defectDojoFinding.getId()); + attributes.put("defectdojo.org/test-id", defectDojoFinding.getTest()); + attributes.put("defectdojo.org/test-url", config.getUrl() + "/test/" + defectDojoFinding.getTest()); + + attributes.put("duplicate", defectDojoFinding.getDuplicate()); + attributes.put("falsePositive", defectDojoFinding.getFalsePositive()); + finding.setAttributes(attributes); + + // Map DefectDojo Severities to secureCodeBox Severities + switch (defectDojoFinding.getSeverity()) { + case Critical: + case High: + finding.setSeverity(Finding.Severities.High); + break; + case Medium: + finding.setSeverity(Finding.Severities.Medium); + break; + case Low: + finding.setSeverity(Finding.Severities.Low); + break; + case Informational: + finding.setSeverity(Finding.Severities.Informational); + break; + } + + if (defectDojoFinding.getEndpoints() == null || defectDojoFinding.getEndpoints().isEmpty()){ + finding.setLocation("unkown"); + } else { + var endpoint = endpointService.get(defectDojoFinding.getEndpoints().get(0)); + finding.setLocation(stringifyEndpoint(endpoint)); + } + + return finding; + } + + static String stringifyEndpoint(Endpoint endpoint) { + var uriBuilder = UriComponentsBuilder.newInstance(); + + if(endpoint.getProtocol() != null) { + uriBuilder.scheme(endpoint.getProtocol()); + } + if(endpoint.getHost() != null) { + uriBuilder.host(endpoint.getHost()); + } + if(endpoint.getPort() != null) { + uriBuilder.port(endpoint.getPort().intValue()); + } + if(endpoint.getPath() != null) { + uriBuilder.path(endpoint.getPath()); + } + if(endpoint.getQuery() != null) { + uriBuilder.query(endpoint.getQuery()); + } + + return uriBuilder.build().toString(); + } +} diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/models/Finding.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/models/Finding.java new file mode 100644 index 0000000000..6017121716 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/models/Finding.java @@ -0,0 +1,47 @@ +package io.securecodebox.persistence.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +/** + * secureCodeCode Finding Format + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Finding { + @JsonProperty + String id; + @JsonProperty + String name; + @JsonProperty + String location; + @JsonProperty + String description; + @JsonProperty + String category; + @JsonProperty("osi_layer") + String osiLayer; + @JsonProperty + Severities severity; + @JsonProperty + Map attributes; + + public enum Severities { + @JsonProperty("High") + High, + @JsonProperty("Medium") + Medium, + @JsonProperty("Low") + Low, + @JsonProperty("Informational") + Informational + ; + } +} diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/models/Scan.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/models/Scan.java index 8e9628c51b..8c70d07f9b 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/models/Scan.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/models/Scan.java @@ -20,10 +20,6 @@ import io.securecodebox.models.V1Scan; import lombok.AllArgsConstructor; import lombok.Getter; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.DefaultUriBuilderFactory; import java.util.*; import java.util.stream.Collectors; @@ -97,18 +93,6 @@ public Optional getProductDescription() { return this.getKey(SecureCodeBoxScanAnnotations.PRODUCT_DESCRIPTION); } - public String getRawResults() throws HttpClientErrorException { - RestTemplate restTemplate = new RestTemplate(); - - // Don't url encode the url again. It's already valid and encoding it again will mess with the s3 signatures... - DefaultUriBuilderFactory defaultUriBuilderFactory = new DefaultUriBuilderFactory(); - defaultUriBuilderFactory.setEncodingMode(DefaultUriBuilderFactory.EncodingMode.NONE); - restTemplate.setUriTemplateHandler(defaultUriBuilderFactory); - - ResponseEntity response = restTemplate.getForEntity(this.getStatus().getRawResultDownloadLink(), String.class); - return response.getBody(); - } - @AllArgsConstructor public enum SecureCodeBoxScanAnnotations { PRODUCT_TYPE("defectdojo.securecodebox.io/product-type-name"), diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/service/KubernetesService.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/service/KubernetesService.java new file mode 100644 index 0000000000..76dd63a3f9 --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/service/KubernetesService.java @@ -0,0 +1,135 @@ +package io.securecodebox.persistence.service; + +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.util.ClientBuilder; +import io.kubernetes.client.util.KubeConfig; +import io.kubernetes.client.util.generic.GenericKubernetesApi; +import io.securecodebox.models.V1Scan; +import io.securecodebox.models.V1ScanList; +import io.securecodebox.models.V1ScanStatusFindings; +import io.securecodebox.models.V1ScanStatusFindingsSeverities; +import io.securecodebox.persistence.exceptions.DefectDojoPersistenceException; +import io.securecodebox.persistence.models.Finding; +import okhttp3.Protocol; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.FileReader; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; + +public class KubernetesService { + private static final Logger LOG = LoggerFactory.getLogger(KubernetesService.class); + + ApiClient client; + String scanName; + String namespace; + + GenericKubernetesApi scanApi; + + public void init() throws IOException { + if ("true".equals(System.getenv("IS_DEV"))) { + // loading the out-of-cluster config, a kubeconfig from file-system + String kubeConfigPath = System.getProperty("user.home") + "/.kube/config"; + this.client = ClientBuilder.kubeconfig(KubeConfig.loadKubeConfig(new FileReader(kubeConfigPath))) + // the default of Http 2 seems to have some problem in which the client doesn't terminate correctly. (k8s client-java 12.0.0) + .setProtocols(List.of(Protocol.HTTP_1_1)) + .build(); + } else { + this.client = ClientBuilder.cluster() + // the default of Http 2 seems to have some problem in which the client doesn't terminate correctly. (k8s client-java 12.0.0) + .setProtocols(List.of(Protocol.HTTP_1_1)) + .build(); + } + + this.scanName = System.getenv("SCAN_NAME"); + if (this.scanName == null) { + this.scanName = "nmap-scanme.nmap.org"; + } + this.namespace = System.getenv("NAMESPACE"); + if (this.namespace == null) { + this.namespace = "default"; + } + + this.scanApi = new GenericKubernetesApi<>( + V1Scan.class, + V1ScanList.class, + "execution.securecodebox.io", + "v1", + "scans", + client + ); + } + + public V1Scan getScanFromKubernetes() throws IOException { + var response = scanApi.get(namespace, scanName); + + if (!response.isSuccess()) { + throw new DefectDojoPersistenceException("Failed to fetch Scan '" + scanName + "' in Namespace '" + namespace + "' from Kubernetes API"); + } + LOG.debug("Fetched Scan from Kubernetes API"); + + return response.getObject(); + } + + public void updateScanInKubernetes(List findings) throws IOException { + LOG.debug("Refetching the scan to minimize possibility to write conflicts"); + var scan = this.getScanFromKubernetes(); + + Objects.requireNonNull(scan.getStatus(), "Scan status field is not set, this should have been previously set by the Operator and Parser.") + .setFindings(recalculateFindingStats(findings)); + + LOG.info("Updating Scan metadata"); + scanApi.updateStatus(scan, V1Scan::getStatus); + LOG.debug("Updated Scan metadata"); + } + + static V1ScanStatusFindings recalculateFindingStats(List findings) { + var stats = new V1ScanStatusFindings(); + + stats.setCount((long) findings.size()); + stats.setCategories(recalculateFindingCategoryStats(findings)); + stats.setSeverities(recalculateFindingSeverityStats(findings)); + + return stats; + } + + private static V1ScanStatusFindingsSeverities recalculateFindingSeverityStats(List findings) { + var severities = new V1ScanStatusFindingsSeverities(); + severities.setInformational(0L); + severities.setLow(0L); + severities.setMedium(0L); + severities.setHigh(0L); + for (var finding: findings) { + switch (finding.getSeverity()) { + case High: + severities.setHigh(severities.getHigh() + 1L); + break; + case Medium: + severities.setMedium(severities.getMedium() + 1L); + break; + case Low: + severities.setLow(severities.getLow() + 1L); + break; + case Informational: + severities.setInformational(severities.getInformational() + 1L); + break; + } + } + return severities; + } + + private static HashMap recalculateFindingCategoryStats(List findings) { + var categories = new HashMap(); + for (var finding: findings) { + if (categories.containsKey(finding.getCategory())) { + categories.put(finding.getCategory(), categories.get(finding.getCategory()) + 1); + } else { + categories.put(finding.getCategory(), 1L); + } + } + return categories; + } +} diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/service/S3Service.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/service/S3Service.java new file mode 100644 index 0000000000..a45b24403b --- /dev/null +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/service/S3Service.java @@ -0,0 +1,43 @@ +package io.securecodebox.persistence.service; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.securecodebox.persistence.models.Finding; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpResponse; +import java.util.List; + +public class S3Service { + private static final Logger LOG = LoggerFactory.getLogger(S3Service.class); + + public void overwriteFindings(String url, List findings) throws IOException, InterruptedException { + ObjectMapper mapper = new ObjectMapper(); + var findingJson = mapper.writeValueAsString(findings); + + LOG.info("Uploading Findings to S3"); + + var request = java.net.http.HttpRequest + .newBuilder() + .uri(URI.create(url)) + .PUT(java.net.http.HttpRequest.BodyPublishers.ofString(findingJson)) + .build(); + + HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.discarding()); + } + + public String downloadRawResults(String rawResultDownloadUrl) throws IOException, InterruptedException { + var request = java.net.http.HttpRequest + .newBuilder() + .uri(URI.create(rawResultDownloadUrl)) + .build(); + + var response = HttpClient.newHttpClient() + .send(request, HttpResponse.BodyHandlers.ofString()); + + return response.body(); + } +} diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/Strategy.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/Strategy.java index 353b0ef4de..59b4506f27 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/Strategy.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/Strategy.java @@ -18,12 +18,16 @@ package io.securecodebox.persistence.strategies; import io.securecodebox.persistence.defectdojo.config.DefectDojoConfig; +import io.securecodebox.persistence.defectdojo.models.Finding; import io.securecodebox.persistence.models.Scan; + +import java.util.List; + /** * Defines a general strategy pattern interface used to implement different strategies for importing results into OWASP DefectDojo. */ public interface Strategy { void init(DefectDojoConfig defectDojoConfig); - void run(Scan scan) throws Exception; + List run(Scan scan, String rawResults) throws Exception; } diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategy.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategy.java index ff5f590162..e1e273261d 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategy.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategy.java @@ -28,13 +28,14 @@ import io.securecodebox.persistence.models.Scan; import io.securecodebox.persistence.util.DescriptionGenerator; import io.securecodebox.persistence.util.ScanNameMapping; -import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.web.client.HttpClientErrorException; import java.net.URISyntaxException; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; +import java.util.Map; import java.util.Objects; /** @@ -55,11 +56,13 @@ public class VersionedEngagementsStrategy implements Strategy { TestService testService; TestTypeService testTypeService; ImportScanService importScanService; + FindingService findingService; DefectDojoConfig config; public VersionedEngagementsStrategy() {} + @Override public void init(DefectDojoConfig defectDojoConfig) { this.productService = new ProductService(defectDojoConfig); this.productTypeService = new ProductTypeService(defectDojoConfig); @@ -70,11 +73,13 @@ public void init(DefectDojoConfig defectDojoConfig) { this.testService = new TestService(defectDojoConfig); this.testTypeService = new TestTypeService(defectDojoConfig); this.importScanService = new ImportScanService(defectDojoConfig); + this.findingService = new FindingService(defectDojoConfig); this.config = defectDojoConfig; } - public void run(Scan scan) throws Exception { + @Override + public List run(Scan scan, String rawResults) throws Exception { LOG.debug("Getting DefectDojo User Id"); var userId = userService.searchUnique(User.builder().username(this.config.getUsername()).build()) .orElseThrow(() -> new DefectDojoPersistenceException("Failed to find user with name: '" + this.config.getUsername() + "'")) @@ -89,15 +94,6 @@ public void run(Scan scan) throws Exception { long engagementId = this.createEngagement(scan, productId, userId).getId(); LOG.debug("Using Engagement with Id: {}", engagementId); - LOG.debug("Downloading Scan Report (RawResults)"); - String result; - try { - result = scan.getRawResults(); - } catch (HttpClientErrorException e) { - throw new DefectDojoPersistenceException("Failed to download Raw Findings", e); - } - LOG.debug("Finished Downloading Scan Report (RawResults)"); - var testId = this.createTest(scan, engagementId, userId); LOG.debug("Uploading Scan Report (RawResults) to DefectDojo"); @@ -106,7 +102,7 @@ public void run(Scan scan) throws Exception { TestType testType = testTypeService.searchUnique(TestType.builder().name(scanType.getTestType()).build()).orElseThrow(() -> new DefectDojoPersistenceException("Could not find test type '" + scanType.getTestType() + "' in DefectDojo API. DefectDojo might be running in an unsupported version.")); importScanService.reimportScan( - result, + rawResults, testId, userId, this.descriptionGenerator.currentDate(), @@ -115,7 +111,8 @@ public void run(Scan scan) throws Exception { ); LOG.info("Uploaded Scan Report (RawResults) as testID {} to DefectDojo", testId); - LOG.info("All done!"); + + return findingService.search(Map.of("test", String.valueOf(testId))); } /** @@ -245,14 +242,12 @@ private Product ensureProductExistsForScan(Scan scan, long productTypeId) throws * @throws JsonProcessingException */ private long createTest(Scan scan, long engagementId, long userId) throws URISyntaxException, JsonProcessingException { - var startDate = Objects.requireNonNull(scan.getMetadata().getCreationTimestamp()).toString("yyyy-MM-dd HH:mm:ssZ"); + var dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssZ"); - String endDate; - if (scan.getStatus().getFinishedAt() != null) { - endDate = scan.getStatus().getFinishedAt().toString("yyyy-MM-dd HH:mm:ssZ"); - } else { - endDate = DateTime.now().toString("yyyy-MM-dd HH:mm:ssZ"); - } + var startDate = Objects.requireNonNull(scan.getMetadata().getCreationTimestamp()).format(dateFormat); + + // End date on the Scan Object isn't set when the DefectDojo Hook runs, best approximation of the end date is the current time. + String endDate = ZonedDateTime.now().format(dateFormat); String version = scan.getEngagementVersion().orElse(null); diff --git a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/util/DescriptionGenerator.java b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/util/DescriptionGenerator.java index 0e28a0facd..2a85e158fd 100644 --- a/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/util/DescriptionGenerator.java +++ b/hooks/persistence-defectdojo/src/main/java/io/securecodebox/persistence/util/DescriptionGenerator.java @@ -28,8 +28,8 @@ public class DescriptionGenerator { - protected static final String TIME_FORMAT = "dd.MM.yyyy HH:mm:ss"; - private static final String DATE_FORMAT = "yyyy-MM-dd"; + protected static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm:ss"); + private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd"); Clock clock = Clock.systemDefaultZone(); public String generate(V1Scan scan) { @@ -39,7 +39,7 @@ public String generate(V1Scan scan) { System.getProperty("line.separator"), MessageFormat.format("# {0}", getDefectDojoScanName(scan)), MessageFormat.format("Started: {0}", getStartTime(scan)), - MessageFormat.format("Ended: {0}", getEndTime(scan)), + MessageFormat.format("Ended: {0}", currentTime()), MessageFormat.format("ScanType: {0}", spec.getScanType()), MessageFormat.format("Parameters: [{0}]", String.join(",", Objects.requireNonNull(spec.getParameters()))) ); @@ -49,14 +49,7 @@ private String getStartTime(V1Scan scan) { if (scan.getMetadata() == null || scan.getMetadata().getCreationTimestamp() == null) { return null; } - return scan.getMetadata().getCreationTimestamp().toString(TIME_FORMAT); - } - - private String getEndTime(V1Scan scan) { - if (scan.getStatus() == null || scan.getStatus().getFinishedAt() == null) { - return currentTime(); - } - return scan.getStatus().getFinishedAt().toString(TIME_FORMAT); + return scan.getMetadata().getCreationTimestamp().format(TIME_FORMAT); } /** @@ -65,11 +58,11 @@ private String getEndTime(V1Scan scan) { * @return the current date as string based on the DATE_FORMAT. */ public String currentDate() { - return LocalDate.now(clock).format(DateTimeFormatter.ofPattern(DATE_FORMAT)); + return LocalDate.now(clock).format(DATE_FORMAT); } public String currentTime() { - return LocalDateTime.now(clock).format(DateTimeFormatter.ofPattern(TIME_FORMAT)); + return LocalDateTime.now(clock).format(TIME_FORMAT); } public void setClock(Clock clock) { diff --git a/hooks/persistence-defectdojo/src/main/resources/log4j.xml b/hooks/persistence-defectdojo/src/main/resources/log4j.xml index d9904e8646..99cf322f0a 100644 --- a/hooks/persistence-defectdojo/src/main/resources/log4j.xml +++ b/hooks/persistence-defectdojo/src/main/resources/log4j.xml @@ -1,5 +1,5 @@ - + @@ -9,7 +9,7 @@ - + diff --git a/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/DescriptionGeneratorTest.java b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/DescriptionGeneratorTest.java index 9780e553aa..cf560d1caf 100644 --- a/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/DescriptionGeneratorTest.java +++ b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/DescriptionGeneratorTest.java @@ -22,13 +22,10 @@ import io.securecodebox.models.V1ScanSpec; import io.securecodebox.models.V1ScanStatus; import io.securecodebox.persistence.util.DescriptionGenerator; -import org.joda.time.DateTime; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeEach; -import java.time.Clock; -import java.time.Instant; -import java.time.ZoneId; +import java.time.*; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -47,8 +44,7 @@ public void setUp() { scan.setStatus(new V1ScanStatus()); scan.getSpec().setScanType("nmap"); scan.getMetadata().setName("test-scan"); - scan.getMetadata().setCreationTimestamp(DateTime.parse("2010-06-30T01:20+02:00")); - scan.getStatus().setFinishedAt(DateTime.parse("2010-06-30T01:25+02:00")); + scan.getMetadata().setCreationTimestamp(OffsetDateTime.parse("2010-06-30T01:20+02:00")); scan.getSpec().setParameters(List.of()); } @@ -66,7 +62,7 @@ public void generate() { System.getProperty("line.separator"), "# Nmap Scan", "Started: 30.06.2010 01:20:00", - "Ended: 30.06.2010 01:25:00", + "Ended: 07.01.2019 16:50:03", "ScanType: nmap", "Parameters: [http://example.target]" ), @@ -81,7 +77,7 @@ public void nullGenerate() { System.getProperty("line.separator"), "# Nmap Scan", "Started: 30.06.2010 01:20:00", - "Ended: 30.06.2010 01:25:00", + "Ended: 07.01.2019 16:50:03", "ScanType: nmap", "Parameters: []" ), descriptionGenerator.generate(scan)); diff --git a/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/mapping/DefectDojoFindingToSecureCodeBoxMapperTest.java b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/mapping/DefectDojoFindingToSecureCodeBoxMapperTest.java new file mode 100644 index 0000000000..cbace25a66 --- /dev/null +++ b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/mapping/DefectDojoFindingToSecureCodeBoxMapperTest.java @@ -0,0 +1,107 @@ +package io.securecodebox.persistence.mapping; + +import io.securecodebox.persistence.defectdojo.config.DefectDojoConfig; +import io.securecodebox.persistence.defectdojo.models.Endpoint; +import io.securecodebox.persistence.defectdojo.models.Finding; +import io.securecodebox.persistence.defectdojo.service.EndpointService; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.when; + +@ExtendWith(MockitoExtension.class) +class DefectDojoFindingToSecureCodeBoxMapperTest { + + DefectDojoFindingToSecureCodeBoxMapper mapper; + + @Mock + EndpointService endpointService; + + @BeforeEach + public void setup(){ + var config = new DefectDojoConfig("http://example.defectdojo.com", "placeholder", "placeholder"); + this.mapper = new DefectDojoFindingToSecureCodeBoxMapper(config, endpointService); + } + + @Test + public void shouldMapBasicFindings(){ + // Typical ZAP Finding in DefectDojo + var ddFinding = Finding.builder() + .title("Content Security Policy (CSP) Header Not Set") + .severity(Finding.Severity.Medium) + .description("Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.\n\nReference: https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policyhttps://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.htmlhttp://www.w3.org/TR/CSP/http://w3c.github.io/webappsec/specs/content-security-policy/csp-specification.dev.htmlhttp://www.html5rocks.com/en/tutorials/security/content-security-policy/http://caniuse.com/#feat=contentsecuritypolicyhttp://content-security-policy.com/\n\nURL: http://juice-shop.securecodebox-test.svc:3000/sitemap.xml\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp/coupons_2013.md.bak\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp/encrypt.pyc\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp/suspicious_errors.yml\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp/\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp/package.json.bak\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp/eastere.gg\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000\nMethod: GET\n\nURL: http://juice-shop.securecodebox-test.svc:3000/ftp/quarantine\nMethod: GET\n") + .mitigation("Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header, to achieve optimal browser support: \"Content-Security-Policy\" for Chrome 25+, Firefox 23+ and Safari 7+, \"X-Content-Security-Policy\" for Firefox 4.0+ and Internet Explorer 10+, and \"X-WebKit-CSP\" for Chrome 14+ and Safari 6+.") + // Random ids... + .endpoints(List.of(1337L, 42L, 3L)) + .foundBy(List.of(3L)) + .test(42L) + .impact("No impact provided") + .build(); + + when(endpointService.get(1337L)).thenReturn(Endpoint.builder().protocol("http").host("juice-shop.securecodebox-test.svc:3000").build()); + + var actualFinding = this.mapper.fromDefectDojoFining(ddFinding); + + assertEquals( + actualFinding.getName(), + "Content Security Policy (CSP) Header Not Set" + ); + + assertEquals( + actualFinding.getCategory(), + "DefectDojo Imported Finding" + ); + + assertEquals( + actualFinding.getSeverity(), + io.securecodebox.persistence.models.Finding.Severities.Medium + ); + + assertEquals( + actualFinding.getLocation(), + "http://juice-shop.securecodebox-test.svc:3000" + ); + } + + @Test + public void shouldProperlyParseEndpoints() { + assertEquals( + "tcp://45.33.32.156", + DefectDojoFindingToSecureCodeBoxMapper.stringifyEndpoint( + Endpoint.builder().protocol("tcp").host("45.33.32.156").build() + ), + "should parse simple nmap / tcp urls" + ); + + assertEquals( + "http://juice-shop.securecodebox-test.svc:3000", + DefectDojoFindingToSecureCodeBoxMapper.stringifyEndpoint( + Endpoint.builder().protocol("http").host("juice-shop.securecodebox-test.svc:3000").build() + ), + "should parse endpoint with protocol and host with embedded port" + ); + + assertEquals( + "http://juice-shop.securecodebox-test.svc:3000/", + DefectDojoFindingToSecureCodeBoxMapper.stringifyEndpoint( + Endpoint.builder().protocol("http").host("juice-shop.securecodebox-test.svc:3000").path("/").build() + ), + "should parse endpoint with a path set" + ); + + // DefectDojo sometimes outputs really weirdly parsed endpoints + // these are not great, but probably not worth to spend too much time on parsing that on out end + assertEquals( + "//http://juice-shop.securecodebox-test.svc:3000:3000", + DefectDojoFindingToSecureCodeBoxMapper.stringifyEndpoint( + Endpoint.builder().host("http://juice-shop.securecodebox-test.svc:3000:3000").build() + ) + ); + } +} diff --git a/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/service/KubernetesServiceTest.java b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/service/KubernetesServiceTest.java new file mode 100644 index 0000000000..7150720012 --- /dev/null +++ b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/service/KubernetesServiceTest.java @@ -0,0 +1,60 @@ +package io.securecodebox.persistence.service; + +import io.securecodebox.persistence.models.Finding; +import org.junit.jupiter.api.Test; + +import java.util.List; +import java.util.NoSuchElementException; + +import static org.junit.jupiter.api.Assertions.*; + +class KubernetesServiceTest { + + @Test + public void calculatesFindingStatsCorrectly() throws Exception{ + var findings = List.of( + Finding.builder().category("Open Port").severity(Finding.Severities.Informational).build(), + Finding.builder().category("Open Port").severity(Finding.Severities.Informational).build(), + Finding.builder().category("Open Port").severity(Finding.Severities.Informational).build(), + Finding.builder().category("Host").severity(Finding.Severities.Informational).build() + ); + + var actualStats = KubernetesService.recalculateFindingStats(findings); + + assertEquals(4L, actualStats.getCount()); + + assertNotNull(actualStats.getCategories()); + assertEquals( + 3L, + actualStats.getCategories().computeIfAbsent("Open Port", key -> { throw new NoSuchElementException("Map didn't contain expected key"); } ) + ); + assertEquals( + 1L, + actualStats.getCategories().computeIfAbsent("Host", key -> { throw new NoSuchElementException("Map didn't contain expected key"); } ) + ); + + assertNotNull(actualStats.getSeverities()); + assertEquals(4L, actualStats.getSeverities().getInformational()); + assertEquals(0L, actualStats.getSeverities().getLow()); + assertEquals(0L, actualStats.getSeverities().getMedium()); + assertEquals(0L, actualStats.getSeverities().getHigh()); + } + + @Test + public void calculatesFindingStatsForEmptyFindingsCorrectly() throws Exception{ + List findings = List.of(); + + var actualStats = KubernetesService.recalculateFindingStats(findings); + + assertEquals(0L, actualStats.getCount()); + + assertNotNull(actualStats.getCategories()); + assertEquals(actualStats.getCategories().size(), 0); + + assertNotNull(actualStats.getSeverities()); + assertEquals(0L, actualStats.getSeverities().getInformational()); + assertEquals(0L, actualStats.getSeverities().getLow()); + assertEquals(0L, actualStats.getSeverities().getMedium()); + assertEquals(0L, actualStats.getSeverities().getHigh()); + } +} diff --git a/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategyTest.java b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategyTest.java index 709bc177cd..223744163e 100644 --- a/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategyTest.java +++ b/hooks/persistence-defectdojo/src/test/java/io/securecodebox/persistence/strategies/VersionedEngagementsStrategyTest.java @@ -17,14 +17,10 @@ */ package io.securecodebox.persistence.strategies; -import com.fasterxml.jackson.core.JsonProcessingException; import io.kubernetes.client.openapi.models.V1ObjectMeta; -import io.securecodebox.models.V1Scan; import io.securecodebox.models.V1ScanSpec; import io.securecodebox.models.V1ScanStatus; import io.securecodebox.persistence.defectdojo.config.DefectDojoConfig; -import io.securecodebox.persistence.defectdojo.models.Product; -import io.securecodebox.persistence.defectdojo.models.ProductType; import io.securecodebox.persistence.defectdojo.models.User; import io.securecodebox.persistence.defectdojo.service.*; import io.securecodebox.persistence.exceptions.DefectDojoPersistenceException; @@ -36,17 +32,13 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; -import org.mockito.Spy; -import org.mockito.junit.MockitoJUnitRunner; import org.mockito.junit.jupiter.MockitoExtension; -import javax.swing.text.html.Option; -import java.net.URISyntaxException; import java.util.List; import java.util.Optional; -import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) public class VersionedEngagementsStrategyTest { @@ -73,21 +65,11 @@ public class VersionedEngagementsStrategyTest { Scan scan; - private static class MockedScan extends Scan{ - public MockedScan() { - } - - @Override - public String getRawResults() { - return ""; - } - } - @BeforeEach public void setup() throws Exception { versionedEngagementsStrategy.config = new DefectDojoConfig("https://defectdojo.example.com", "", "foobar"); - scan = new MockedScan(); + scan = new Scan(); scan.setApiVersion("execution.securecodebox.io/v1"); scan.setKind("Scan"); scan.setMetadata(new V1ObjectMeta()); @@ -105,7 +87,7 @@ void requiresUserToBeFound() throws Exception { when(userService.searchUnique(any(User.class))).thenReturn(Optional.empty()); Assertions.assertThrows(DefectDojoPersistenceException.class, () -> { - versionedEngagementsStrategy.run(scan); + versionedEngagementsStrategy.run(scan, ""); }); } } diff --git a/hooks/persistence-defectdojo/templates/persistence-provider.yaml b/hooks/persistence-defectdojo/templates/persistence-provider.yaml index 830dfdbb3b..4e8e3eb60b 100644 --- a/hooks/persistence-defectdojo/templates/persistence-provider.yaml +++ b/hooks/persistence-defectdojo/templates/persistence-provider.yaml @@ -5,7 +5,11 @@ metadata: labels: type: Unstructured spec: + {{- if .Values.defectdojo.syncFindingsBack }} + type: ReadAndWrite + {{- else }} type: ReadOnly + {{- end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}" env: - name: DEFECTDOJO_URL diff --git a/hooks/persistence-defectdojo/update.sh b/hooks/persistence-defectdojo/update.sh index bcfb5f8c6e..f3baca3666 100755 --- a/hooks/persistence-defectdojo/update.sh +++ b/hooks/persistence-defectdojo/update.sh @@ -31,7 +31,7 @@ docker run \ --network host \ ${IMAGE_NAME}:${IMAGE_TAG} \ /generate.sh \ - -u https://gist.githubusercontent.com/J12934/01ecd4eb16be67ab1c574e988214b51a/raw/ed40cdc8f7d995f658cbaf3094e8fbcac6c9ed54/scan.yaml \ + -u https://gist.githubusercontent.com/J12934/67722bc1c6bf69dc5d09cb7aed341fac/raw/3cfcd1ca7de278f68e059ba97af66e87d0e98d61/scan-crd.yaml \ -n io.securecodebox \ -p io.securecodebox \ -o "$(pwd)" diff --git a/hooks/persistence-defectdojo/values.yaml b/hooks/persistence-defectdojo/values.yaml index e87ff2bb03..39e0a5ba4e 100644 --- a/hooks/persistence-defectdojo/values.yaml +++ b/hooks/persistence-defectdojo/values.yaml @@ -10,6 +10,8 @@ image: tag: null defectdojo: + # -- Syncs back (two way sync) all imported findings from DefectDojo to SCB Findings Store, set to false to only import the findings to DefectDojo (one way sync). + syncFindingsBack: true # -- Url to the DefectDojo Instance url: "http://defectdojo-django.default.svc" authentication: diff --git a/scanners/nmap/examples/scan.nmap.org/scan.yaml b/scanners/nmap/examples/scan.nmap.org/scan.yaml index f164612647..10ea8391e6 100644 --- a/scanners/nmap/examples/scan.nmap.org/scan.yaml +++ b/scanners/nmap/examples/scan.nmap.org/scan.yaml @@ -2,16 +2,7 @@ apiVersion: "execution.securecodebox.io/v1" kind: Scan metadata: name: "nmap-scanme.nmap.org" - annotations: - defectdojo.securecodebox.io/product-type: "test" - defectdojo.securecodebox.io/product-name: "nmap-scanme.nmap.org" - defectdojo.securecodebox.io/product-description: "nmap-test" - defectdojo.securecodebox.io/product-tags: "test" - defectdojo.securecodebox.io/engagement-name: "nmap-scanme.nmap.org" - defectdojo.securecodebox.io/engagement-version: "v1.0.0" - defectdojo.securecodebox.io/engagement-tags: "test" spec: scanType: "nmap" parameters: - - -F - - localhost + - scanme.nmap.org