config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config reads the files under .firedrill/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GitHub struct {
		Org   string   `yaml:"org"`
		Repos []string `yaml:"repos"`
	} `yaml:"github"`
	Google struct {
		Domain     string `yaml:"domain"`
		AdminEmail string `yaml:"admin_email"`
	} `yaml:"google"`
	AWS struct {
		Accounts []struct {
			Profile string `yaml:"profile"`
		} `yaml:"accounts"`
		BreakGlass []string `yaml:"break_glass"`
	} `yaml:"aws"`
	GCP struct {
		Projects      []string `yaml:"projects"`
		MemberDomains []string `yaml:"member_domains"`
	} `yaml:"gcp"`
	HR struct {
		LeaversCSV string `yaml:"leavers_csv"`
	} `yaml:"hr"`
	Hub struct {
		Repo string `yaml:"repo"` // owner/name of the drill hub
		Ref  string `yaml:"ref"`  // branch, tag or commit
	} `yaml:"hub"`
	Semgrep struct {
		Results string `yaml:"results"`
	} `yaml:"semgrep"`
	Domains      []string  `yaml:"domains"`
	DefaultOwner string    `yaml:"default_owner"`
	Retired      []Retired `yaml:"retired"`
	Secrets      struct {
		ExamplePaths []string `yaml:"example_paths"`
		ProdWords    []string `yaml:"prod_words"`
		StagingWords []string `yaml:"staging_words"`
	} `yaml:"secrets"`
	Agents struct {
		DestructiveCommands []string `yaml:"destructive_commands"`
	} `yaml:"agents"`
	Web struct {
		ExcludeHosts []string `yaml:"exclude_hosts"`
	} `yaml:"web"`
}

Config is .firedrill/config.yaml.

func (Config) RetiredTarget

func (c Config) RetiredTarget(target string) *Retired

RetiredTarget returns the retirement entry of a target.

type Host

type Host struct {
	Host  string `yaml:"host"`
	Owner string `yaml:"owner"`
}

Host maps a host to its owner.

type Project

type Project struct {
	Dir     string
	Config  Config
	Waivers []Waiver
	Hosts   []Host
	People  map[string]string
}

Project is everything under one .firedrill directory.

func Load

func Load(dir string) (*Project, error)

Load reads a project. Only config.yaml must exist.

type Retired

type Retired struct {
	Target     string `yaml:"target"`
	Reason     string `yaml:"reason"`
	ApprovedBy string `yaml:"approved_by"`
}

Retired names a target that no longer exists.

type Waiver

type Waiver struct {
	Drill   string `yaml:"drill"`
	Target  string `yaml:"target"`
	Finding *struct {
		File string `yaml:"file"`
		Hash string `yaml:"hash"`
	} `yaml:"finding"`
	Reason     string `yaml:"reason"`
	ApprovedBy string `yaml:"approved_by"`
	Expires    string `yaml:"expires"`
}

Waiver is one accepted risk.

func (Waiver) Active

func (w Waiver) Active(now time.Time) bool

Active says whether a waiver still applies on a date.

Jump to

Keyboard shortcuts

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