1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

Merge pull request #696 from gocsaf/slient-revive
Some checks failed
generate-markdown / auto-update-readme (push) Has been cancelled
Go Test (oldstable) / build (push) Has been cancelled
Go / build (push) Has been cancelled
Go / run_modver (push) Has been cancelled

silence revive linter warnings
This commit is contained in:
JanHoefelmeyer 2025-10-27 11:07:06 +01:00 committed by GitHub
commit 8dd4cb4fa8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 23 deletions

View file

@ -444,10 +444,11 @@ var csafFlagLabelPattern = alternativesUnmarshal(
// machine readable flag. For example, this could be a machine readable justification // machine readable flag. For example, this could be a machine readable justification
// code why a product is not affected. // code why a product is not affected.
type Flag struct { type Flag struct {
Date *string `json:"date,omitempty"` Date *string `json:"date,omitempty"`
GroupIDs *ProductGroups `json:"group_ids,omitempty"` GroupIDs *ProductGroups `json:"group_ids,omitempty"`
Label *FlagLabel `json:"label"` // required Label *FlagLabel `json:"label"` // required
ProductIds *Products `json:"product_ids,omitempty"` //revive:disable-next-line:var-naming until new major version w fix
ProductIds *Products `json:"product_ids,omitempty"`
} }
// Flags is a list if Flag elements. // Flags is a list if Flag elements.
@ -606,14 +607,16 @@ type RestartRequired struct {
// Remediation specifies details on how to handle (and presumably, fix) a vulnerability. // Remediation specifies details on how to handle (and presumably, fix) a vulnerability.
type Remediation struct { type Remediation struct {
Category *RemediationCategory `json:"category"` // required Category *RemediationCategory `json:"category"` // required
Date *string `json:"date,omitempty"` Date *string `json:"date,omitempty"`
Details *string `json:"details"` // required Details *string `json:"details"` // required
Entitlements []*string `json:"entitlements,omitempty"` Entitlements []*string `json:"entitlements,omitempty"`
GroupIds *ProductGroups `json:"group_ids,omitempty"` //revive:disable:var-naming until new major version w fix
ProductIds *Products `json:"product_ids,omitempty"` GroupIds *ProductGroups `json:"group_ids,omitempty"`
RestartRequired *RestartRequired `json:"restart_required,omitempty"` ProductIds *Products `json:"product_ids,omitempty"`
URL *string `json:"url,omitempty"` //revive:enable
RestartRequired *RestartRequired `json:"restart_required,omitempty"`
URL *string `json:"url,omitempty"`
} }
// Remediations is a list of Remediation elements. // Remediations is a list of Remediation elements.
@ -739,11 +742,13 @@ var csafThreatCategoryPattern = alternativesUnmarshal(
// Threat contains information about a vulnerability that can change with time. // Threat contains information about a vulnerability that can change with time.
type Threat struct { type Threat struct {
Category *ThreatCategory `json:"category"` // required Category *ThreatCategory `json:"category"` // required
Date *string `json:"date,omitempty"` Date *string `json:"date,omitempty"`
Details *string `json:"details"` // required Details *string `json:"details"` // required
GroupIds *ProductGroups `json:"group_ids,omitempty"` //revive:disable:var-naming until new major version w fix
ProductIds *Products `json:"product_ids,omitempty"` GroupIds *ProductGroups `json:"group_ids,omitempty"`
ProductIds *Products `json:"product_ids,omitempty"`
//revive:enable
} }
// Threats is a list of Threat elements. // Threats is a list of Threat elements.

View file

@ -6,7 +6,7 @@
// SPDX-FileCopyrightText: 2023 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de> // SPDX-FileCopyrightText: 2023 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2023 Intevation GmbH <https://intevation.de> // Software-Engineering: 2023 Intevation GmbH <https://intevation.de>
package misc package misc //revive:disable-line:var-naming
import ( import (
"fmt" "fmt"

View file

@ -6,7 +6,7 @@
// SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de> // SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2022 Intevation GmbH <https://intevation.de> // Software-Engineering: 2022 Intevation GmbH <https://intevation.de>
package util package util //revive:disable-line:var-naming
import ( import (
"context" "context"

View file

@ -6,7 +6,7 @@
// SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de> // SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2022 Intevation GmbH <https://intevation.de> // Software-Engineering: 2022 Intevation GmbH <https://intevation.de>
package util package util //revive:disable-line:var-naming
import ( import (
"bufio" "bufio"

View file

@ -6,7 +6,7 @@
// SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de> // SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2022 Intevation GmbH <https://intevation.de> // Software-Engineering: 2022 Intevation GmbH <https://intevation.de>
package util package util //revive:disable-line:var-naming
import ( import (
"bytes" "bytes"

View file

@ -6,7 +6,7 @@
// SPDX-FileCopyrightText: 2023 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de> // SPDX-FileCopyrightText: 2023 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2023 Intevation GmbH <https://intevation.de> // Software-Engineering: 2023 Intevation GmbH <https://intevation.de>
package util package util //revive:disable-line:var-naming
// Set is a simple set type. // Set is a simple set type.
type Set[K comparable] map[K]struct{} type Set[K comparable] map[K]struct{}

View file

@ -6,7 +6,7 @@
// SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de> // SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
// Software-Engineering: 2022 Intevation GmbH <https://intevation.de> // Software-Engineering: 2022 Intevation GmbH <https://intevation.de>
package util package util //revive:disable-line:var-naming
import ( import (
"net/url" "net/url"