2021-05-10 09:08:04 +01:00
|
|
|
package cwe_test
|
|
|
|
|
|
|
|
import (
|
2022-01-03 17:11:35 +00:00
|
|
|
. "github.com/onsi/ginkgo/v2"
|
2021-05-10 09:08:04 +01:00
|
|
|
. "github.com/onsi/gomega"
|
2023-03-30 08:31:24 +01:00
|
|
|
|
2021-05-10 09:08:04 +01:00
|
|
|
"github.com/securego/gosec/v2/cwe"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ = Describe("CWE data", func() {
|
|
|
|
BeforeEach(func() {
|
|
|
|
})
|
|
|
|
Context("when consulting cwe data", func() {
|
|
|
|
It("it should retrieves the weakness", func() {
|
|
|
|
weakness := cwe.Get("798")
|
|
|
|
Expect(weakness).ShouldNot(BeNil())
|
|
|
|
Expect(weakness.ID).ShouldNot(BeNil())
|
|
|
|
Expect(weakness.Name).ShouldNot(BeNil())
|
|
|
|
Expect(weakness.Description).ShouldNot(BeNil())
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|