platform

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SourceDateFormat = "2006-01-02"

Functions

func AvailableKinds

func AvailableKinds() []string

func FinalizeArtifact

func FinalizeArtifact(a *Artifact)

FinalizeArtifact does some final manipulation on an artifact for consistency.

func SuggestKind

func SuggestKind(path string) (string, error)

Types

type Artifact

type Artifact struct {
	Metadata  *Source
	UserCount int    `yaml:"user_count,omitempty"`
	Users     []User `yaml:"users,omitempty"`

	Ingress []FirewallRuleMeta `yaml:"ingress,omitempty"`
	Egress  []FirewallRuleMeta `yaml:"egress,omitempty"`

	BotCount        int                 `yaml:"bot_count,omitempty"`
	Bots            []User              `yaml:"bots,omitempty"`
	GroupCount      int                 `yaml:"group_count,omitempty"`
	Groups          []Group             `yaml:"groups,omitempty"`
	OrgCount        int                 `yaml:"org_count,omitempty"`
	Orgs            []Group             `yaml:"orgs,omitempty"`
	RoleCount       int                 `yaml:"role_count,omitempty"`
	Roles           map[string][]string `yaml:"roles,omitempty"`
	PermissionCount int                 `yaml:"permission_count,omitempty"`
	Permissions     map[string][]string `yaml:"permissions,omitempty"`
}

type Auth0Members

type Auth0Members struct{}

Auth0Members parses the CSV file generated by the OnePassword Team page.

func (*Auth0Members) Description

func (p *Auth0Members) Description() ProcessorDescription

func (*Auth0Members) Process

func (p *Auth0Members) Process(c Config) (*Artifact, error)

type Config

type Config struct {
	Path               string
	Reader             io.Reader
	Project            string
	Kind               string
	GCPIdentityProject string

	GCPMemberCache GCPMemberCache
}

type FirewallRule

type FirewallRule struct {
	Allow        string `yaml:"allow,omitempty"`
	Deny         string `yaml:"deny,omitempty"`
	Network      string `yaml:"net,omitempty"`
	Sources      string `yaml:"sources,omitempty"`
	Destinations string `yaml:"destinations,omitempty"`
	SourceTags   string `yaml:"source_tags,omitempty"`
	TargetTags   string `yaml:"target_tags,omitempty"`
}

FirewallRule

type FirewallRuleMeta

type FirewallRuleMeta struct {
	Name        string
	Description string `yaml:"description,omitempty"`
	Logging     bool   `yaml:"logging,omitempty"`
	Priority    int    `yaml:"priority,omitempty"`
	Rule        FirewallRule
}

type GCPMemberCache

type GCPMemberCache = map[string][]gcpGroupMembership

func NewGCPMemberCache

func NewGCPMemberCache() GCPMemberCache

NewGCPMemberCache returns a populated structure to be used for caching membership lookups.

type GhostStaff

type GhostStaff struct{}

GhostStaff parses the HTML output of the Ghost Staff page.

func (*GhostStaff) Description

func (p *GhostStaff) Description() ProcessorDescription

func (*GhostStaff) Process

func (p *GhostStaff) Process(c Config) (*Artifact, error)

type GithubOrgMembers

type GithubOrgMembers struct{}

GithubOrgMembers parses the CSV file generated by the Github Members page.

func (*GithubOrgMembers) Description

func (p *GithubOrgMembers) Description() ProcessorDescription

func (*GithubOrgMembers) Process

func (p *GithubOrgMembers) Process(c Config) (*Artifact, error)

type GoogleCloudProjectFirewall

type GoogleCloudProjectFirewall struct{}

GoogleCloudProjectFirewall uses gcloud to generate a list of firewalls

func (*GoogleCloudProjectFirewall) Description

func (*GoogleCloudProjectFirewall) Process

func (p *GoogleCloudProjectFirewall) Process(c Config) (*Artifact, error)

type GoogleCloudProjectIAM

type GoogleCloudProjectIAM struct{}

GoogleCloudProjectIAM uses gcloud to generate a list of GCP members.

func (*GoogleCloudProjectIAM) Description

func (*GoogleCloudProjectIAM) Process

func (p *GoogleCloudProjectIAM) Process(c Config) (*Artifact, error)

type GoogleWorkspaceUserAudit

type GoogleWorkspaceUserAudit struct{}

GoogleWorkspaceUserAudit parses the CSV file generated by the Google User Audit page.

func (*GoogleWorkspaceUserAudit) Description

