browserext

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 16 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 browserext inventories the extensions installed in a developer's browsers.

The unit of collection is a browser: one set of data directories, one parser family, one coverage status. A browser's status answers whether the set of extension identities reported for it is complete, because the state it feeds is stored per extension and only a complete list can authorise deleting the rows it leaves out. Anything else, an unresolved name or a permission list too long to ship whole, degrades the browser without casting doubt on membership.

Every location is an exact path under the target user's home rather than a tree to walk, every read has a byte cap and goes through descriptors that follow no symlink, and nothing executes: no browser is launched, no store is called, and the browsers' SQLite stores (cookies, history, passwords) are never opened.

Adding a browser of a family already here is a table row. A new family is a parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector inventories the extensions installed in this machine's browsers. It reads the browsers' own state files and nothing else: no browser is launched, no store is asked what it published, and no extension's code is opened.

func New

func New(exec executor.Executor) *Detector

New builds a detector.

func (*Detector) Detect

func (d *Detector) Detect(ctx context.Context, target *user.User) (info *model.BrowserExtensionScanInfo)

Detect returns the inventory for one run, for the account named by target.

It returns nil, the "did not run" sentinel, when there is no interactive account to describe. Reading a service account's home would find no browser at all and report every browser missing, which a reader honours by deleting the device's real inventory. Never an error: a browser that could not be read is a coverage status, and a per-extension failure degrades one finding.

func (*Detector) WithOSVersion added in v1.17.0

func (d *Detector) WithOSVersion(version string) *Detector

WithOSVersion uses the OS version already gathered for this run.

func (*Detector) WithSkipper

func (d *Detector) WithSkipper(s *tcc.Skipper) *Detector

WithSkipper attaches the consent guard. A nil skipper is a no-op.

Jump to

Keyboard shortcuts

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