repo_id
stringclasses
927 values
file_path
stringlengths
99
214
content
stringlengths
2
4.15M
symbols
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/patched_functions_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package symbols import ( "go/ast" "go/parser" "go/token" "path/filepath" "sort" "testing" "github.com/google/go-cmp/cmp" ) func TestPatchedSymbols(t *t...
module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/foo_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "testing" func TestFoo(t *testing.T) { if err := Foo(); err != nil { t.Error(err) } }
module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/go.mod
module golang.org/module go 1.22
module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/foo.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "golang.org/module/internal" func Foo() error { internal.Bar() return nil }
module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/main.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main func main() { Foo() }
submodule
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/submodule/main_linux.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux package main func main() {}
submodule
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/submodule/go.mod
module golang.org/nestedmodule go 1.22
submodule
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/submodule/main_windows.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows package main func main() {}
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/submodule/testdata/go.mod
module golang.org/testdata go 1.22
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/submodule/testdata/main.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main func main() {}
internal
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/module/internal/bar.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package internal func Bar() {}
fixed-module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/foo_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "testing" func TestFoo(t *testing.T) { if err := Foo(); err != nil { t.Error(err) } }
fixed-module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/go.mod
module golang.org/module go 1.22
fixed-module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/foo.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main func Foo() error { return nil }
fixed-module
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/main.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main func main() { Foo() }
submodule
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/submodule/main_linux.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux package main func main() { bar() } func bar() {}
submodule
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/submodule/go.mod
module golang.org/nestedmodule go 1.22
submodule
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/submodule/main_windows.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows package main func main() {}
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/submodule/testdata/go.mod
module golang.org/testdata go 1.22
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/symbols/testdata/fixed-module/submodule/testdata/main.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "fmt" func main() { fmt.Println("hello world") }
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/json.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "encoding/json" "os" "golang.org/x/vulndb/internal/derrors" ) func WriteJSON(filename string, value any, indent bool) (err error...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/endpoints.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database var ( indexDir = "index" idDir = "ID" dbEndpoint = "db.json" modulesEndpoint = "modules.json" vulnsEndpoint = "vu...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/write.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "encoding/json" "fmt" "os" "path/filepath" ) func (db *Database) Write(dir string) error { gzip := true if err := db.writeInde...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/write_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "fmt" "testing" "golang.org/x/mod/sumdb/dirhash" ) func TestWrite(t *testing.T) { want := t.TempDir() gzip := true if err := ...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/all_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "context" "flag" "os" "testing" "github.com/google/go-cmp/cmp" "golang.org/x/vulndb/internal/gitrepo" ) var integration = fla...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/database.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package database provides functionality for reading, writing, and // validating Go vulnerability databases according to the v1 schema. package database impo...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/gzip_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "path/filepath" "testing" ) func TestWriteReadGzipped(t *testing.T) { filename := filepath.Join(t.TempDir(), "test.json.gz") wa...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/database_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "encoding/json" "testing" "golang.org/x/tools/txtar" ) func TestMarshalUnmarshal(t *testing.T) { ar, err := txtar.ParseFile(val...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/txtar_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "bytes" "encoding/json" "fmt" "os" "path/filepath" "golang.org/x/tools/txtar" ) // Helper functions for working with txtar fi...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/validate_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "strings" "testing" "golang.org/x/vulndb/internal/osv" ) func TestValidate(t *testing.T) { small, big, invalid := t.TempDir(), ...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/write_zip_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "path/filepath" "testing" ) func TestWriteZip(t *testing.T) { tmp, want, got := t.TempDir(), t.TempDir(), t.TempDir() if err := ...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/from_repo.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "context" "encoding/json" "fmt" "path" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/object" "golang.or...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/new_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "testing" "time" "github.com/google/go-cmp/cmp" "golang.org/x/vulndb/internal/osv" "golang.org/x/vulndb/internal/report" ) var...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/validate.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "fmt" "path/filepath" "golang.org/x/vulndb/internal/derrors" "golang.org/x/vulndb/internal/osv" ) // ValidateDeploy checks that...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/write_zip.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "archive/zip" "encoding/json" "io" "os" "path/filepath" ) // WriteZip writes the database to filename as a zip file. func (db *...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/new.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "fmt" "golang.org/x/vulndb/internal/osv" "golang.org/x/vulndb/internal/version" ) // New creates a new database from the given e...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/from_repo_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "github.com/google/go-cmp/cmp" "golang.org/x/vulndb/internal/gitrepo" "golang.org/x/vulndb/internal/osv" "...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/load.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "encoding/json" "fmt" "io/fs" "os" "path/filepath" "golang.org/x/exp/slices" "golang.org/x/vulndb/internal/derrors" "golang....
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/gzip.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "bytes" "compress/gzip" "io/ioutil" "os" ) // writeGzipped compresses the data in data and writes it // to filename, creating th...
database
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/load_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package database import ( "path/filepath" "regexp" "testing" "github.com/google/go-cmp/cmp" ) func TestLoad(t *testing.T) { tmp := t.TempDir() gzip := ...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/db-small.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test database for the Go vulnerability database v1 schema with one // entry. -- index/db.json -- { "modified": "2003-01-01T00:00:00Z" } -- index/vuln...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/vulndb-repo.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test representation of the vulndb repo. // Modified times will be overwritten with time of CL // submission. Published times will be overwritten if unset (...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/invalid-modules.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test database for the Go vulnerability database v1 schema. // This database is invalid because modules.json is missing // an entry for "GO-1999-0001". -- ...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/invalid-db-meta.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test database for the Go vulnerability database v1 schema. // This database is invalid because the modified time in db.json // is incorrect. -- index/db.j...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/invalid-entries.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test database for the Go vulnerability database v1 schema. // This database is invalid because the entry "ID/GO-1999-0001.json" // is formatted as an array...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/db.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test database for the Go vulnerability database v1 schema with // three entries. -- index/db.json -- { "modified": "2003-01-01T00:00:00Z" } -- index/...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/invalid-vulns.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test database for the Go vulnerability database v1 schema. // This database is invalid because there is an additional vuln // in vulns.json that is not pre...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/database/testdata/invalid-filename.txtar
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Test database for the Go vulnerability database v1 schema. // This database is invalid because the entry "ID/example.json" // should be called "ID/GO-1999-...
test
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/test/txtar_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package test import ( "io/fs" "path/filepath" "testing" "github.com/google/go-cmp/cmp" "golang.org/x/tools/txtar" ) func TestWriteTxtar(t *testing.T) { ...
test
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/test/txtar.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package test import ( "errors" "fmt" "io/fs" "os" "path/filepath" "regexp" "strconv" "testing/fstest" "time" "github.com/google/go-cmp/cmp" "golang...
test
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/internal/test/packages.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package test import ( "strings" "testing" "golang.org/x/tools/go/packages" ) // VerifyImports verifies that a package only imports from allowed. func Veri...
devtools
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/devtools/curl_worker.sh
#!/bin/bash # Copyright 2021 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Visit a URL on the vuln worker. set -e source devtools/lib.sh || { echo "Are you at repo root?"; exit 1; } env=$1 path=$2 url=$(worker_url $env)...
devtools
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/devtools/deploy_worker.sh
#!/bin/bash # Copyright 2021 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Deploy the vuln worker to Cloud Run, using Cloud Build. set -e source devtools/lib.sh || { echo "Are you at repo root?"; exit 1; } # Report wheth...
devtools
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/devtools/proxy_worker.sh
#!/bin/bash # Copyright 2022 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Start the cloud run proxy pointing at a worker. # To install the proxy: # go install github.com/GoogleCloudPlatform/cloud-run-proxy@latest set -...
devtools
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/devtools/lib.sh
# Copyright 2021 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Library of useful bash functions and variables. RED=; GREEN=; YELLOW=; NORMAL=; MAXWIDTH=0 if tput setaf 1 >& /dev/null; then RED=`tput setaf 1` GREEN=`tpu...
populate_firestore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/devtools/cmd/populate_firestore/populate_firestore.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Populate the firestore DB with commit times. // This is a one-time update to backfill data. package main import ( "context" "flag" "fmt" "log" "string...
checkdeploy
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/checkdeploy/main.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Command checkdeploy validates that it is safe to deploy a new // vulnerability database. package main import ( "flag" "fmt" "log" db "golang.org/x/vuln...
gendb
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/gendb/main.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Command gendb provides a tool for converting YAML reports into JSON // Go vulnerability databases. package main import ( "context" "flag" "log" db "gol...
worker
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/worker/Dockerfile
# Copyright 2021 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # This Dockerfile expects the build context to be the repo root. ################################################################ FROM golang:1.21 AS builder # If...
worker
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/worker/main.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Command worker runs the vuln worker server. // It can also be used to perform actions from the command line // by providing a sub-command. package main impo...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/commit.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "cmp" "context" "errors" "flag" "fmt" "path/filepath" "slices" "strings" "github.com/go-git/go-git/v5" "golang.org/x/exp/maps"...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/xref.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "golang.org/x/exp/constraints" "golang.org/x/exp/slices" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.org/x/vu...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/triage.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" _ "embed" "fmt" "path/filepath" "strconv" "strings" "sync" "golang.org/x/exp/slices" "golang.org/x/vulndb/cmd/vulnrep...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/suggest.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "flag" "fmt" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.org/x/vulndb/internal/genai" "golang.org/x/vulndb/internal...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/creator.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "net/http" "os" "strings" "golang.org/x/exp/slices" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.org/x/vulnd...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/vulnreport_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "testing" ) func TestCreate(t *testing.T) { for _, tc := range []*testCase{ // TODO(tatianabradley): add test cases } { runTest(t...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/issue_client.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "cmp" "context" "fmt" "slices" "golang.org/x/exp/maps" "golang.org/x/tools/txtar" "golang.org/x/vulndb/internal/issues" "gopkg.i...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/writer.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "bytes" "context" "encoding/json" "os" "path/filepath" "time" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.org/x/vulndb/inte...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/find_aliases_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "strings" "testing" "github.com/google/go-cmp/cmp" "golang.org/x/vulndb/cmd/vulnreport/log" ) func TestAliasesBFS...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/run_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "bytes" "context" _ "embed" "flag" "fmt" "io/fs" "path/filepath" "strings" "testing" "time" "github.com/google/go-cmp/cmp" "...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/symbols.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "flag" "golang.org/x/vulndb/internal/symbols" ) var ( update = flag.Bool("update", false, "for symbols, populate the FixL...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/lint.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "strings" "golang.org/x/vulndb/internal/proxy" ) type lint struct { *linter *filenameParser noSkip } func (lint...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/fix.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "flag" "fmt" "net/http" "regexp" "runtime" "strings" "github.com/google/go-cmp/cmp" "golang.org/x/exp/slices" "golan...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/withdraw.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "flag" "fmt" "time" "golang.org/x/vulndb/internal/osv" "golang.org/x/vulndb/internal/report" ) var reason = flag.String...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/regenerate.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.or...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/command.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "errors" "fmt" "io/fs" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.org/x/vulndb/internal/issues" "golang.org/x/vul...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/unexclude.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "os" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.org/x/vulndb/internal/report" ) type unexclude struct { *cr...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/issue_parser.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "strconv" "strings" "golang.org/x/vulndb/internal/issues" ) // issueParser implements the "parseArgs" function of ...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/set_dates.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "golang.org/x/vulndb/internal/gitrepo" "golang.org/x/vulndb/internal/report" ) type setDates struct { dates map[st...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/create.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "flag" "golang.org/x/vulndb/internal/issues" ) var ( preferCVE = flag.Bool("cve", false, "for create, prefer CVEs o...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/find_aliases.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "golang.org/x/exp/slices" "golang.org/x/tools/txtar" "golang.org/x/vulndb/cmd/vulnreport/log" "golang.org/x/vulndb...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/osv.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" ) type osvCmd struct { *linter *fileWriter *filenameParser noSkip } func (osvCmd) name() string { return "osv" } func (...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/review.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "golang.org/x/vulndb/internal/report" ) type review struct { *creator *filenameParser } func (review) name() string { re...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/environment.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "fmt" "io/fs" "os" "github.com/go-git/go-git/v5" "golang.org/x/vulndb/cmd/vulnreport/priority" "golang.org/x/vulndb/int...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/main.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Command vulnreport provides a tool for creating a YAML vulnerability report for // x/vulndb. package main import ( "context" "flag" "fmt" "log" "os" "...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/cve.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" ) type cveCmd struct { *linter *filenameParser *fileWriter noSkip } func (cveCmd) name() string { return "cve" } func (...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/create_excluded.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "context" "errors" "fmt" "golang.org/x/vulndb/internal/issues" "golang.org/x/vulndb/internal/report" ) type createExcluded struct ...
vulnreport
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/git.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "os" "os/exec" "golang.org/x/vulndb/internal/derrors" ) func gitAdd(files ...string) (err error) { derrors.Wrap(&err, "git add") a...
log
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/log/log.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package log import ( "fmt" "io" "os" "log" "golang.org/x/vulndb/cmd/vulnreport/color" ) func SetQuiet() { loggers[infoLvl] = log.New(io.Discard, "", 0...
priority
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/priority/load.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package priority import ( "bytes" "compress/gzip" _ "embed" "encoding/csv" "io" "strconv" ) //go:embed data/importers.csv.gz var importers []byte func ...
priority
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/priority/priority.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package priority contains utilities for prioritizing vulnerability reports. package priority import ( "fmt" "strings" "golang.org/x/vulndb/internal/repo...
priority
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/priority/priority_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package priority import ( "testing" "github.com/google/go-cmp/cmp" "golang.org/x/vulndb/internal/report" ) var ( notGo1 = &report.Report{ Excluded: "NO...
priority
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/priority/priority/main.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Command priority gives direct access to the module prioritization // code used by vulnreport triage. // Prints the priority result for the given module(s). /...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/testdata/legacy_ghsas.txtar
# Copyright 2024 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Represents the GHSAs accessible via the Github GraphQL API. -- GHSA-xxxx-yyyy-zzzz -- id: GHSA-xxxx-yyyy-zzzz identifiers: - identifier: - type: CVE...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/testdata/modules.csv
module_path,imported_by golang.org/x/tools,50 golang.org/x/vuln,101 collectd.org,0
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/testdata/repo.txtar
# Copyright 2024 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -- data/reports/GO-9999-0001.yaml -- id: GO-9999-0001 modules: - module: golang.org/x/vulndb vulnerable_at: 0.0.0-20240716161253-dd7900b89e20 packages: ...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/testdata/issue_tracker.txtar
# Copyright 2024 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # Represents a Github issue tracker. -- 1 -- number: 1 title: "x/vulndb: potential Go vuln in golang.org/x/vulndb: GHSA-xxxx-yyyy-0001" assignee: user1 state: ope...
TestCVE
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/testdata/TestCVE/ok.txtar
Copyright 2024 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Expected output of test TestCVE/ok command: "vulnreport cve 1" -- out -- -- logs -- info: cve: operating on 1 report(s) info: cve data/reports/GO-9999-0001.yaml info: c...
TestCVE
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/testdata/TestCVE/err.txtar
Copyright 2024 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Expected output of test TestCVE/err command: "vulnreport cve 4" -- out -- -- logs -- info: cve: operating on 1 report(s) info: cve data/reports/GO-9999-0004.yaml ERROR:...
TestXref
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/vulndb/cmd/vulnreport/testdata/TestXref/found_xrefs.txtar
Copyright 2024 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Expected output of test TestXref/found_xrefs command: "vulnreport xref 4" -- out -- GO-9999-0004: found module xrefs - golang.org/x/tools appears in 1 other report(s): ...