client

package
v2.4.77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentGeneralError      = 1
	AgentNoPermissionError = 22
)
View Source
const FuzzitEndpoint = "https://app.fuzzit.dev"
View Source
const Version = "v2.4.77"

Variables

View Source
var HostToDocker = map[string]string{
	"stretch-llvm8":  "gcr.io/fuzzit-public/stretch-llvm8:64bdedf",
	"stretch-llvm9":  "gcr.io/fuzzit-public/stretch-llvm9:4e6f6d3",
	"bionic-swift51": "gcr.io/fuzzit-public/bionic-swift51:beb0e9b",
	"bionic-llvm7":   "gcr.io/fuzzit-public/bionic-llvm7:6cf3292",
}

Functions

func Contains added in v2.4.73

func Contains(arr []string, str string) bool

func DownloadFile added in v2.4.49

func DownloadFile(filepath string, url string) error

func GetValueFromEnv

func GetValueFromEnv(variables ...string) string

func IsDirEmpty

func IsDirEmpty(name string) (bool, error)

Types

type FuzzitClient

type FuzzitClient struct {
	Org          string
	Namespace    string
	ApiKey       string
	CustomToken  string
	Kind         string `json:"kind"`
	IdToken      string `json:"idToken"`
	RefreshToken string `json:"refreshToken"`
	ExpiresIn    string `json:"expiresIn"`
	LastRefresh  int64
	// contains filtered or unexported fields
}

func NewFuzzitClient

func NewFuzzitClient(apiKey string) (*FuzzitClient, error)

func (*FuzzitClient) CreateJob

func (c *FuzzitClient) CreateJob(jobConfig Job, additionalCorpus string, files []string) (*firestore.DocumentRef, error)

func (*FuzzitClient) CreateLocalJob

func (c *FuzzitClient) CreateLocalJob(jobConfig Job, files []string) error

func (*FuzzitClient) CreateTarget

func (c *FuzzitClient) CreateTarget(target Target, seedPath string, skipIsExists bool) (*firestore.DocumentRef, error)

func (*FuzzitClient) DownloadAndExtractCorpus

func (c *FuzzitClient) DownloadAndExtractCorpus(dst string, target string) error

func (*FuzzitClient) DownloadAndExtractFuzzer

func (c *FuzzitClient) DownloadAndExtractFuzzer(dst string, target string, job string) error

func (*FuzzitClient) DownloadAndExtractSeed

func (c *FuzzitClient) DownloadAndExtractSeed(dst string, target string) error

func (*FuzzitClient) GetResource

func (c *FuzzitClient) GetResource(resource string) error

func (*FuzzitClient) RunFuzzer added in v2.4.48

func (c *FuzzitClient) RunFuzzer(job Job, jobId string, updateDB bool) error

func (*FuzzitClient) RunJQF added in v2.4.65

func (c *FuzzitClient) RunJQF() error

type Job

type Job struct {
	TargetId             string    `firestore:"target_id"`
	Args                 string    `firestore:"args"`
	Type                 string    `firestore:"type"`
	Engine               string    `firestore:"engine"`
	Host                 string    `firestore:"host"`
	Revision             string    `firestore:"revision"`
	Branch               string    `firestore:"branch"`
	CPUs                 string    `firestore:"cpus"`
	Memory               string    `firestore:"memory"`
	EnvironmentVariables []string  `firestore:"environment_variables"`
	Completed            uint16    `firestore:"completed"`
	Status               string    `firestore:"status"`
	Namespace            string    `firestore:"namespace"`
	StartedAt            time.Time `firestore:"started_at,serverTimestamp"`
	OrgId                string    `firestore:"org_id"`
}

type Target

type Target struct {
	Name         string `firestore:"target_name"`
	PublicCorpus bool   `firestore:"public_corpus"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL