Documentation ¶
Index ¶
- Constants
- func Extract(bundle, dir string) error
- type ArchiveWriter
- type CodeRevision
- type EngineOptions
- type Fuzzer
- type GitRevision
- type Metadata
- type NullArchiveWriter
- func (w *NullArchiveWriter) Close() error
- func (w *NullArchiveWriter) GetSourcePath(string) string
- func (w *NullArchiveWriter) HasFileEntry(string) bool
- func (w *NullArchiveWriter) WriteDir(string, string) error
- func (w *NullArchiveWriter) WriteFile(string, string) error
- func (w *NullArchiveWriter) WriteHardLink(string, string) error
- type RunEnvironment
- type TarArchiveWriter
- func (w *TarArchiveWriter) Close() error
- func (w *TarArchiveWriter) GetSourcePath(archivePath string) string
- func (w *TarArchiveWriter) HasFileEntry(archivePath string) bool
- func (w *TarArchiveWriter) WriteDir(archiveBasePath string, sourceDir string) error
- func (w *TarArchiveWriter) WriteFile(archivePath string, sourcePath string) error
- func (w *TarArchiveWriter) WriteHardLink(target string, linkname string) error
Constants ¶
const MetadataFileName = "bundle.yaml"
MetadataFileName is the name of the meta information yaml file within an artifact archive.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArchiveWriter ¶
type CodeRevision ¶
type CodeRevision struct {
Git *GitRevision `yaml:"git,omitempty"`
}
type EngineOptions ¶
type Fuzzer ¶
type Fuzzer struct { Target string `yaml:"target,omitempty"` Name string `yaml:"name,omitempty"` Path string `yaml:"path"` Engine string `yaml:"engine"` Sanitizer string `yaml:"sanitizer,omitempty"` // The different YAML field name is *not* a typo: For historical reasons, the "build_dir" field is supposed to // include the root directory of the *source* rather than the build tree of the project. Rather than expose all // cifuzz devs to this inconsistency, we keep it in the serialization logic. ProjectDir string `yaml:"build_dir"` Dictionary string `yaml:"dictionary,omitempty"` Seeds string `yaml:"seeds,omitempty"` LibraryPaths []string `yaml:"library_paths,omitempty"` RuntimePaths []string `yaml:"runtime_paths,omitempty"` EngineOptions EngineOptions `yaml:"engine_options,omitempty"` MaxRunTime uint `yaml:"max_run_time,omitempty"` }
Fuzzer specifies the type and locations of fuzzers contained in the archive.
type GitRevision ¶
type Metadata ¶
type Metadata struct { *RunEnvironment `yaml:"run_environment"` CodeRevision *CodeRevision `yaml:"code_revision,omitempty"` Fuzzers []*Fuzzer `yaml:"fuzzers"` }
Metadata defines meta information for artifacts contained within a fuzzing artifact archive.
func MetadataFromPath ¶ added in v0.36.0
type NullArchiveWriter ¶ added in v0.37.0
type NullArchiveWriter struct{}
func (*NullArchiveWriter) Close ¶ added in v0.37.0
func (w *NullArchiveWriter) Close() error
func (*NullArchiveWriter) GetSourcePath ¶ added in v0.37.0
func (w *NullArchiveWriter) GetSourcePath(string) string
func (*NullArchiveWriter) HasFileEntry ¶ added in v0.37.0
func (w *NullArchiveWriter) HasFileEntry(string) bool
func (*NullArchiveWriter) WriteDir ¶ added in v0.37.0
func (w *NullArchiveWriter) WriteDir(string, string) error
func (*NullArchiveWriter) WriteFile ¶ added in v0.37.0
func (w *NullArchiveWriter) WriteFile(string, string) error
func (*NullArchiveWriter) WriteHardLink ¶ added in v0.37.0
func (w *NullArchiveWriter) WriteHardLink(string, string) error
type RunEnvironment ¶
type RunEnvironment struct { // The docker image and tag to be used: eg. debian:stable Docker string }
RunEnvironment specifies the environment in which the fuzzers are to be run.
type TarArchiveWriter ¶ added in v0.37.0
TarArchiveWriter provides functions to create a gzip-compressed tar archive.
func NewTarArchiveWriter ¶ added in v0.37.0
func NewTarArchiveWriter(w io.Writer, compress bool) *TarArchiveWriter
func (*TarArchiveWriter) Close ¶ added in v0.37.0
func (w *TarArchiveWriter) Close() error
Close closes the tar writer and the gzip writer. It does not close the underlying io.Writer.
func (*TarArchiveWriter) GetSourcePath ¶ added in v0.37.0
func (w *TarArchiveWriter) GetSourcePath(archivePath string) string
func (*TarArchiveWriter) HasFileEntry ¶ added in v0.37.0
func (w *TarArchiveWriter) HasFileEntry(archivePath string) bool
func (*TarArchiveWriter) WriteDir ¶ added in v0.37.0
func (w *TarArchiveWriter) WriteDir(archiveBasePath string, sourceDir string) error
WriteDir traverses sourceDir recursively and writes all regular files and symlinks to the archive.
func (*TarArchiveWriter) WriteFile ¶ added in v0.37.0
func (w *TarArchiveWriter) WriteFile(archivePath string, sourcePath string) error
WriteFile writes the contents of sourcePath to the archive, with the filename archivePath (so when the archive is extracted, the file will be created at archivePath). Symlinks will be followed. WriteFile only handles regular files and symlinks.
func (*TarArchiveWriter) WriteHardLink ¶ added in v0.37.0
func (w *TarArchiveWriter) WriteHardLink(target string, linkname string) error
WriteHardLink adds a hard link header to the archive. When the archive is extracted, a hard link to target with the name linkname is created.