Documentation
¶
Index ¶
- Constants
- func BrowsersSchemaJSON() []byte
- func CatalogJSON() []byte
- func CatalogSchemaJSON() []byte
- func CorpusJSON() []byte
- func GuardVectorsJSON() []byte
- func GuardVectorsSchemaJSON() []byte
- func ProtectedJSON() []byte
- func ProtectedSchemaJSON() []byte
- type App
- type Browser
- type Case
- func (c Case) CDP(l Layout) []string
- func (c Case) CIMOutput(l Layout, self int) string
- func (c Case) Commands(l Layout, self int) []FakeProcess
- func (c Case) DialContext(_ context.Context, network, addr string) (net.Conn, error)
- func (c Case) Env(l Layout) map[string]string
- func (c Case) ExpectedJSON(l Layout) ([]byte, error)
- func (c Case) Files(l Layout) map[string]string
- func (c Case) PSOutput(l Layout, self int) string
- func (c Case) Runs(goos string, supported ...string) bool
- func (c Case) Server(hostPort string) (Server, bool)
- func (c Case) Transport() http.RoundTripper
- type Catalog
- type CookieVector
- type DiscardException
- type Discovery
- type Electron
- type ElectronLaunch
- type ErrorPageRule
- type FakeProcess
- type GuardAnswer
- type GuardControlRun
- type GuardExpected
- type GuardGuess
- type GuardHop
- type GuardObservable
- type GuardObservation
- type GuardOutcome
- type GuardPaused
- type GuardRefusal
- type GuardSettle
- type GuardSkip
- type GuardSource
- type GuardStep
- type GuardTarget
- type GuardVector
- type GuardVectors
- type GuardWhere
- type Input
- type KeyVector
- type Launch
- type Layout
- func (l Layout) Config() string
- func (l Layout) Expand(s string) string
- func (l Layout) Join(parts ...string) string
- func (l Layout) SevenProfiles() string
- func (l Layout) SixProfiles() string
- func (l Layout) Token(name string) (string, bool)
- func (l Layout) UserDataDirs(id string) []string
- func (l Layout) WindowsRoot(name string) string
- type Linux
- type LinuxPlatform
- type Location
- type MacOS
- type MacOSPlatform
- type Names
- type Platforms
- type Pref
- type Process
- type Profiles
- type ProtectedOrigins
- type ProtectedVectors
- type Rank
- type Registry
- type Server
- type Seven
- type Six
- type SixRoot
- type SixRoots
- type TargetVector
- type Tiers
- type URLVector
- type Windows
- type WindowsPlatform
Constants ¶
View Source
const ( NeedUserDataDirs = "user-data-dirs" NeedProfiles = "seven-profiles" NeedFlag = "flag" NeedProcess = "process" NeedProbe = "probe" NeedOrigins = "origins" NeedInstalled = "installed" NeedSix = "six" NeedTabs = "tabs" )
View Source
const ( GuardTargetSeven = "seven" GuardTargetVault = "vault" GuardTargetVaultX = "vault-x" GuardTargetApex = "apex" GuardTargetOwn = "own" GuardTargetChromeNewtab = "chrome-newtab" GuardTargetChromeNewTabPage = "chrome-new-tab-page" GuardTargetChromeSettings = "chrome-settings" GuardTargetChromePasswords = "chrome-passwords" GuardTargetChromeSearch = "chrome-search" GuardTargetNetworkError = "network-error" GuardTargetChromeExtensionPage = "chrome-extension-page" GuardTargetFileRoot = "file-root" GuardOrdinary = "ordinary" GuardSameSite = "ordinary-same-site" GuardKindCDP = "cdp" GuardKindText = "text" GuardViaGuard = "guard" GuardViaUnguarded = "unguarded" GuardScopeAny = "any" GuardControl = "control" GuardGuarded = "guarded" GuardCapAutoAttach = "autoAttach" GuardCapBrowserSession = "browserSession" GuardCapBrowserContexts = "browserContexts" GuardCapChromeURLsAttach = "chromeUrlsAttach" GuardCapExtensionWorld = "extensionWorld" GuardCapDiscovery = "discovery" GuardCapClientExit = "clientExit" GuardCapSiteIsolationOff = "siteIsolationOff" GuardCapInboundDelay = "inboundDelay" GuardCapForwardAudit = "forwardAudit" GuardClientExit = "exit" GuardPageScript = "script" GuardSessionPage = "page" GuardSessionBrowser = "browser" GuardSessionEither = "page-or-browser" GuardSessionChild = "child" )
View Source
const ( OpenerProtected = "protected" OpenerUnprotected = "unprotected" OpenerUnknown = "unknown" )
View Source
const Schema = 1
Variables ¶
This section is empty.
Functions ¶
func BrowsersSchemaJSON ¶
func BrowsersSchemaJSON() []byte
func CatalogJSON ¶
func CatalogJSON() []byte
func CatalogSchemaJSON ¶
func CatalogSchemaJSON() []byte
func CorpusJSON ¶
func CorpusJSON() []byte
func GuardVectorsJSON ¶ added in v1.6.0
func GuardVectorsJSON() []byte
func GuardVectorsSchemaJSON ¶ added in v1.6.0
func GuardVectorsSchemaJSON() []byte
func ProtectedJSON ¶ added in v1.3.0
func ProtectedJSON() []byte
func ProtectedSchemaJSON ¶ added in v1.3.0
func ProtectedSchemaJSON() []byte
Types ¶
type Case ¶
type Case struct {
Name string `json:"name"`
Input Input `json:"case"`
Expected json.RawMessage `json:"expected"`
}
func (Case) DialContext ¶
func (Case) Transport ¶
func (c Case) Transport() http.RoundTripper
type Catalog ¶
type Catalog struct {
Schema int `json:"schema"`
MinChromiumMajor int `json:"minChromiumMajor"`
Browsers []Browser `json:"browsers"`
Electron Electron `json:"electron"`
Rank Rank `json:"rank"`
Discovery Discovery `json:"discovery"`
Seven Seven `json:"seven"`
ProtectedOrigins ProtectedOrigins `json:"protectedOrigins"`
Profiles Profiles `json:"profiles"`
Launch Launch `json:"launch"`
Platforms Platforms `json:"platforms"`
}
type CookieVector ¶ added in v1.3.0
type DiscardException ¶
type ElectronLaunch ¶
type ErrorPageRule ¶ added in v1.11.0
type FakeProcess ¶
type GuardAnswer ¶ added in v1.6.0
type GuardControlRun ¶ added in v1.6.0
type GuardControlRun struct {
Origin string `json:"origin"`
Via string `json:"via"`
Expected GuardExpected `json:"expected"`
}
type GuardExpected ¶ added in v1.6.0
type GuardExpected struct {
Checks map[string]GuardOutcome
Text string
}
func (GuardExpected) MarshalJSON ¶ added in v1.6.0
func (e GuardExpected) MarshalJSON() ([]byte, error)
func (*GuardExpected) UnmarshalJSON ¶ added in v1.6.0
func (e *GuardExpected) UnmarshalJSON(b []byte) error
type GuardGuess ¶ added in v1.6.0
type GuardGuess struct {
Between []string `json:"between"`
CDP string `json:"cdp"`
Params json.RawMessage `json:"params"`
}
type GuardObservable ¶ added in v1.6.0
type GuardObservable struct {
Own *bool `json:"own,omitempty"`
}
type GuardObservation ¶ added in v1.6.0
type GuardObservation struct {
Means string `json:"means"`
Check json.RawMessage `json:"check"`
DependsOn []string `json:"dependsOn,omitzero"`
Requires []string `json:"requires,omitempty"`
EitherWhen json.RawMessage `json:"eitherWhen,omitempty"`
}
type GuardOutcome ¶ added in v1.6.0
func (GuardOutcome) MarshalJSON ¶ added in v1.6.0
func (o GuardOutcome) MarshalJSON() ([]byte, error)
func (*GuardOutcome) UnmarshalJSON ¶ added in v1.6.0
func (o *GuardOutcome) UnmarshalJSON(b []byte) error
type GuardPaused ¶ added in v1.7.6
type GuardRefusal ¶ added in v1.6.0
type GuardSettle ¶ added in v1.6.0
type GuardSettle struct {
Beacon string `json:"beacon,omitempty"`
Served string `json:"served,omitempty"`
Or json.RawMessage `json:"or,omitempty"`
Title string `json:"title,omitempty"`
MS int `json:"ms,omitempty"`
Variant bool `json:"variant,omitempty"`
Session string `json:"session,omitempty"`
Required bool `json:"required,omitempty"`
DependsOn []string `json:"dependsOn,omitempty"`
}
type GuardSource ¶ added in v1.6.0
type GuardStep ¶ added in v1.6.0
type GuardStep struct {
Client string `json:"client,omitempty"`
RedirectSecret string `json:"redirectSecret,omitempty"`
ErrorPage string `json:"errorPage,omitempty"`
Secret string `json:"secret,omitempty"`
Unparseable bool `json:"unparseable,omitempty"`
ExtensionWorld string `json:"extensionWorld,omitempty"`
FrameRead string `json:"frameRead,omitempty"`
BFCacheRestore string `json:"bfcacheRestore,omitempty"`
Origin string `json:"origin,omitempty"`
Text string `json:"text,omitempty"`
CDP string `json:"cdp,omitempty"`
Params json.RawMessage `json:"params,omitempty"`
Refusable bool `json:"refusable,omitempty"`
Refusal *GuardRefusal `json:"refusal,omitempty"`
Page string `json:"page,omitempty"`
URL string `json:"url,omitempty"`
Hops []GuardHop `json:"hops,omitempty"`
From string `json:"from,omitempty"`
Context string `json:"context,omitempty"`
Expression string `json:"expression,omitempty"`
Credentials string `json:"credentials,omitempty"`
Status bool `json:"status,omitempty"`
Background *bool `json:"background,omitempty"`
Answer *GuardAnswer `json:"answer,omitempty"`
Children []GuardStep `json:"children,omitempty"`
Where *GuardWhere `json:"where,omitempty"`
Settle *GuardSettle `json:"settle,omitempty"`
Wait *int `json:"wait,omitempty"`
Paused *GuardPaused `json:"paused,omitempty"`
Guess *GuardGuess `json:"guess,omitempty"`
Session string `json:"session,omitempty"`
As string `json:"as,omitempty"`
On string `json:"on,omitempty"`
Requires []string `json:"requires,omitempty"`
}
type GuardTarget ¶ added in v1.6.0
type GuardVector ¶ added in v1.6.0
type GuardVector struct {
ID string `json:"id"`
Family string `json:"family"`
Kind string `json:"kind"`
Scope string `json:"scope"`
Setup []GuardStep `json:"setup"`
Trigger []GuardStep `json:"trigger"`
Targets []string `json:"targets"`
Requires []string `json:"requires,omitempty"`
Observe map[string]GuardObservation `json:"observe,omitempty"`
Live string `json:"live"`
LiveCheck json.RawMessage `json:"liveCheck,omitempty"`
Control GuardControlRun `json:"control"`
Expected GuardExpected `json:"expected"`
Skip *GuardSkip `json:"skip,omitempty"`
DefaultContext bool `json:"defaultContext,omitempty"`
DesignDependent []string `json:"designDependent,omitempty"`
Observable *GuardObservable `json:"observable,omitempty"`
AppliesTo []string `json:"appliesTo,omitempty"`
}
type GuardVectors ¶ added in v1.6.0
type GuardVectors struct {
SchemaVersion int `json:"schemaVersion"`
SetVersion string `json:"setVersion"`
Sources []GuardSource `json:"sources"`
Targets map[string]GuardTarget `json:"targets"`
Variants map[string]int `json:"variants"`
Capabilities map[string]string `json:"capabilities"`
Placeholders map[string]string `json:"placeholders"`
Vectors []GuardVector `json:"vectors"`
}
func Guard ¶ added in v1.6.0
func Guard() (*GuardVectors, error)
type GuardWhere ¶ added in v1.7.4
type Input ¶
type Input struct {
Description string `json:"description"`
OS []string `json:"os,omitempty"`
Needs []string `json:"needs"`
Env map[string]string `json:"env,omitempty"`
Files map[string]string `json:"files,omitempty"`
CDP []string `json:"cdp,omitempty"`
Origins []string `json:"origins,omitempty"`
ProbePorts []int `json:"probePorts,omitempty"`
Processes []FakeProcess `json:"processes,omitempty"`
HTTP map[string]Server `json:"http,omitempty"`
Installed json.RawMessage `json:"installed,omitempty"`
Auto *string `json:"auto,omitempty"`
}
type Launch ¶
type Launch struct {
ChromiumArgs []string `json:"chromiumArgs"`
Headless string `json:"headless"`
DisableFeaturesFlag string `json:"disableFeaturesFlag"`
Electron ElectronLaunch `json:"electron"`
}
type Layout ¶
func (Layout) SevenProfiles ¶
func (Layout) SixProfiles ¶ added in v1.2.0
func (Layout) UserDataDirs ¶
func (Layout) WindowsRoot ¶
type Linux ¶
type Linux struct {
Bins []string `json:"bins,omitempty"`
DesktopIDs []string `json:"desktopIds,omitempty"`
Flatpak string `json:"flatpak,omitempty"`
Snap string `json:"snap,omitempty"`
SnapDataDir []string `json:"snapDataDir,omitempty"`
ConfigDir []string `json:"configDir,omitempty"`
Debs []string `json:"debs,omitempty"`
}
type LinuxPlatform ¶
type LinuxPlatform struct {
Config Location `json:"config"`
}
type MacOSPlatform ¶
type MacOSPlatform struct {
Config Location `json:"config"`
}
type Platforms ¶
type Platforms struct {
MacOS MacOSPlatform `json:"macos"`
Windows WindowsPlatform `json:"windows"`
Linux LinuxPlatform `json:"linux"`
}
type Pref ¶
type Pref struct {
Path []string `json:"path"`
Value json.RawMessage `json:"value"`
Form string `json:"form,omitempty"`
}
type Process ¶
type Process struct {
Unix []string `json:"unix"`
Windows []string `json:"windows"`
PortFlag string `json:"portFlag"`
UserDataDirFlag string `json:"userDataDirFlag"`
ValueQuotes []string `json:"valueQuotes"`
ValueStop string `json:"valueStop"`
Wrappers []string `json:"wrappers"`
WrapperSuffixes []string `json:"wrapperSuffixes"`
}
type ProtectedOrigins ¶ added in v1.3.0
type ProtectedOrigins struct {
ErrorPage ErrorPageRule `json:"errorPage"`
Domains []string `json:"domains"`
Hosts []string `json:"hosts"`
Schemes []string `json:"schemes"`
InnerSchemes []string `json:"innerSchemes"`
AnySchemes []string `json:"anySchemes"`
ProtectedSchemes []string `json:"protectedSchemes"`
SchemeExceptions []string `json:"schemeExceptions"`
AboutScheme string `json:"aboutScheme"`
TargetTypes []string `json:"targetTypes"`
Inheriting []string `json:"inheriting"`
Unparseable string `json:"unparseable"`
UnparseableRefusal string `json:"unparseableRefusal"`
Refusal string `json:"refusal"`
}
type ProtectedVectors ¶ added in v1.3.0
type ProtectedVectors struct {
ErrorPage ErrorPageRule `json:"errorPage"`
Unparseable string `json:"unparseable"`
UnparseableRefusal string `json:"unparseableRefusal"`
Schema int `json:"schema"`
Origins []string `json:"origins"`
URLs []URLVector `json:"urls"`
Targets []TargetVector `json:"targets"`
CookieDomains []CookieVector `json:"cookieDomains"`
StorageKeys []KeyVector `json:"storageKeys"`
}
func Protected ¶ added in v1.3.0
func Protected() (*ProtectedVectors, error)
type Server ¶
type Server struct {
Version json.RawMessage `json:"version,omitempty"`
List json.RawMessage `json:"list,omitempty"`
}
type Seven ¶
type Seven struct {
OriginScheme string `json:"originScheme"`
OriginHostPattern string `json:"originHostPattern"`
ExcludedLabels []string `json:"excludedLabels"`
ExcludedLabelPrefixes []string `json:"excludedLabelPrefixes,omitempty"`
SitePattern string `json:"sitePattern"`
Switches []string `json:"switches"`
DisabledFeatures []string `json:"disabledFeatures"`
Prefs []Pref `json:"prefs"`
DiscardExceptions []DiscardException `json:"discardExceptions"`
CleanExit []Pref `json:"cleanExit"`
}
func (*Seven) IsSevenLabel ¶ added in v1.5.0
type TargetVector ¶ added in v1.3.0
type TargetVector struct {
DocumentURL string `json:"documentURL,omitempty"`
UnreachableURL string `json:"unreachableURL,omitempty"`
URL string `json:"url"`
Type string `json:"type,omitempty"`
Previous bool `json:"previous,omitempty"`
Opener string `json:"opener,omitempty"`
Protected bool `json:"protected"`
}
Click to show internal directories.
Click to hide internal directories.