mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-11 08:55:27 +03:00
🌱 use a single source of truth for fuzzer names (#3786)
Signed-off-by: Spencer Schrock <sschrock@google.com>
This commit is contained in:
parent
e15264d9c8
commit
8c21a49352
@ -25,22 +25,7 @@ import (
|
||||
"github.com/ossf/scorecard/v4/clients"
|
||||
sce "github.com/ossf/scorecard/v4/errors"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
)
|
||||
|
||||
const (
|
||||
fuzzerOSSFuzz = "OSSFuzz"
|
||||
fuzzerClusterFuzzLite = "ClusterFuzzLite"
|
||||
fuzzerBuiltInGo = "GoBuiltInFuzzer"
|
||||
fuzzerPropertyBasedHaskell = "HaskellPropertyBasedTesting"
|
||||
fuzzerPropertyBasedJavaScript = "JavaScriptPropertyBasedTesting"
|
||||
fuzzerPropertyBasedTypeScript = "TypeScriptPropertyBasedTesting"
|
||||
fuzzerPythonAtheris = "PythonAtherisFuzzer"
|
||||
fuzzerCLibFuzzer = "CLibFuzzer"
|
||||
fuzzerCppLibFuzzer = "CppLibFuzzer"
|
||||
fuzzerSwiftLibFuzzer = "SwiftLibFuzzer"
|
||||
fuzzerRustCargoFuzz = "RustCargoFuzzer"
|
||||
fuzzerJavaJazzerFuzzer = "JavaJazzerFuzzer"
|
||||
// TODO: add more fuzzing check supports.
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
)
|
||||
|
||||
type filesWithPatternStr struct {
|
||||
@ -66,7 +51,7 @@ var languageFuzzSpecs = map[clients.LanguageName]languageFuzzConfig{
|
||||
clients.Go: {
|
||||
filePatterns: []string{"*_test.go"},
|
||||
funcPattern: `func\s+Fuzz\w+\s*\(\w+\s+\*testing.F\)`,
|
||||
Name: fuzzerBuiltInGo,
|
||||
Name: fuzzers.BuiltInGo,
|
||||
URL: asPointer("https://go.dev/doc/fuzz/"),
|
||||
Desc: asPointer(
|
||||
"Go fuzzing intelligently walks through the source code to report failures and find vulnerabilities."),
|
||||
@ -89,7 +74,7 @@ var languageFuzzSpecs = map[clients.LanguageName]languageFuzzConfig{
|
||||
// Look for direct imports of QuickCheck, Hedgehog, validity, or SmallCheck,
|
||||
// or their indirect imports through the higher-level Hspec or Tasty testing frameworks.
|
||||
funcPattern: `import\s+(qualified\s+)?Test\.((Hspec|Tasty)\.)?(QuickCheck|Hedgehog|Validity|SmallCheck)`,
|
||||
Name: fuzzerPropertyBasedHaskell,
|
||||
Name: fuzzers.PropertyBasedHaskell,
|
||||
Desc: propertyBasedDescription("Haskell"),
|
||||
},
|
||||
// Fuzz patterns for JavaScript and TypeScript based on property-based testing.
|
||||
@ -106,7 +91,7 @@ var languageFuzzSpecs = map[clients.LanguageName]languageFuzzConfig{
|
||||
// Look for direct imports of fast-check and its test runners integrations.
|
||||
funcPattern: `(from\s+['"](fast-check|@fast-check/(ava|jest|vitest))['"]|` +
|
||||
`require\(\s*['"](fast-check|@fast-check/(ava|jest|vitest))['"]\s*\))`,
|
||||
Name: fuzzerPropertyBasedJavaScript,
|
||||
Name: fuzzers.PropertyBasedJavaScript,
|
||||
Desc: propertyBasedDescription("JavaScript"),
|
||||
},
|
||||
clients.TypeScript: {
|
||||
@ -114,48 +99,48 @@ var languageFuzzSpecs = map[clients.LanguageName]languageFuzzConfig{
|
||||
// Look for direct imports of fast-check and its test runners integrations.
|
||||
funcPattern: `(from\s+['"](fast-check|@fast-check/(ava|jest|vitest))['"]|` +
|
||||
`require\(\s*['"](fast-check|@fast-check/(ava|jest|vitest))['"]\s*\))`,
|
||||
Name: fuzzerPropertyBasedTypeScript,
|
||||
Name: fuzzers.PropertyBasedTypeScript,
|
||||
Desc: propertyBasedDescription("TypeScript"),
|
||||
},
|
||||
clients.Python: {
|
||||
filePatterns: []string{"*.py"},
|
||||
funcPattern: `import atheris`,
|
||||
Name: fuzzerPythonAtheris,
|
||||
Name: fuzzers.PythonAtheris,
|
||||
Desc: asPointer(
|
||||
"Python fuzzing by way of Atheris"),
|
||||
},
|
||||
clients.C: {
|
||||
filePatterns: []string{"*.c"},
|
||||
funcPattern: `LLVMFuzzerTestOneInput`,
|
||||
Name: fuzzerCLibFuzzer,
|
||||
Name: fuzzers.CLibFuzzer,
|
||||
Desc: asPointer(
|
||||
"Fuzzed with C LibFuzzer"),
|
||||
},
|
||||
clients.Cpp: {
|
||||
filePatterns: []string{"*.cc", "*.cpp"},
|
||||
funcPattern: `LLVMFuzzerTestOneInput`,
|
||||
Name: fuzzerCppLibFuzzer,
|
||||
Name: fuzzers.CppLibFuzzer,
|
||||
Desc: asPointer(
|
||||
"Fuzzed with cpp LibFuzzer"),
|
||||
},
|
||||
clients.Rust: {
|
||||
filePatterns: []string{"*.rs"},
|
||||
funcPattern: `libfuzzer_sys`,
|
||||
Name: fuzzerRustCargoFuzz,
|
||||
Name: fuzzers.RustCargoFuzz,
|
||||
Desc: asPointer(
|
||||
"Fuzzed with Cargo-fuzz"),
|
||||
},
|
||||
clients.Java: {
|
||||
filePatterns: []string{"*.java"},
|
||||
funcPattern: `com.code_intelligence.jazzer.api.FuzzedDataProvider;`,
|
||||
Name: fuzzerJavaJazzerFuzzer,
|
||||
Name: fuzzers.JavaJazzerFuzzer,
|
||||
Desc: asPointer(
|
||||
"Fuzzed with Jazzer fuzzer"),
|
||||
},
|
||||
clients.Swift: {
|
||||
filePatterns: []string{"*.swift"},
|
||||
funcPattern: `LLVMFuzzerTestOneInput`,
|
||||
Name: fuzzerSwiftLibFuzzer,
|
||||
Name: fuzzers.SwiftLibFuzzer,
|
||||
Desc: asPointer(
|
||||
"Fuzzed with Swift LibFuzzer"),
|
||||
},
|
||||
@ -164,15 +149,15 @@ var languageFuzzSpecs = map[clients.LanguageName]languageFuzzConfig{
|
||||
|
||||
// Fuzzing runs Fuzzing check.
|
||||
func Fuzzing(c *checker.CheckRequest) (checker.FuzzingData, error) {
|
||||
var fuzzers []checker.Tool
|
||||
var detectedFuzzers []checker.Tool
|
||||
usingCFLite, e := checkCFLite(c)
|
||||
if e != nil {
|
||||
return checker.FuzzingData{}, fmt.Errorf("%w", e)
|
||||
}
|
||||
if usingCFLite {
|
||||
fuzzers = append(fuzzers,
|
||||
detectedFuzzers = append(detectedFuzzers,
|
||||
checker.Tool{
|
||||
Name: fuzzerClusterFuzzLite,
|
||||
Name: fuzzers.ClusterFuzzLite,
|
||||
URL: asPointer("https://github.com/google/clusterfuzzlite"),
|
||||
Desc: asPointer("continuous fuzzing solution that runs as part of Continuous Integration (CI) workflows"),
|
||||
// TODO: File.
|
||||
@ -185,9 +170,9 @@ func Fuzzing(c *checker.CheckRequest) (checker.FuzzingData, error) {
|
||||
return checker.FuzzingData{}, fmt.Errorf("%w", e)
|
||||
}
|
||||
if usingOSSFuzz {
|
||||
fuzzers = append(fuzzers,
|
||||
detectedFuzzers = append(detectedFuzzers,
|
||||
checker.Tool{
|
||||
Name: fuzzerOSSFuzz,
|
||||
Name: fuzzers.OSSFuzz,
|
||||
URL: asPointer("https://github.com/google/oss-fuzz"),
|
||||
Desc: asPointer("Continuous Fuzzing for Open Source Software"),
|
||||
// TODO: File.
|
||||
@ -206,7 +191,7 @@ func Fuzzing(c *checker.CheckRequest) (checker.FuzzingData, error) {
|
||||
return checker.FuzzingData{}, fmt.Errorf("%w", e)
|
||||
}
|
||||
if usingFuzzFunc {
|
||||
fuzzers = append(fuzzers,
|
||||
detectedFuzzers = append(detectedFuzzers,
|
||||
checker.Tool{
|
||||
Name: languageFuzzSpecs[lang].Name,
|
||||
URL: languageFuzzSpecs[lang].URL,
|
||||
@ -216,7 +201,7 @@ func Fuzzing(c *checker.CheckRequest) (checker.FuzzingData, error) {
|
||||
)
|
||||
}
|
||||
}
|
||||
return checker.FuzzingData{Fuzzers: fuzzers}, nil
|
||||
return checker.FuzzingData{Fuzzers: detectedFuzzers}, nil
|
||||
}
|
||||
|
||||
func checkCFLite(c *checker.CheckRequest) (bool, error) {
|
||||
|
32
internal/fuzzers/fuzzers.go
Normal file
32
internal/fuzzers/fuzzers.go
Normal file
@ -0,0 +1,32 @@
|
||||
// Copyright 2024 OpenSSF Scorecard Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package fuzzers defines the string constants used when identifying supported fuzzer tools.
|
||||
package fuzzers
|
||||
|
||||
const (
|
||||
OSSFuzz = "OSSFuzz"
|
||||
ClusterFuzzLite = "ClusterFuzzLite"
|
||||
BuiltInGo = "GoBuiltInFuzzer"
|
||||
PropertyBasedHaskell = "HaskellPropertyBasedTesting"
|
||||
PropertyBasedJavaScript = "JavaScriptPropertyBasedTesting"
|
||||
PropertyBasedTypeScript = "TypeScriptPropertyBasedTesting"
|
||||
PythonAtheris = "PythonAtherisFuzzer"
|
||||
CLibFuzzer = "CLibFuzzer"
|
||||
CppLibFuzzer = "CppLibFuzzer"
|
||||
SwiftLibFuzzer = "SwiftLibFuzzer"
|
||||
RustCargoFuzz = "RustCargoFuzzer"
|
||||
JavaJazzerFuzzer = "JavaJazzerFuzzer"
|
||||
// TODO: add more fuzzing check supports.
|
||||
)
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "CLibFuzzer")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.CLibFuzzer)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "CLibFuzzer",
|
||||
Name: fuzzers.CLibFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "CLibFuzzer",
|
||||
Name: fuzzers.CLibFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "CLibFuzzer",
|
||||
Name: fuzzers.CLibFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "CLibFuzzer",
|
||||
Name: fuzzers.CLibFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "not-CLibFuzzer",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "ClusterFuzzLite")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.ClusterFuzzLite)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "ClusterFuzzLite",
|
||||
Name: fuzzers.ClusterFuzzLite,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "ClusterFuzzLite",
|
||||
Name: fuzzers.ClusterFuzzLite,
|
||||
},
|
||||
{
|
||||
Name: "ClusterFuzzLite",
|
||||
Name: fuzzers.ClusterFuzzLite,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "ClusterFuzzLite",
|
||||
Name: fuzzers.ClusterFuzzLite,
|
||||
},
|
||||
{
|
||||
Name: "not-ClusterFuzzLite",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "CppLibFuzzer")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.CppLibFuzzer)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "CppLibFuzzer",
|
||||
Name: fuzzers.CppLibFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "CppLibFuzzer",
|
||||
Name: fuzzers.CppLibFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "CppLibFuzzer",
|
||||
Name: fuzzers.CppLibFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "CppLibFuzzer",
|
||||
Name: fuzzers.CppLibFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "not-CppLibFuzzer",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "GoBuiltInFuzzer")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.BuiltInGo)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "GoBuiltInFuzzer",
|
||||
Name: fuzzers.BuiltInGo,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "GoBuiltInFuzzer",
|
||||
Name: fuzzers.BuiltInGo,
|
||||
},
|
||||
{
|
||||
Name: "GoBuiltInFuzzer",
|
||||
Name: fuzzers.BuiltInGo,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "GoBuiltInFuzzer",
|
||||
Name: fuzzers.BuiltInGo,
|
||||
},
|
||||
{
|
||||
Name: "not-GoBuiltInFuzzer",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "JavaJazzerFuzzer")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.JavaJazzerFuzzer)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "JavaJazzerFuzzer",
|
||||
Name: fuzzers.JavaJazzerFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "JavaJazzerFuzzer",
|
||||
Name: fuzzers.JavaJazzerFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "JavaJazzerFuzzer",
|
||||
Name: fuzzers.JavaJazzerFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "JavaJazzerFuzzer",
|
||||
Name: fuzzers.JavaJazzerFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "not-JavaJazzerFuzzer",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "OSSFuzz")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.OSSFuzz)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "OSSFuzz",
|
||||
Name: fuzzers.OSSFuzz,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "OSSFuzz",
|
||||
Name: fuzzers.OSSFuzz,
|
||||
},
|
||||
{
|
||||
Name: "OSSFuzz",
|
||||
Name: fuzzers.OSSFuzz,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "OSSFuzz",
|
||||
Name: fuzzers.OSSFuzz,
|
||||
},
|
||||
{
|
||||
Name: "not-OSSFuzz",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "HaskellPropertyBasedTesting")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.PropertyBasedHaskell)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "HaskellPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedHaskell,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "HaskellPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedHaskell,
|
||||
},
|
||||
{
|
||||
Name: "HaskellPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedHaskell,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "HaskellPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedHaskell,
|
||||
},
|
||||
{
|
||||
Name: "not-HaskellPropertyBasedTesting",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "JavaScriptPropertyBasedTesting")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.PropertyBasedJavaScript)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "JavaScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedJavaScript,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "JavaScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedJavaScript,
|
||||
},
|
||||
{
|
||||
Name: "JavaScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedJavaScript,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "JavaScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedJavaScript,
|
||||
},
|
||||
{
|
||||
Name: "not-JavaScriptPropertyBasedTesting",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "TypeScriptPropertyBasedTesting")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.PropertyBasedTypeScript)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "TypeScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedTypeScript,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "TypeScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedTypeScript,
|
||||
},
|
||||
{
|
||||
Name: "TypeScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedTypeScript,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "TypeScriptPropertyBasedTesting",
|
||||
Name: fuzzers.PropertyBasedTypeScript,
|
||||
},
|
||||
{
|
||||
Name: "not-TypeScriptPropertyBasedTesting",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "PythonAtherisFuzzer")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.PythonAtheris)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "PythonAtherisFuzzer",
|
||||
Name: fuzzers.PythonAtheris,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "PythonAtherisFuzzer",
|
||||
Name: fuzzers.PythonAtheris,
|
||||
},
|
||||
{
|
||||
Name: "PythonAtherisFuzzer",
|
||||
Name: fuzzers.PythonAtheris,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "PythonAtherisFuzzer",
|
||||
Name: fuzzers.PythonAtheris,
|
||||
},
|
||||
{
|
||||
Name: "not-PythonAtherisFuzzer",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "RustCargoFuzzer")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.RustCargoFuzz)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "RustCargoFuzzer",
|
||||
Name: fuzzers.RustCargoFuzz,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "RustCargoFuzzer",
|
||||
Name: fuzzers.RustCargoFuzz,
|
||||
},
|
||||
{
|
||||
Name: "RustCargoFuzzer",
|
||||
Name: fuzzers.RustCargoFuzz,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "RustCargoFuzzer",
|
||||
Name: fuzzers.RustCargoFuzz,
|
||||
},
|
||||
{
|
||||
Name: "not-RustCargoFuzzer",
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/fuzzing"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -35,5 +36,5 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) {
|
||||
return nil, "", fmt.Errorf("%w: raw", uerror.ErrNil)
|
||||
}
|
||||
//nolint:wrapcheck
|
||||
return fuzzing.Run(raw, fs, Probe, "SwiftLibFuzzer")
|
||||
return fuzzing.Run(raw, fs, Probe, fuzzers.SwiftLibFuzzer)
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import (
|
||||
|
||||
"github.com/ossf/scorecard/v4/checker"
|
||||
"github.com/ossf/scorecard/v4/finding"
|
||||
"github.com/ossf/scorecard/v4/internal/fuzzers"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/test"
|
||||
"github.com/ossf/scorecard/v4/probes/internal/utils/uerror"
|
||||
)
|
||||
@ -42,7 +43,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "SwiftLibFuzzer",
|
||||
Name: fuzzers.SwiftLibFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -57,10 +58,10 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "SwiftLibFuzzer",
|
||||
Name: fuzzers.SwiftLibFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "SwiftLibFuzzer",
|
||||
Name: fuzzers.SwiftLibFuzzer,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -76,7 +77,7 @@ func Test_Run(t *testing.T) {
|
||||
FuzzingResults: checker.FuzzingData{
|
||||
Fuzzers: []checker.Tool{
|
||||
{
|
||||
Name: "SwiftLibFuzzer",
|
||||
Name: fuzzers.SwiftLibFuzzer,
|
||||
},
|
||||
{
|
||||
Name: "not-SwiftLibFuzzer",
|
||||
|
Loading…
Reference in New Issue
Block a user