func (*GoogleWorkspaceUserAudit) Process

func (p *GoogleWorkspaceUserAudit) Process(c Config) (*Artifact, error)

type GoogleWorkspaceUsers

type GoogleWorkspaceUsers struct{}

GoogleWorkspaceUsers parses the CSV file generated by the users page.

func (*GoogleWorkspaceUsers) Description

func (p *GoogleWorkspaceUsers) Description() ProcessorDescription

func (*GoogleWorkspaceUsers) Process

func (p *GoogleWorkspaceUsers) Process(c Config) (*Artifact, error)

type Group

type Group struct {
	Name        string   `yaml:",omitempty"`
	Description string   `yaml:",omitempty"`
	Permissions []string `yaml:"permissions,omitempty"`
	Members     []string
}

type KolideUsers

type KolideUsers struct{}

KolideUsers parses the CSV file generated by the Kolide Users page.

func (*KolideUsers) Description

func (p *KolideUsers) Description() ProcessorDescription

func (*KolideUsers) Process

func (p *KolideUsers) Process(c Config) (*Artifact, error)

type Membership

type Membership struct {
	Name        string   `yaml:",omitempty"`
	Description string   `yaml:",omitempty"`
	Role        string   `yaml:",omitempty"`
	Permissions []string `yaml:"permissions,omitempty"`
}

type OnePasswordTeam

type OnePasswordTeam struct{}

OnePasswordTeam parses the CSV file generated by the OnePassword Team page.

func (*OnePasswordTeam) Description

func (p *OnePasswordTeam) Description() ProcessorDescription

func (*OnePasswordTeam) Process

func (p *OnePasswordTeam) Process(c Config) (*Artifact, error)

type Processor

type Processor interface {
	Description() ProcessorDescription
	Process(c Config) (*Artifact, error)
}

func Available

func Available() []Processor

func New

func New(kind string) (Processor, error)

type ProcessorDescription

type ProcessorDescription struct {
	Kind             string
	Name             string
	Steps            []string
	OptionalFields   []string
	MatchingFilename *regexp.Regexp
	NoInputRequired  bool
}

type SecureframePersonnel

type SecureframePersonnel struct{}

SecureframePersonnel parses the CSV file generated by the Secureframe Personnel page.

func (*SecureframePersonnel) Description

func (p *SecureframePersonnel) Description() ProcessorDescription

func (*SecureframePersonnel) Process

func (p *SecureframePersonnel) Process(c Config) (*Artifact, error)

type SlackMembers

type SlackMembers struct{}

SlackMembers parses the HTML output of the Slack Members page.

func (*SlackMembers) Description

func (p *SlackMembers) Description() ProcessorDescription

func (*SlackMembers) Process

func (p *SlackMembers) Process(c Config) (*Artifact, error)

type Source

type Source struct {
	Kind        string
	Name        string
	ID          string    `yaml:",omitempty"`
	SourceDate  string    `yaml:"source_date,omitempty"`
	GeneratedAt time.Time `yaml:"generated_at"`
	GeneratedBy string    `yaml:"generated_by"`
	Process     []string
	// contains filtered or unexported fields
}

func NewSourceFromConfig

func NewSourceFromConfig(c Config, p Processor) (*Source, error)

NewSourceFromConfig begins processing a source file, returning a source struct.

type User

type User struct {
	Account           string
	Name              string       `yaml:",omitempty"`
	Role              string       `yaml:",omitempty"`
	Permissions       []string     `yaml:",omitempty"`
	Status            string       `yaml:",omitempty"`
	Groups            []Membership `yaml:",omitempty"`
	Org               string       `yaml:",omitempty"`
	TwoFactorDisabled bool         `yaml:"two_factor_disabled,omitempty"`
	SSO               string       `yaml:"sso,omitempty"`
}

type VercelMembers

type VercelMembers struct{}

VercelMembers parses the HTML output of the Vercel Members page.

func (*VercelMembers) Description

func (p *VercelMembers) Description() ProcessorDescription

func (*VercelMembers) Process

func (p *VercelMembers) Process(c Config) (*Artifact, error)

type WebflowMembers

type WebflowMembers struct{}

WebflowMembers parses the CSV file generated by the OnePassword Team page.

func (*WebflowMembers) Description

func (p *WebflowMembers) Description() ProcessorDescription

func (*WebflowMembers) Process

func (p *WebflowMembers) Process(c Config) (*Artifact, error)

Jump to

Keyboard shortcuts

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