Documentation
¶
Index ¶
- Constants
- func PlatformDisplayName(platform string) string
- type AITool
- type AgentCommandDefinition
- type AgentPluginContext
- type AgentPlugins
- type AgentScanError
- type AgentSkill
- type AgentSkillScanInfo
- type BrewPackage
- type BrewScanResult
- type BrowserCoverage
- type BrowserExtensionFinding
- type BrowserExtensionScanInfo
- type BunAudit
- type BunConfigFile
- type BunSection
- type CargoArtifact
- type CargoBin
- type CargoConfigAudit
- type CargoConfigContext
- type CargoConfigFile
- type CargoConfigFinding
- type CargoConfigSetting
- type CargoCredentialFile
- type CargoDeclaration
- type CargoInstallation
- type CargoInventory
- type CargoOrigin
- type CargoPackage
- type CargoProject
- type CargoRecordedChecksum
- type CargoSource
- type CargoWorkspace
- type CargoWorkspaceMember
- type ComposerConfigAudit
- type ComposerConfigContext
- type ComposerConfigFile
- type ComposerDescriptor
- type ComposerInstallation
- type ComposerInventory
- type ComposerOrigin
- type ComposerPackage
- type ComposerProject
- type ComposerRecordedChecksum
- type ComposerSource
- type ConditionResult
- type CredentialError
- type CredentialFinding
- type CredentialScanInfo
- type Device
- type EnablementObservation
- type EvaluatedRule
- type Extension
- type FileAttrs
- type GoBinaryDependency
- type GoCacheArtifact
- type GoCachedModule
- type GoChecksumEvidence
- type GoConfigAudit
- type GoConfigFile
- type GoConfigFinding
- type GoConfigSetting
- type GoInstalledTool
- type GoInventory
- type GoModuleVersion
- type GoProject
- type GoRecordedChecksum
- type GoReplacement
- type GoRequirement
- type GoSource
- type GoVendoredModule
- type GoWorkspace
- type GoWorkspaceMember
- type GroupResult
- type IDE
- type MCPConfig
- type MCPConfigEnterprise
- type MachineResources
- type MarketplaceObservation
- type NPMRCAudit
- type NPMRCEffective
- type NPMRCEntry
- type NPMRCEnvVar
- type NPMRCFile
- type NodePackage
- type NodeScanResult
- type NuGetConfigAudit
- type NuGetConfigContext
- type NuGetConfigFile
- type NuGetInstallation
- type NuGetInventory
- type NuGetOrigin
- type NuGetPackage
- type NuGetProject
- type NuGetRecordedChecksum
- type NuGetSource
- type PackageDetail
- type PackageScanConfig
- type PipAudit
- type PipConfigFile
- type PipEffective
- type PipEnvVar
- type PipFinding
- type PipKeyValue
- type PipNetrcStatus
- type PipSection
- type PkgManager
- type PluginComponent
- type PluginObservation
- type PnpmAudit
- type PnpmEffective
- type ProjectInfo
- type PythonPackage
- type PythonScanResult
- type RemovedProjectRef
- type RubyConfigAudit
- type RubyConfigContext
- type RubyConfigFile
- type RubyCredentialFile
- type RubyInstallation
- type RubyInventory
- type RubyOrigin
- type RubyPackage
- type RubyProject
- type RubyRecordedChecksum
- type RubySource
- type RuleFileMatch
- type RuleResult
- type RuleScan
- type RuntimeInstall
- type RuntimeScanResult
- type ScanResult
- type SkillUsage
- type SourceLocator
- type Summary
- type SystemPackage
- type SystemPackageScanResult
- type UnchangedGlobalRef
- type UnchangedProjectRef
- type WSLDistro
- type WSLGuest
- type WSLInfo
- type YarnAudit
- type YarnConfigFile
- type YarnEntry
Constants ¶
const ( AgentClaudeCode = "claude-code" AgentCodex = "codex" AgentCopilot = "copilot" )
Collector agent names, matching the existing skill vocabulary.
const ( // The stated scope was enumerated. Zero observations is a real answer for // that scope — not a missing one — so a reader may retire what it no longer // sees. It does not claim the agent loaded any of it. AgentScanStatusComplete = "complete" // Positive observations are valid, membership is not known complete. A reader // merges what it sees and removes nothing. AgentScanStatusPartial = "partial" // The scope could not be read. Previously accepted facts stay, marked stale. AgentScanStatusError = "error" // The scope was recognized but its format or schema is not one this build // parses. Distinct from error: nothing failed, nothing is claimed. AgentScanStatusUnsupported = "unsupported" )
Coverage statuses. Each one answers whether an enumeration is the whole set for the scope it describes, not whether every attribute inside it parsed.
const ( AgentScanErrReadFailed = "read_failed" AgentScanErrParseFailed = "parse_failed" AgentScanErrUnsupportedSchema = "unsupported_schema" AgentScanErrLimitExceeded = "limit_exceeded" AgentScanErrUnsafePath = "unsafe_path" AgentScanErrSourceChanged = "source_changed" AgentScanErrRootUnresolved = "root_unresolved" )
Reason codes for a source that could not be collected. Typed rather than free text because a parser's own message can quote the line it choked on, and these lines come from settings, catalogs and manifests that hold tokens.
const ( PluginSourceLocal = "local" PluginSourceGit = "git" PluginSourceGitHub = "github" PluginSourceURL = "url" PluginSourceSettings = "settings" PluginSourceNPM = "npm" PluginSourceArchive = "archive" PluginSourceCommand = "command" PluginSourceAccount = "account" PluginSourceUnknown = "unknown" )
Normalized delivery provenance. These describe where bytes came from, not an action to replay: nothing here is ever fetched, cloned, downloaded or executed. The native spelling is preserved separately in SourceLocator.NativeKind, so "url" meaning a hosted catalog JSON and "url" meaning a Git repository stay distinguishable after normalization.
const ( PluginCommandModeCopy = "copy" PluginCommandModeLink = "link" )
Command source modes. The producing command itself is never collected or run — only which of the two delivery modes the native client recorded.
const ( // Installed from a registered catalog entry. PluginInstallMarketplace = "marketplace" // Loaded from a directory that carries its own manifest, with no registry row. PluginInstallDirectory = "directory" // Materialized by account sync into the agent's synced root. PluginInstallSynced = "synced" // Materialized from an account or workspace bundle carrying a remote identity // marker. Current account installation state is not knowable from disk. PluginInstallAccount = "account" PluginInstallUnknown = "unknown" )
How a plugin came to be installed.
const ( PluginScopeUser = "user" PluginScopeProject = "project" PluginScopeLocal = "local" PluginScopeSystem = "system" PluginScopeUnknown = "unknown" )
Installation scopes, distinct from AgentSkill.Scope.
const ( PluginEvidenceRegistry = "registry" PluginEvidenceLocalConfig = "local_config" PluginEvidenceSkillDirectory = "skill_directory" PluginEvidenceSyncedDirectory = "synced_directory" PluginEvidenceRemoteMarker = "remote_marker" )
What proves the installation. A cache directory and an orphaned enablement flag are deliberately absent: neither is evidence, and neither produces a record.
const ( PluginManifestClaude = "claude" PluginManifestCodex = "codex" PluginManifestCopilot = "copilot" PluginManifestCursor = "cursor" PluginManifestPortable = "portable" PluginManifestCatalog = "catalog" PluginManifestNone = "none" PluginManifestUnknown = "unknown" )
The manifest format actually selected for this package. A dual-format bundle has one selected format per host agent; the formats are never merged, and a filename alone never selects one.
const ( PluginComponentSkill = "skill" PluginComponentCommand = "command" PluginComponentMCP = "mcp" PluginComponentAgent = "agent" PluginComponentHook = "hook" PluginComponentLSP = "lsp" PluginComponentApp = "app" PluginComponentRule = "rule" )
Declared component kinds. A kind that is retained but not parsed — agent, hook, lsp, app — is a descriptive capability: it says the package declares one, never that the agent activated it.
const ( AgentDefinitionSkill = "skill" AgentDefinitionCommand = "command" )
Definition kinds for AgentSkill.DefinitionKind. Empty also denotes SKILL.md.
const ( // Membership complete, every attribute parsed. Zero extensions is a real // answer, not a missing one. BrowserCoverageScanned = "scanned" // Membership complete, one or more attributes degraded. Still authoritative. BrowserCoveragePartial = "partial" // Membership not known complete. Findings for this browser are dropped before // the payload is built, and a reader keeps whatever it already stored. BrowserCoverageFailed = "failed" // No data directory for this browser exists, or one exists holding no // installation. BrowserCoverageNotPresent = "not_present" )
Coverage statuses, one per browser attempted. They answer whether the set of extension identities reported for that browser is the whole set, not whether every attribute parsed.
const ( BrowserExtReasonRefusedTCC = "refused_tcc" BrowserExtReasonPermissionDenied = "permission_denied" BrowserExtReasonParseError = "parse_error" BrowserExtReasonUnsupportedEncoding = "unsupported_encoding" BrowserExtReasonSymlinkRejected = "symlink_rejected" BrowserExtReasonCapped = "capped" BrowserExtReasonTimedOut = "timed_out" )
Reason codes for a browser that could not be fully read. Typed rather than free text: a decoder's own message quotes the document it choked on, and these documents are the browser's private state.
const ( BrowserExtEnabled = "enabled" BrowserExtDisabled = "disabled" BrowserExtStateUnknown = "unknown" )
Enabled state. Enabled in any one profile counts as enabled: the extension can run on this machine.
const ( BrowserExtDisabledByUser = "user" BrowserExtDisabledByBrowser = "browser" BrowserExtDisabledByPolicy = "policy" BrowserExtDisabledByUnknown = "unknown" )
Who disabled it, set exactly when the state is disabled. The interesting case is not that an extension is off but that the browser turned it off.
const ( BrowserExtStoreListingListed = "listed" BrowserExtStoreListingDelisted = "delisted" BrowserExtStoreListingUnknown = "unknown" )
Whether the extension's store still lists it, from the browser's own cached belief refreshed on its update ping. Independent of enabled state, and delisted is a strong positive where listed is a weak negative.
const ( BrowserExtStoreViolationNone = "none" BrowserExtStoreViolationFlagged = "flagged" BrowserExtStoreViolationUnknown = "unknown" )
Whether the store recorded a policy violation against it.
const ( BrowserExtInstallUser = "user" BrowserExtInstallSideload = "sideload" BrowserExtInstallRegistry = "registry" BrowserExtInstallUnpacked = "unpacked" BrowserExtInstallPolicy = "policy" BrowserExtInstallUnknown = "unknown" )
How the extension got installed.
const ( BrowserExtStoreChromeWebStore = "chrome_web_store" BrowserExtStoreEdgeAddons = "edge_addons" BrowserExtStoreAMO = "amo" BrowserExtStoreSelfHosted = "self_hosted" BrowserExtStoreNone = "none" BrowserExtStoreUnknown = "unknown" )
Which store the extension is attributed to. An enum and never a URL: a self-hosted update server's hostname is internal infrastructure.
const ( BrowserExtSignedBroken = "broken" BrowserExtSignedUnknownChain = "unknown_chain" BrowserExtSignedMissing = "missing" BrowserExtSignedPreliminary = "preliminary" BrowserExtSignedSigned = "signed" BrowserExtSignedSystem = "system" BrowserExtSignedPrivileged = "privileged" )
Signing state, gecko only.
const ( BrowserExtTruncatedFindingCap = "finding_cap" BrowserExtTruncatedDeadline = "deadline" )
Why the result was cut short. Set exactly when Truncated is, and never for a file that failed its own byte cap: that fails one browser rather than shortening the payload.
const ( CredentialCategoryCloud = "cloud" CredentialCategorySourceControl = "source_control" CredentialCategoryPackageReg = "package_registry" CredentialCategoryContainers = "containers" CredentialCategoryInfrastructure = "infrastructure" CredentialCategoryAPIClients = "api_clients" )
Credential categories. The customer-facing grouping a finding rolls up to.
const ( // A usable secret in the clear. CredentialProtectionPlaintext = "plaintext" // Present but not usable as-is — passphrase-encrypted, hardware-backed, or // otherwise wrapped. CredentialProtectionProtected = "protected" )
Protection states, worst-case per source. Two values and no third: every finding is material that is either usable straight out of the file or not.
const ( CredentialPrincipalAgentEffective = "agent_effective" CredentialPrincipalUserEffective = "user_effective" )
Collection principals. AgentEffective is the agent process itself, which on macOS is a root daemon. UserEffective is reserved for a reader that drops privileges first.
const ( CredentialReasonRefusedTCC = "refused_tcc" CredentialReasonRefusedOutsideRoots = "refused_outside_user_roots" CredentialReasonPermissionDenied = "permission_denied" CredentialReasonLocationUnresolved = "location_unresolved" //#nosec G101 -- a reason code on the wire; no value read from a file reaches this vocabulary. CredentialReasonUnsupportedEncoding = "unsupported_encoding" //#nosec G101 -- see above: a reason code, not anything read. CredentialReasonSkippedNoUser = "skipped_no_user" CredentialReasonCapped = "capped" CredentialReasonTimedOut = "timed_out" // The file was there and was read within its cap, and its format could not // be interpreted well enough to state that it holds no material. Reported // instead of a finding, never alongside one for the same entry: a parse // failure is not evidence that a credential exists. CredentialReasonUnrecognizedFormat = "unrecognized_format" )
Reason codes for a source that could not be collected. Typed rather than free text because a parser's own error message can quote the line it choked on, which is a credential value.
const ( WSLPresenceYes = "yes" WSLPresenceNo = "no" WSLPresenceUnknown = "unknown" )
WSL presence is tri-state. A probe that cannot read the registry (e.g. a SYSTEM-context run whose target user's hive is not loaded) reports WSLPresenceUnknown, never a false WSLPresenceNo.
const ( GoSourceProjectSearchRoot = "project_search_root" GoSourceProjectManifest = "project_manifest" GoSourceAlternateManifest = "alternate_manifest" GoSourceWorkspace = "workspace" GoSourceVendorRoot = "vendor_root" GoSourceCacheRoot = "cache_root" GoSourceBinRoot = "bin_root" GoSourceBinary = "binary" GoSourceChecksumFile = "checksum_file" )
Go inventory source kinds.
const ( GoStatusComplete = "complete" GoStatusPartial = "partial" GoStatusSkipped = "skipped" )
Go section and source statuses. A section is complete or partial; a source may also be skipped (never read).
const ( GoPresencePresent = "present" GoPresenceAbsent = "absent" GoPresenceUnknown = "unknown" )
Go source presence. Only a permitted, successful lookup may report absent; a refusal or failure is unknown.
const ( GoArtifactExtractedSource = "extracted_source" GoArtifactArchivePresent = "archive_present" GoArtifactPresent = "present" GoArtifactPartial = "partial" // in-progress extraction, missing completion marker or capped check GoArtifactUnreadable = "unreadable" )
Go cache artifact kinds and statuses.
const ( GoReplaceModule = "module" GoReplaceLocal = "local" GoVersionKnown = "known" GoVersionUnknown = "unknown" // missing or (devel); the version is omitted, never invented )
Go replacement kinds and version statuses.
const ( GoChecksumRecorded = "recorded" GoChecksumAbsent = "absent" GoChecksumPartial = "partial" GoChecksumUnreadable = "unreadable" GoChecksumInvalid = "invalid" GoChecksumUnsupported = "unsupported" GoChecksumSkipped = "skipped" GoChecksumNotApplicable = "not_applicable" GoChecksumKindModuleContent = "module_content" GoChecksumKindGoMod = "go_mod" GoChecksumSourceProjectGoSum = "project_go_sum" // go.sum or an alternate modfile's .sum GoChecksumSourceWorkspaceGoWorkSum = "workspace_go_work_sum" GoChecksumSourceCacheZiphash = "cache_ziphash" GoChecksumSourceBinaryBuildInfo = "binary_buildinfo" GoChecksumNotVerified = "not_verified" )
Go recorded-checksum vocabulary. Checksums are recorded metadata, never verified by DMG.
const ( GoConfigScopeUser = "user" // the user go/env file GoConfigScopeToolchain = "toolchain" // GOROOT/go.env GoConfigScopeProcess = "process" // DMG's own verified process environment GoConfigPresent = "present" GoConfigAbsent = "absent" GoConfigDisabled = "disabled" // GOENV=off GoConfigSkippedProtected = "skipped_protected" GoConfigUnreadable = "unreadable" GoConfigInvalid = "invalid" GoConfigUnsupported = "unsupported" )
Go config-audit file scopes and statuses.
const ( GoReasonUserUnresolved = "user_unresolved" GoReasonSkippedProtected = "skipped_protected" GoReasonOutsideApprovedRoots = "outside_approved_roots" GoReasonPathUnresolved = "path_unresolved" GoReasonPermissionDenied = "permission_denied" GoReasonSizeLimit = "size_limit" GoReasonEntryLimit = "entry_limit" GoReasonDepthLimit = "depth_limit" GoReasonRecordLimit = "record_limit" GoReasonOutputSizeLimit = "output_size_limit" GoReasonDeadlineExceeded = "deadline_exceeded" GoReasonParseError = "parse_error" GoReasonUnsupportedEntry = "unsupported_entry" GoReasonRootRedirectUnknown = "root_redirect_unknown" GoReasonVendorMismatch = "vendor_mismatch" GoReasonMemberNotDiscovered = "member_not_discovered" GoReasonBuildInfoUnusable = "build_info_unusable" GoReasonChangedDuringScan = "changed_during_scan" GoReasonExtractionIncomplete = "extraction_incomplete" // .partial present or completion metadata missing GoReasonAlternateManifestUnresolved = "alternate_manifest_unresolved" GoReasonProcessContextUnverified = "process_context_unverified" GoReasonCarriageReturn = "carriage_return" GoReasonDuplicateKey = "duplicate_key" GoReasonMalformedChecksumLine = "malformed_checksum_line" GoReasonUnsupportedChecksumScheme = "unsupported_checksum_scheme" GoReasonChecksumLineTooLong = "checksum_line_too_long" GoReasonChecksumLineLimit = "checksum_line_limit" GoReasonUnsupportedModfileName = "unsupported_modfile_name" )
Go reason codes, shared by both sections.
const ( CargoSourceProjectSearchRoot = "project_search_root" CargoSourceManifest = "manifest" CargoSourceLockfile = "lockfile" CargoSourceRegistryCache = "registry_cache" // <cargo home>/registry CargoSourceGitCheckoutRoot = "git_checkout_root" // <cargo home>/git/checkouts CargoSourceDirectorySource = "directory_source" CargoSourceLocalRegistry = "local_registry" CargoSourceInstallRoot = "install_root" )
Cargo inventory source kinds.
const ( CargoStatusComplete = "complete" CargoStatusPartial = "partial" )
Cargo section and source statuses. A source that was refused or could not be read is partial with a reason, never absent.
const ( CargoPresencePresent = "present" CargoPresenceAbsent = "absent" CargoPresenceUnknown = "unknown" // CargoBinUnreadable is a bin whose lookup failed; bins alone use it in // place of unknown. CargoBinUnreadable = "unreadable" )
Cargo presence, for sources, artifacts and installed bins. Only a permitted lookup that found nothing is absent.
const ( CargoEvidenceDeclaredRequirement = "declared_requirement" // manifest CargoEvidenceLockedPackage = "locked_package" // lockfile CargoEvidenceCachedPackage = "cached_package" // registry_cache or local_registry CargoEvidenceGitCachedPackage = "git_cached_package" // git_checkout_root CargoEvidenceVendoredPackage = "vendored_package" // directory_source CargoEvidenceInstalledTool = "installed_tool" // install_root )
Cargo package evidence kinds; each is owned by exactly one source kind.
const ( CargoRelationDirect = "direct" // declared_requirement only CargoRelationUnknown = "unknown" CargoVersionKnown = "known" // an exact version from lock, manifest, archive or receipt CargoVersionUnknown = "unknown" CargoIdentityMetadata = "metadata" CargoIdentityFilenameInferred = "filename_inferred" // cache file name only; its metadata could not be read CargoDependencyNormal = "normal" CargoDependencyDev = "dev" CargoDependencyBuild = "build" )
Cargo package attributes.
const ( CargoOriginRegistry = "registry" CargoOriginGit = "git" CargoOriginLocal = "local" CargoOriginLocalUnknown = "local_unknown" // path is the lockfile, not a package directory CargoOriginRegistryUnknown = "registry_unknown" // registry alias whose index was not observed CargoOriginCacheUnknown = "cache_unknown" // opaque registry cache directory CargoOriginGitUnknown = "git_unknown" // Git checkout with no recorded repository URL CargoOriginVendorUnknown = "vendor_unknown" // directory source or local registry )
Cargo origin kinds. The *_unknown kinds carry the scope that bounds them (project, lockfile, cache or directory) instead of a guessed URL.
const ( CargoArtifactArchive = "archive" CargoArtifactExtracted = "extracted" CargoArtifactVendor = "vendor" CargoArtifactGitCheckout = "git_checkout" CargoInstallComplete = "complete" // every recorded bin is present CargoInstallPartial = "partial" // some bins present or unreadable CargoInstallReceiptOnly = "receipt_only" // tracked receipt, every bin absent )
Cargo artifact kinds and installation statuses.
const ( CargoChecksumAbsent = "absent" CargoChecksumRecorded = "recorded" CargoChecksumUnreadable = "unreadable" CargoChecksumPartial = "partial" // conflicting or invalid values were recorded CargoChecksumSHA256 = "sha256" CargoChecksumSourceLockfile = "lockfile" CargoChecksumSourceVendorChecksum = "vendor_checksum" // .cargo-checksum.json package value CargoChecksumNotVerified = "not_verified" )
Cargo recorded-checksum vocabulary. A recorded checksum is metadata, never an integrity verdict.
const ( CargoConfigScopeUser = "user" // Cargo home config CargoConfigScopeProject = "project" // <dir>/.cargo config CargoConfigScopeProcess = "process" // DMG's own verified process environment CargoConfigScopeIncluded = "included" // loaded through an include CargoConfigPresent = "present" CargoConfigAbsent = "absent" CargoConfigSkippedProtected = "skipped_protected" CargoConfigUnreadable = "unreadable" CargoConfigInvalid = "invalid" CargoConfigUnsupported = "unsupported" CargoSelectionObserved = "observed" CargoSelectionPartial = "partial" )
Cargo config-audit scopes, file statuses and context selection statuses.
const ( CargoReasonUserUnresolved = GoReasonUserUnresolved CargoReasonPathUnresolved = GoReasonPathUnresolved CargoReasonSkippedProtected = GoReasonSkippedProtected CargoReasonOutsideApprovedRoots = GoReasonOutsideApprovedRoots CargoReasonRefusedNetworkVolume = "refused_network_volume" CargoReasonPermissionDenied = GoReasonPermissionDenied CargoReasonUnreadable = "unreadable" CargoReasonChangedDuringScan = GoReasonChangedDuringScan CargoReasonUnsupportedEntry = GoReasonUnsupportedEntry CargoReasonDeadlineExceeded = GoReasonDeadlineExceeded CargoReasonParseError = GoReasonParseError CargoReasonSizeLimit = GoReasonSizeLimit CargoReasonEntryLimit = GoReasonEntryLimit CargoReasonDepthLimit = GoReasonDepthLimit CargoReasonRecordLimit = GoReasonRecordLimit CargoReasonOutputSizeLimit = GoReasonOutputSizeLimit CargoReasonExtractionIncomplete = GoReasonExtractionIncomplete CargoReasonUnsupportedFormat = "unsupported_format" CargoReasonWorkspaceUnresolved = "workspace_unresolved" CargoReasonConfigIncludeUnresolved = "config_include_unresolved" CargoReasonOriginUnresolved = "origin_unresolved" CargoReasonChecksumInvalid = "checksum_invalid" CargoReasonChecksumMismatch = "checksum_mismatch" )
Cargo reason codes, shared by both sections. Spellings shared with Go are aliases so the two vocabularies cannot drift apart.
const ( PlatformDarwin = "darwin" PlatformWindows = "windows" PlatformLinux = "linux" )
Platform constants used by detectors, device info, and output formatters. These match the values returned by runtime.GOOS / executor.GOOS().
const CargoInventorySchemaVersion = 1
CargoInventorySchemaVersion versions the cargo_inventory and cargo_config_audit sections independently of the outer payload_schema_version.
const ComposerInventorySchemaVersion = 1
ComposerInventorySchemaVersion versions the static Composer sections.
const CurrentBrowserExtensionSchemaVersion = 1
CurrentBrowserExtensionSchemaVersion is this block's own shape version, so a reader can reject a shape it does not know instead of dropping the fields it has no home for.
const CurrentCredentialSchemaVersion = 1
CurrentCredentialSchemaVersion is the credential block's own shape version, declared so a reader can reject or down-convert a shape it does not know instead of silently dropping fields.
const GoInventorySchemaVersion = 1
GoInventorySchemaVersion versions the go_inventory and go_config_audit sections independently of the outer payload_schema_version.
const NuGetInventorySchemaVersion = 1
NuGetInventorySchemaVersion versions the static .NET/NuGet sections.
const RubyInventorySchemaVersion = 1
RubyInventorySchemaVersion versions ruby_inventory and ruby_config_audit.
Variables ¶
This section is empty.
Functions ¶
func PlatformDisplayName ¶ added in v1.11.0
PlatformDisplayName returns the human-readable name for a platform identifier.
Types ¶
type AITool ¶
type AITool struct {
Name string `json:"name"`
Vendor string `json:"vendor"`
Type string `json:"type"`
Version string `json:"version"`
BinaryPath string `json:"binary_path,omitempty"`
InstallPath string `json:"install_path,omitempty"`
ConfigDir string `json:"config_dir,omitempty"`
IsRunning *bool `json:"is_running,omitempty"`
}
AITool represents a detected AI agent, CLI tool, framework, or general agent. Fields are conditionally present based on type (cli_tool, general_agent, framework).
type AgentCommandDefinition ¶ added in v1.17.0
type AgentCommandDefinition struct {
Usage *SkillUsage `json:"usage,omitempty"`
Name string `json:"name"`
DefinitionPath string `json:"definition_path"`
DefinitionHash string `json:"definition_hash"` // hex(sha256(raw file bytes))
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
License string `json:"license,omitempty"`
AllowedTools []string `json:"allowed_tools,omitempty"`
// Required: a false here is the positive claim that the file does not set it.
DisableModelInvocation bool `json:"disable_model_invocation"`
UserInvocableDisabled bool `json:"user_invocable_disabled"`
HasHooks bool `json:"has_hooks"`
HasShellInjection bool `json:"has_shell_injection"`
}
AgentCommandDefinition is a legacy command Markdown file — an actual file with an actual hash. It is never represented as a SKILL.md, and its path is never reported in a skill's skill_md_path.
type AgentPluginContext ¶ added in v1.17.0
type AgentPluginContext struct {
ContextID string `json:"context_id"`
Agent string `json:"agent"` // AgentClaudeCode | AgentCodex | AgentCopilot
ConfigRoot string `json:"config_root"` // observed, normalized; not an instruction to read it
PluginRoot string `json:"plugin_root"`
// Trusted existing inventory or passive metadata only. This collector never
// launches an agent to learn a version, so absent is normal.
AgentVersion string `json:"agent_version,omitempty"`
MarketplaceStatus string `json:"marketplace_status"`
InstallationStatus string `json:"installation_status"`
Marketplaces []MarketplaceObservation `json:"marketplaces"`
Plugins []PluginObservation `json:"plugins"`
Errors []AgentScanError `json:"errors"`
}
AgentPluginContext is one agent's configuration and plugin root pair. Scope and project coordinates live on the individual installations, so one user plugin is not repeated for every discovered project.
type AgentPlugins ¶ added in v1.17.0
type AgentPlugins struct {
SchemaVersion int `json:"schema_version"`
CollectedAtMs int64 `json:"collected_at_ms"` // unix ms, one instant per scan
Contexts []AgentPluginContext `json:"contexts"`
}
AgentPlugins is one device's plugin observation. Absent means unreported, never "this machine has no plugins", so a reader that receives no envelope keeps what it already stored.
func (*AgentPlugins) PluginCount ¶ added in v1.17.0
func (s *AgentPlugins) PluginCount() int
PluginCount is the number of plugin observations across every context — installations, never catalog entries or stale cache versions. Nil-safe.
type AgentScanError ¶ added in v1.17.0
type AgentScanError struct {
Code string `json:"code"`
SourcePath string `json:"source_path,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
ComponentID string `json:"component_id,omitempty"`
}
AgentScanError carries a code and the coordinates it applies to. It never carries a parser message, a settings excerpt, a source command or agent stderr.
type AgentSkill ¶ added in v1.14.0
type AgentSkill struct {
Usage *SkillUsage `json:"usage,omitempty"`
// Identity
SkillSlug string `json:"skill_slug"` // directory basename
SkillName string `json:"skill_name"` // frontmatter name, else slug
Description string `json:"description,omitempty"` // frontmatter description, ≤1024 runes (standard max)
Version string `json:"version,omitempty"` // frontmatter version (or metadata.version fallback)
License string `json:"license,omitempty"` // standard frontmatter license, ≤128 runes
AllowedTools []string `json:"allowed_tools,omitempty"` // normalized from space/comma string or YAML list
// Behavior/risk flags (frontmatter + body scan)
DisableModelInvocation bool `json:"disable_model_invocation,omitempty"`
UserInvocableDisabled bool `json:"user_invocable_disabled,omitempty"` // frontmatter user-invocable: false
ContextFork bool `json:"context_fork,omitempty"` // context: fork (runs in subagent)
ModelOverride string `json:"model_override,omitempty"` // frontmatter model
HasHooks bool `json:"has_hooks,omitempty"` // hooks key present in frontmatter
HasShellInjection bool `json:"has_shell_injection,omitempty"` // body has !`cmd` / “`! load-time exec
// Attribution
Agent string `json:"agent"` // "claude-code"|"codex"|"opencode"|"cursor"|"pi"|"factory"|"amp"|"copilot"|"gemini-cli"|"aider"|"grok-build"|"kimi-code"|"muse-code"|"hermes-agent"|"oh-my-pi"|"shared"
Source string `json:"source"` // atomic attribution key. "claude_user"|"claude_project"|
// // "agents_user"|"agents_project"|"codex_user"|"codex_system"|"codex_admin"|
// // "opencode_user"|"opencode_project"|"cursor_user"|"cursor_project"|"pi_user"|
// // "pi_project"|"factory_user"|"factory_project"|"factory_agent_project"|
// // "factory_agent_user"|"amp_user"|"copilot_user"|"github_project"|
// // "gemini_user"|"gemini_project"|"aider_project"|"grok_user"|"grok_project"|
// // "kimi_user"|"kimi_project"|"muse_user"|"hermes_user"|"hermes_project"|
// // "omp_user"|"omp_managed_user"|"omp_project"
Scope string `json:"scope"` // "global" | "project" | "system"
ProjectPath string `json:"project_path,omitempty"` // project root for project scope
PluginName string `json:"plugin_name,omitempty"` // owning plugin, from skills.sh lock pluginName
// Location
SkillDirPath string `json:"skill_dir_path,omitempty"` // absolute, symlink-resolved dir of the physical skill (the collapse group key)
RootRelPath string `json:"root_rel_path,omitempty"` // skill dir relative to its root, forward-slash ("frontend-design", "apps/web/frontend-design")
SkillMDPath string `json:"skill_md_path,omitempty"`
SymlinkSources []string `json:"symlink_sources,omitempty"` // sorted, deduped source labels that symlink to this physical skill dir; every entry is a symlink by definition
// Content identity
SkillMDHash string `json:"skill_md_hash,omitempty"` // hex(sha256(SKILL.md)) — identity/drift key
// Empty DefinitionKind denotes SKILL.md. Commands use DefinitionPath and
// DefinitionHash; their SKILL.md fields and directory census remain empty.
DefinitionKind string `json:"definition_kind,omitempty"` // "" | AgentDefinitionSkill | AgentDefinitionCommand
DefinitionPath string `json:"definition_path,omitempty"`
DefinitionHash string `json:"definition_hash,omitempty"` // hex(sha256(raw definition bytes))
// How the agent invokes this definition. A command takes its name from its
// path under commands/, not from frontmatter.
CallableNames []string `json:"callable_names,omitempty"`
// File census (all stat-derived — no file bytes read)
FileCount int `json:"file_count,omitempty"`
CodeFileCount int `json:"code_file_count,omitempty"`
SymlinkCount int `json:"symlink_count,omitempty"`
TotalSizeBytes int64 `json:"total_size_bytes,omitempty"`
HasCode bool `json:"has_code,omitempty"`
HasPluginManifest bool `json:"has_plugin_manifest,omitempty"` // .claude-plugin/plugin.json in skill dir
LastModified int64 `json:"last_modified,omitempty"` // unix, max mtime in dir
// Frontmatter health
HasFrontmatter bool `json:"has_frontmatter"`
FrontmatterError string `json:"frontmatter_error,omitempty"` // "" | "invalid_yaml" | "missing_name" | "missing_description" | "file_too_large" | "unreadable"
// skills.sh lock provenance (empty when unmanaged)
ManagedBy string `json:"managed_by,omitempty"` // "skills.sh" | ""
SourceSlug string `json:"source_slug,omitempty"` // "vercel-labs/agent-skills" (alias only for sourceType=local)
SourceType string `json:"source_type,omitempty"` // "github"|"mintlify"|"huggingface"|"local"|"well-known"
SourceURL string `json:"source_url,omitempty"`
Ref string `json:"ref,omitempty"` // branch|tag|sha as recorded
SkillPath string `json:"skill_path,omitempty"` // subdir within upstream repo
UpstreamFolderHash string `json:"upstream_folder_hash,omitempty"` // GitHub tree SHA from lock (NOT sha256)
InstalledAt string `json:"installed_at,omitempty"` // ISO8601 from lock
UpdatedAt string `json:"updated_at,omitempty"` // ISO8601 from lock
LockFilePath string `json:"lock_file_path,omitempty"`
}
AgentSkill represents one discovered agent skill: a physical SKILL.md directory, optionally enriched with skills.sh lock provenance. Symlink shadows of the same physical dir are collapsed into one record (the linked roots listed in SymlinkSources). Never carries file content — identity, provenance, hashes, and census counts only.
type AgentSkillScanInfo ¶ added in v1.14.0
type AgentSkillScanInfo struct {
RootsScanned []string `json:"roots_scanned"` // absolute root paths probed AND existing
ProjectsScanned int `json:"projects_scanned"`
LockFilesParsed int `json:"lock_files_parsed"`
SkillsFound int `json:"skills_found"`
Truncated bool `json:"truncated,omitempty"` // any cap hit (roots/projects/skills/home-walk)
Errors []string `json:"errors,omitempty"` // bounded: ≤50 entries, each ≤256 chars
WalkDirsVisited int `json:"walk_dirs_visited,omitempty"` // home-walk ReadDir count
WalkRootsFound int `json:"walk_roots_found,omitempty"` // project-root candidates the home walk emitted (pre-union)
// CommandsStatus covers standalone command roots. Empty means unreported;
// only complete coverage permits removal of unseen commands.
CommandsStatus string `json:"commands_status,omitempty"`
DurationMs int64 `json:"duration_ms"`
}
AgentSkillScanInfo summarizes the skills phase. Its presence in the payload is the "scan ran" sentinel: a nil section means the scan did not run (no information), while a non-nil section with zero skills means "scan ran, nothing installed".
type BrewPackage ¶ added in v1.10.0
type BrewPackage struct {
Name string `json:"name"`
Version string `json:"version"`
// Metadata (populated from brew info --json=v2)
Tap string `json:"tap,omitempty"` // Source tap: "homebrew/core", "homebrew/cask", or custom
Description string `json:"description,omitempty"` // Package description
License string `json:"license,omitempty"` // SPDX license (formulae only)
Homepage string `json:"homepage,omitempty"` // Upstream project URL
InstallPath string `json:"install_path,omitempty"` // On-disk install path: <prefix>/Cellar/<name>/<version> (formulae) or <prefix>/Caskroom/<token> (casks)
InstallTimeUnix int64 `json:"install_time_unix,omitempty"` // Unix epoch when installed
InstalledAsDependency bool `json:"installed_as_dependency,omitempty"` // true if pulled in by another package
Deprecated bool `json:"deprecated,omitempty"` // true if package is deprecated upstream
PouredFromBottle bool `json:"poured_from_bottle,omitempty"` // true if installed from pre-built binary
AutoUpdates bool `json:"auto_updates,omitempty"` // cask: app handles its own updates
}
BrewPackage represents a single installed Homebrew formula or cask.
type BrewScanResult ¶ added in v1.10.0
type BrewScanResult struct {
ScanType string `json:"scan_type"` // "formulae" or "casks"
RawStdoutBase64 string `json:"raw_stdout_base64"`
RawStderrBase64 string `json:"raw_stderr_base64"`
Error string `json:"error"`
ExitCode int `json:"exit_code"`
ScanDurationMs int64 `json:"scan_duration_ms"`
LineCount int `json:"line_count"`
}
BrewScanResult holds raw Homebrew scan output for enterprise telemetry.
type BrowserCoverage ¶ added in v1.16.0
type BrowserCoverage struct {
BrowserID string `json:"browser_id"`
Status string `json:"status"`
// The browser's headline reason for being degraded, required for partial and
// failed and empty otherwise. One reason per browser: a browser that degraded
// twice reports the first cause.
ReasonCode string `json:"reason_code"`
// Profiles enumerated across every data directory this browser has. The
// profiles themselves stay inside the detector: their names are user-chosen
// text.
ProfileCount int `json:"profile_count"`
// Extensions reported for this browser, after exclusions and deduplication.
// Zero for failed and not_present, and otherwise equal to the findings
// carrying this browser_id.
ExtensionCount int `json:"extension_count"`
}
BrowserCoverage is what one browser's attempt produced. Stored rows are reconciled per browser, so without it a payload could not say whether zero findings for a browser means nothing installed or could not look.
type BrowserExtensionFinding ¶ added in v1.16.0
type BrowserExtensionFinding struct {
BrowserID string `json:"browser_id"`
// 32 characters of [a-p] on the Chromium family, the addon id on gecko. Never
// truncated: a shortened identity is a different identity.
ExtensionID string `json:"extension_id"`
// May be empty. An extension whose metadata could not be recovered still has
// an identity.
Name string `json:"name"`
Version string `json:"version"`
// The manifest revision the browser recorded, zero where it recorded none.
// Version 2 can hold blocking request interception, which version 3 removed.
ManifestVersion int `json:"manifest_version,omitempty"`
EnabledState string `json:"enabled_state"`
// Present exactly when EnabledState is disabled.
DisabledBy string `json:"disabled_by,omitempty"`
// Present on Chromium-family findings only; gecko has no store-listing
// concept here.
StoreListing string `json:"store_listing,omitempty"`
StoreViolation string `json:"store_violation,omitempty"`
InstallSource string `json:"install_source"`
// Where an unpacked extension was loaded from, as the user pointed the browser
// at it. Empty for every other install source, and never opened or resolved.
InstallPath string `json:"install_path,omitempty"`
Store string `json:"store"`
// The browser shipped it as a default. Still a real extension with real
// permissions, so it is reported; the flag lets a console de-emphasize it.
Preinstalled bool `json:"preinstalled"`
// gecko only.
SignedState string `json:"signed_state,omitempty"`
// The API permissions and host patterns the browser is honouring now, rather
// than what the manifest asked for or what the extension has held at some
// point. Hosts the user has since withheld are left out. An entry too long for
// its cap is omitted rather than shortened: these strings are matched, so a
// shortened one is a different grant. Empty where the browser's record of
// present access could not be read, with the browser reported partial to say
// so.
Permissions []string `json:"permissions"`
HostPermissions []string `json:"host_permissions"`
// The hosts the extension declared content scripts for, which the browser
// injects into automatically at page load. Not the limit of what it can inject
// into: with host access and the scripting, userScripts or debugger permission
// it can inject programmatically anywhere it holds a host. Nil where the engine
// does not record the distinction, so an empty list means it declared no
// content scripts and an absent one means this cannot tell.
ScriptableHostPermissions *[]string `json:"scriptable_host_permissions,omitempty"`
// What the extension declared it collects, as far as the user's grant records
// it. Written by gecko, the only engine that records the concept, though the
// wire carries it on any engine. A list holding "none" is a positive
// declaration that it collects nothing, which is not the same answer as an
// empty list, where nothing was declared at all.
DataCollection []string `json:"data_collection,omitempty"`
}
BrowserExtensionFinding describes one extension in one browser.
type BrowserExtensionScanInfo ¶ added in v1.16.0
type BrowserExtensionScanInfo struct {
PayloadSchemaVersion int `json:"payload_schema_version"`
// The revision of the browser list probed. An identifier, not a quantity.
CatalogVersion string `json:"catalog_version"`
CollectedAt int64 `json:"collected_at"`
DurationMs int64 `json:"duration_ms"`
// False when any browser failed or a cap cut the result. A degraded attribute
// does not clear it: one extension whose metadata went missing must not mark
// the whole scan incomplete.
ScanComplete bool `json:"scan_complete"`
Truncated bool `json:"truncated,omitempty"`
TruncatedReason string `json:"truncated_reason,omitempty"`
// One entry per catalog browser attempted on this platform. A browser this
// platform's catalog does not carry appears nowhere.
Browsers []BrowserCoverage `json:"browsers"`
// One entry per (browser, extension). The same extension in three profiles is
// one finding.
Findings []BrowserExtensionFinding `json:"findings"`
}
BrowserExtensionScanInfo is the browser extension inventory for one run. Nil means no information at all; non-nil with zero findings and authoritative coverage means the machine really holds no extensions. A reader reconciles stored rows against a non-nil section, so an eagerly initialised struct where nil was meant erases a device's inventory.
type BunAudit ¶ added in v1.12.0
type BunAudit struct {
Available bool `json:"bun_available"`
BunVersion string `json:"bun_version,omitempty"`
BunPath string `json:"bun_path,omitempty"`
Files []BunConfigFile `json:"files"`
NPMRCFiles []NPMRCFile `json:"npmrc_files"`
Env []NPMRCEnvVar `json:"env"`
DiscoveryError string `json:"discovery_error,omitempty"`
}
BunAudit has no Effective field — bun has no `config list` equivalent. Consumers render the union of parsed files. NPMRCFiles carries any .npmrc bun would read for auth.
type BunConfigFile ¶ added in v1.12.0
type BunConfigFile struct {
Path string `json:"path"`
Scope string `json:"scope"`
Exists bool `json:"exists"`
Readable bool `json:"readable"`
SizeBytes int64 `json:"size_bytes,omitempty"`
ModTimeUnix int64 `json:"mtime_unix,omitempty"`
Mode string `json:"mode,omitempty"`
OwnerUID int `json:"owner_uid,omitempty"`
OwnerName string `json:"owner_name,omitempty"`
GroupGID int `json:"group_gid,omitempty"`
GroupName string `json:"group_name,omitempty"`
SHA256 string `json:"sha256,omitempty"`
SymlinkTo string `json:"symlink_target,omitempty"`
InGitRepo bool `json:"in_git_repo,omitempty"`
GitTracked bool `json:"git_tracked,omitempty"`
Sections []BunSection `json:"sections,omitempty"`
ParseError string `json:"parse_error,omitempty"`
}
BunConfigFile is a single bunfig.toml. Scope: user | user-xdg | project.
type BunSection ¶ added in v1.12.0
type BunSection struct {
Name string `json:"name"`
Entries []NPMRCEntry `json:"entries"`
}
BunSection groups NPMRCEntry by dotted section path (e.g. "install", "install.scopes.@step-security"). Entry LineNum is always 0 — go-toml/v2 doesn't cheaply expose per-key positions.
type CargoArtifact ¶ added in v1.18.0
type CargoBin ¶ added in v1.18.0
type CargoBin struct {
Name string `json:"name"`
Path string `json:"path"`
Presence string `json:"presence"` // present, absent or CargoBinUnreadable
}
CargoBin is one recorded binary.
type CargoConfigAudit ¶ added in v1.18.0
type CargoConfigAudit struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"`
Reasons []string `json:"reasons"`
Files []CargoConfigFile `json:"files"`
Findings []CargoConfigFinding `json:"findings"`
Contexts []CargoConfigContext `json:"contexts"`
CredentialFiles []CargoCredentialFile `json:"credential_files"`
}
CargoConfigAudit is the enterprise cargo_config_audit section: observed Cargo settings per source, sanitized on the device, with per-context source order and no device-wide effective verdict.
type CargoConfigContext ¶ added in v1.18.0
type CargoConfigContext struct {
ProjectPath string `json:"project_path,omitempty"`
WorkspacePath string `json:"workspace_path,omitempty"`
ConfigSourceIDs []string `json:"config_source_ids"`
SelectionStatus string `json:"selection_status"` // CargoSelection*
}
CargoConfigContext is the config sources Cargo would load when invoked in ProjectPath, highest precedence first. It does not describe CLI flags or other shells. The Cargo-home context has no paths.
type CargoConfigFile ¶ added in v1.18.0
type CargoConfigFile struct {
SourceID string `json:"source_id"`
Scope string `json:"scope"` // CargoConfigScope*
Path string `json:"path,omitempty"`
Status string `json:"status"` // CargoConfig* status
Reasons []string `json:"reasons"`
Settings []CargoConfigSetting `json:"settings"`
// ShadowedBy names the legacy .cargo/config that wins over this file.
ShadowedBy string `json:"shadowed_by,omitempty"`
// IncludeParentSourceID names the file whose include loaded this one.
IncludeParentSourceID string `json:"include_parent_source_id,omitempty"`
}
CargoConfigFile is one configuration source. The process scope has no path.
type CargoConfigFinding ¶ added in v1.18.0
type CargoConfigFinding struct {
Code string `json:"code"` // cargo-001 …
Severity string `json:"severity"` // CRITICAL | HIGH | MEDIUM | LOW | INFO
SourceID string `json:"source_id"`
Key string `json:"key"`
Detail string `json:"detail"`
}
CargoConfigFinding is a stable-coded observation tied to the source where the value was seen. Detail never contains a value.
type CargoConfigSetting ¶ added in v1.18.0
type CargoConfigSetting struct {
Key string `json:"key"`
Display string `json:"display"`
SourceID string `json:"source_id"`
Redacted bool `json:"redacted"`
}
CargoConfigSetting is an allowlisted key with a sanitized display value. Redacted marks that a credential, query, argument or custom command was removed.
type CargoCredentialFile ¶ added in v1.18.0
type CargoCredentialFile struct {
Path string `json:"path"`
Status string `json:"status"` // CargoConfig* status
Presence string `json:"presence"` // CargoPresence*
}
CargoCredentialFile reports only whether a credentials file exists; its contents are never read.
type CargoDeclaration ¶ added in v1.18.0
type CargoDeclaration struct {
DeclaredName string `json:"declared_name"`
DependencyKind string `json:"dependency_kind"` // CargoDependency*
Target string `json:"target,omitempty"`
Optional bool `json:"optional,omitempty"`
DefaultFeatures *bool `json:"default_features,omitempty"` // set only when written
Features []string `json:"features"`
WorkspaceInherited bool `json:"workspace_inherited"`
PublishingRegistry string `json:"publishing_registry,omitempty"` // registry fallback of a Git dependency
}
CargoDeclaration is a dependency entry as written in its manifest.
type CargoInstallation ¶ added in v1.18.0
type CargoInstallation struct {
RootPath string `json:"root_path"`
Bins []CargoBin `json:"bins"`
Status string `json:"status"` // CargoInstall*
VersionReq string `json:"version_req,omitempty"`
Features []string `json:"features,omitempty"`
AllFeatures *bool `json:"all_features,omitempty"`
NoDefaultFeatures *bool `json:"no_default_features,omitempty"`
Target string `json:"target,omitempty"`
Profile string `json:"profile,omitempty"`
Rustc string `json:"rustc,omitempty"` // receipt text
}
CargoInstallation is what the install receipts record for one package.
type CargoInventory ¶ added in v1.18.0
type CargoInventory struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"` // CargoStatusComplete | CargoStatusPartial
Reasons []string `json:"reasons"` // global reasons plus those of every partial source
Sources []CargoSource `json:"sources"`
Projects []CargoProject `json:"projects"`
Workspaces []CargoWorkspace `json:"workspaces"`
Packages []CargoPackage `json:"packages"`
}
CargoInventory is the enterprise cargo_inventory section: a full bounded snapshot of statically read Rust package evidence. Nil means the phase did not run.
type CargoOrigin ¶ added in v1.18.0
type CargoOrigin struct {
Kind string `json:"kind"` // CargoOrigin*
URL string `json:"url,omitempty"`
RegistryName string `json:"registry_name,omitempty"` // contextual alias, not identity
Path string `json:"path,omitempty"`
CacheRoot string `json:"cache_root,omitempty"`
CacheID string `json:"cache_id,omitempty"`
Branch string `json:"branch,omitempty"`
Tag string `json:"tag,omitempty"`
Rev string `json:"rev,omitempty"`
ResolvedRevision string `json:"resolved_revision,omitempty"` // full commit, only from recorded metadata
IsLocal bool `json:"is_local,omitempty"`
}
CargoOrigin is where a package comes from, as far as local metadata shows. URLs are sanitized; unknown kinds keep their scoping root instead of a URL.
type CargoPackage ¶ added in v1.18.0
type CargoPackage struct {
SourceID string `json:"source_id"`
Evidence string `json:"evidence"` // CargoEvidence*
PackageName string `json:"package_name"`
DependencyRelation string `json:"dependency_relation"` // CargoRelation*
Reasons []string `json:"reasons"` // record-level attribution notes
RequestedVersion string `json:"requested_version,omitempty"`
ObservedVersion string `json:"observed_version,omitempty"`
VersionStatus string `json:"version_status"` // CargoVersion*
IdentityStatus string `json:"identity_status"` // CargoIdentity*
Origin CargoOrigin `json:"origin"`
SourcePath string `json:"source_path"`
ProjectPath string `json:"project_path,omitempty"`
WorkspacePath string `json:"workspace_path,omitempty"`
Declaration *CargoDeclaration `json:"declaration,omitempty"` // declared_requirement only
Artifacts []CargoArtifact `json:"artifacts"`
Installation *CargoInstallation `json:"installation,omitempty"` // installed_tool only
ChecksumStatus string `json:"checksum_status"` // CargoChecksum* status
RecordedChecksums []CargoRecordedChecksum `json:"recorded_checksums"`
}
CargoPackage is one evidence fact about a package. SourceID is the source that owns the evidence; the same package seen by two sources is two records.
type CargoProject ¶ added in v1.18.0
type CargoProject struct {
ManifestSourceID string `json:"manifest_source_id"`
ManifestPath string `json:"manifest_path"`
ProjectPath string `json:"project_path"`
PackageName string `json:"package_name,omitempty"`
PackageVersion string `json:"package_version,omitempty"`
WorkspaceManifestPath string `json:"workspace_manifest_path,omitempty"`
LockfilePaths []string `json:"lockfile_paths"` // lockfiles selected from this project's context
}
CargoProject is one parsed Cargo.toml. A virtual workspace root has no package name. Lock contents are carried once, by the lockfile's packages.
type CargoRecordedChecksum ¶ added in v1.18.0
type CargoRecordedChecksum struct {
Algorithm string `json:"algorithm"` // CargoChecksumSHA256
Value string `json:"value"` // 64 lowercase hex
SourceKind string `json:"source_kind"`
SourcePath string `json:"source_path"`
SourceID string `json:"source_id"`
Verification string `json:"verification"` // always CargoChecksumNotVerified
}
CargoRecordedChecksum is one recorded SHA-256 value. SourceID is the evidence owner; SourcePath is the file that held the value.
type CargoSource ¶ added in v1.18.0
type CargoSource struct {
SourceID string `json:"source_id"`
Kind string `json:"kind"` // CargoSource*
Path string `json:"path"`
Status string `json:"status"` // CargoStatus*
Presence string `json:"presence"` // CargoPresence*
Reasons []string `json:"reasons"`
// ParentSourceID names the discovery source or referencing manifest.
ParentSourceID string `json:"parent_source_id,omitempty"`
// DiscoveredSources lists every child, including unreadable ones.
DiscoveredSources []string `json:"discovered_sources"`
}
CargoSource is one thing the collector looked at. Its ID hashes the developer identity, kind and absolute logical path.
type CargoWorkspace ¶ added in v1.18.0
type CargoWorkspace struct {
ManifestSourceID string `json:"manifest_source_id"`
ManifestPath string `json:"manifest_path"`
RootPackageName string `json:"root_package_name,omitempty"`
Members []CargoWorkspaceMember `json:"members"`
}
CargoWorkspace is a manifest with a [workspace] table. It is context, not a package dependency.
type CargoWorkspaceMember ¶ added in v1.18.0
type ComposerConfigAudit ¶ added in v1.18.0
type ComposerConfigAudit struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"`
Reasons []string `json:"reasons"`
Files []ComposerConfigFile `json:"files"`
Contexts []ComposerConfigContext `json:"contexts"`
CredentialFiles []CargoCredentialFile `json:"credential_files"`
Findings []CargoConfigFinding `json:"findings"`
}
type ComposerConfigContext ¶ added in v1.18.0
type ComposerConfigFile ¶ added in v1.18.0
type ComposerDescriptor ¶ added in v1.18.0
type ComposerInstallation ¶ added in v1.18.0
type ComposerInventory ¶ added in v1.18.0
type ComposerInventory struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"`
Reasons []string `json:"reasons"`
Sources []ComposerSource `json:"sources"`
Projects []ComposerProject `json:"projects"`
Packages []ComposerPackage `json:"packages"`
}
ComposerInventory keeps declarations, lock snapshots and receipts independent. Directory presence belongs to a receipt, not to source completeness.
type ComposerOrigin ¶ added in v1.18.0
type ComposerPackage ¶ added in v1.18.0
type ComposerPackage struct {
SourceID string `json:"source_id"`
Evidence string `json:"evidence"` // declared_requirement | locked_package | installed_package
PackageName string `json:"package_name"`
SourcePath string `json:"source_path"`
ProjectPath string `json:"project_path,omitempty"`
Scope string `json:"scope"` // project | global | unknown
Reasons []string `json:"reasons"`
VersionStatus string `json:"version_status"` // known | unknown
Version string `json:"version,omitempty"`
VersionNormalized string `json:"version_normalized,omitempty"`
RequestedVersion string `json:"requested_version,omitempty"`
DependencyKind string `json:"dependency_kind"` // require | require_dev | unknown
DependencyRelation string `json:"dependency_relation"` // direct | unknown
PackageType string `json:"package_type,omitempty"`
Origin ComposerOrigin `json:"origin"`
Source *ComposerDescriptor `json:"source,omitempty"`
Dist *ComposerDescriptor `json:"dist,omitempty"`
Installation *ComposerInstallation `json:"installation,omitempty"`
ChecksumStatus string `json:"checksum_status"` // absent | recorded | partial | unreadable
RecordedChecksums []ComposerRecordedChecksum `json:"recorded_checksums"`
}
ComposerPackage is one fact owned by a manifest, lockfile or installed receipt. Exact metadata versions are not normalized or inferred from constraints.
type ComposerProject ¶ added in v1.18.0
type ComposerProject struct {
ManifestSourceID string `json:"manifest_source_id"`
ManifestPath string `json:"manifest_path"`
ProjectPath string `json:"project_path"`
Scope string `json:"scope"` // project | global
PackageName string `json:"package_name,omitempty"`
PackageVersion string `json:"package_version,omitempty"`
VendorPath string `json:"vendor_path,omitempty"`
SelectionStatus string `json:"selection_status"` // observed | partial
LockfilePath string `json:"lockfile_path"`
}
type ComposerRecordedChecksum ¶ added in v1.18.0
type ComposerRecordedChecksum struct {
Algorithm string `json:"algorithm"` // sha1
Value string `json:"value"`
SourceID string `json:"source_id"`
SourceKind string `json:"source_kind"` // lockfile | installed_metadata
SourcePath string `json:"source_path"`
Verification string `json:"verification"` // not_verified
}
ComposerRecordedChecksum records dist.shasum without claiming file verification.
type ComposerSource ¶ added in v1.18.0
type ComposerSource = CargoSource
ComposerSource shares Cargo's source ownership and coverage contract.
type ConditionResult ¶ added in v1.12.0
type ConditionResult struct {
ID string `json:"id"`
Kind string `json:"kind"` // "regex" | "sha256"
Matched bool `json:"matched"`
}
ConditionResult reports the boolean outcome of one condition. No matched text is ever captured — only whether the condition matched.
type CredentialError ¶ added in v1.16.0
type CredentialError struct {
// Empty for exactly one reason code, skipped_no_user, which reports that no
// account resolved and so no source was ever attempted. Every other reason
// names the source it belongs to, and a reader is entitled to reject an
// empty one. Naming the run here instead would put a value in this field
// that looks like a catalog source and matches none.
SourceID string `json:"source_id"`
ReasonCode string `json:"reason_code"`
}
CredentialError is one source attempted and not collected. Deliberately not a finding: before the first syscall the detector does not know whether anything is there, so a finding would claim a credential on the strength of a path.
type CredentialFinding ¶ added in v1.16.0
type CredentialFinding struct {
SourceID string `json:"source_id"`
Category string `json:"category"`
// The path as configured, in tokenised-root form ($HOME/..., $APPDATA/...,
// $XDG_CONFIG_HOME/..., $VOLUME/<id>/..., $ABS/<token>/...). Display path
// and identity path are one string: two representations become two rows.
Location string `json:"location"`
ResolvedLocation string `json:"resolved_location,omitempty"`
// How many credentials the location holds. Always at least one: a location
// with none produces no finding at all.
Count int `json:"count"`
Protection string `json:"protection"`
// Octal POSIX bits ("0600"). Omitted on Windows, where Go synthesizes Perm()
// from the read-only attribute regardless of the real ACL.
Mode string `json:"mode,omitempty"`
// Windows only: the file's own DACL carries an allow-read entry for a broad
// trustee. Named for what is observed, not a conclusion it cannot reach —
// effective access also depends on inherited entries, deny ordering, nested
// groups and conditional entries. Tri-state so "not evaluated" stays
// distinct from "absent".
BroadReadAllowACEPresent *bool `json:"broad_read_allow_ace_present,omitempty"`
// The highest-signal fields. Both use the resolved location, because a
// dotfiles symlink farm is the layout that puts a credential in a repository
// and the probed path looks innocent.
InGitRepo bool `json:"in_git_repo"`
GitTracked bool `json:"git_tracked"`
// Change detection without a whole-file hash, which for a low-entropy
// credential would be a guessing oracle.
Size int64 `json:"size"`
MTime int64 `json:"mtime"`
CollectionPrincipal string `json:"collection_principal"`
}
CredentialFinding describes one credential location.
type CredentialScanInfo ¶ added in v1.16.0
type CredentialScanInfo struct {
Findings []CredentialFinding `json:"findings"`
// One entry per source attempted and not read. A source absent from the
// machine produces neither — a path name is not evidence.
Errors []CredentialError `json:"errors"`
// Pessimistic: false if any source could not be read, a cap was hit, or no
// user resolved. A snapshot that replaces its predecessor wholesale has to
// carry its own incompleteness.
ScanComplete bool `json:"scan_complete"`
// A cap bounded the result. Setting it also clears ScanComplete.
Truncated bool `json:"truncated,omitempty"`
PayloadSchemaVersion int `json:"payload_schema_version"`
// The revision of the source list probed, so a narrower list is
// distinguishable from a source that did not run. An identifier, not a
// quantity.
CatalogVersion string `json:"catalog_version"`
CollectionPrincipal string `json:"collection_principal"`
CollectedAt int64 `json:"collected_at"`
DurationMs int64 `json:"duration_ms"`
}
CredentialScanInfo is the credential inventory for one run. Its presence is the "scan ran" sentinel and that is load-bearing: nil means no information, while non-nil with zero findings means the scan ran and found nothing. The stored snapshot is replaced on any non-nil section, so an eagerly initialised struct where nil was meant erases a device's inventory in one write.
type Device ¶
type Device struct {
Hostname string `json:"hostname"`
SerialNumber string `json:"serial_number"`
OSVersion string `json:"os_version"`
Platform string `json:"platform"`
UserIdentity string `json:"user_identity"`
Resources MachineResources `json:"resources"`
// WSL reports Windows Subsystem for Linux on a Windows host. Nil on every
// other platform, and nil on Windows unless the WSL-detection feature gate
// is on — so `omitempty` drops it entirely rather than emitting a zero
// value that a reader could mistake for "scanned, no WSL".
WSL *WSLInfo `json:"wsl,omitempty"`
}
type EnablementObservation ¶ added in v1.17.0
type EnablementObservation struct {
Scope string `json:"scope"`
SourcePath string `json:"source_path"`
Enabled bool `json:"enabled"`
ProjectPath string `json:"project_path,omitempty"`
}
EnablementObservation is one configuration layer's explicit boolean, with the file that stated it. Layers are preserved rather than resolved away, because user, project, local and managed can disagree and a project override is not a device-wide policy.
type EvaluatedRule ¶ added in v1.12.0
type EvaluatedRule struct {
RuleID string `json:"rule_id"`
RuleRevision string `json:"rule_revision,omitempty"`
Complete bool `json:"complete"`
}
EvaluatedRule records one rule the engine ran this scan, including rules that matched nothing. Complete is false if the rule hit its per-rule match cap (matches_truncated) or wasn't fully walked. RuleRevision is the opaque revision echoed back for backend audit/drift detection.
type Extension ¶
type Extension struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Publisher string `json:"publisher"`
InstallPath string `json:"install_path,omitempty"`
InstallDate int64 `json:"install_date"`
IDEType string `json:"ide_type"`
Source string `json:"source,omitempty"` // "bundled" or "user_installed"
}
func FilterUserInstalledExtensions ¶ added in v1.10.2
FilterUserInstalledExtensions removes bundled/platform extensions, keeping only user-installed, marketplace, and dropins extensions.
type FileAttrs ¶ added in v1.12.0
type FileAttrs struct {
SizeBytes int64 `json:"size_bytes"`
ModifiedAt int64 `json:"modified_at"` // mtime
CreatedAt int64 `json:"created_at"` // birth time (best-effort)
ChangedAt int64 `json:"changed_at"` // ctime
}
FileAttrs is file metadata only, never content. Times are unix seconds UTC, 0 when unavailable on the platform.
type GoBinaryDependency ¶ added in v1.18.0
type GoBinaryDependency struct {
ModulePath string `json:"module_path"`
ObservedVersion string `json:"observed_version,omitempty"`
VersionStatus string `json:"version_status"`
Replacement *GoReplacement `json:"replacement,omitempty"`
GoChecksumEvidence
}
GoBinaryDependency inherits its binary's source ID.
type GoCacheArtifact ¶ added in v1.18.0
type GoCachedModule ¶ added in v1.18.0
type GoCachedModule struct {
SourceID string `json:"source_id"` // the cache_root source
ModulePath string `json:"module_path"`
ObservedVersion string `json:"observed_version"`
Root string `json:"root"`
Artifacts []GoCacheArtifact `json:"artifacts"`
GoChecksumEvidence
}
GoCachedModule is one module version in a module cache root, merging its extracted source and archive evidence.
type GoChecksumEvidence ¶ added in v1.18.0
type GoChecksumEvidence struct {
ChecksumStatus string `json:"checksum_status,omitempty"` // GoChecksum* status
RecordedChecksums []GoRecordedChecksum `json:"recorded_checksums,omitempty"`
}
GoChecksumEvidence is optional recorded-checksum metadata for the exact module path and version of the record that embeds it.
type GoConfigAudit ¶ added in v1.18.0
type GoConfigAudit struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"`
Reasons []string `json:"reasons"`
Files []GoConfigFile `json:"files"`
Findings []GoConfigFinding `json:"findings"`
}
GoConfigAudit is the enterprise go_config_audit section: observed Go settings per source, sanitized on the device, with no effective verdict.
type GoConfigFile ¶ added in v1.18.0
type GoConfigFile struct {
SourceID string `json:"source_id"`
Scope string `json:"scope"` // GoConfigScope*
DefaultPath string `json:"default_path,omitempty"`
Path string `json:"path,omitempty"`
Status string `json:"status"` // GoConfig* status
Reasons []string `json:"reasons"`
Settings []GoConfigSetting `json:"settings"`
}
GoConfigFile is one configuration source. The process scope has no path.
type GoConfigFinding ¶ added in v1.18.0
type GoConfigFinding struct {
Code string `json:"code"` // go-001 …
Severity string `json:"severity"` // CRITICAL | HIGH | MEDIUM | LOW | INFO
SourceID string `json:"source_id"`
Key string `json:"key"`
Detail string `json:"detail"`
}
GoConfigFinding is a stable-coded observation tied to the source where the value was seen. Detail never contains a value.
type GoConfigSetting ¶ added in v1.18.0
type GoConfigSetting struct {
Key string `json:"key"`
Display string `json:"display"`
Redacted bool `json:"redacted,omitempty"`
SourceID string `json:"source_id"`
}
GoConfigSetting is an allowlisted key with a sanitized display value. Redacted marks that credentials, query values or arguments were removed.
type GoInstalledTool ¶ added in v1.18.0
type GoInstalledTool struct {
SourceID string `json:"source_id"` // the binary source
BinaryPath string `json:"binary_path"`
MainPackagePath string `json:"main_package_path"`
MainModulePath string `json:"main_module_path,omitempty"`
ObservedVersion string `json:"observed_version,omitempty"`
VersionStatus string `json:"version_status"`
Replacement *GoReplacement `json:"replacement,omitempty"`
Dependencies []GoBinaryDependency `json:"dependencies"`
GoChecksumEvidence
}
GoInstalledTool is a Go binary in the resolved install bin directory, from its embedded BuildInfo. Checksum fields describe the main module.
type GoInventory ¶ added in v1.18.0
type GoInventory struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"` // GoStatusComplete | GoStatusPartial
Reasons []string `json:"reasons"` // global reasons plus those of every incomplete source
Sources []GoSource `json:"sources"`
Projects []GoProject `json:"projects"`
Workspaces []GoWorkspace `json:"workspaces"`
VendoredModules []GoVendoredModule `json:"vendored_modules"`
CachedModules []GoCachedModule `json:"cached_modules"`
InstalledTools []GoInstalledTool `json:"installed_tools"`
}
GoInventory is the enterprise go_inventory section: a full bounded snapshot of statically read Go evidence. Nil means the phase did not run.
type GoModuleVersion ¶ added in v1.18.0
type GoProject ¶ added in v1.18.0
type GoProject struct {
SourceID string `json:"source_id"`
Path string `json:"path"` // module directory
ManifestPath string `json:"manifest_path"`
ModulePath string `json:"module_path,omitempty"`
GoVersion string `json:"go_version,omitempty"`
Toolchain string `json:"toolchain,omitempty"`
Requirements []GoRequirement `json:"requirements"`
Replacements []GoReplacement `json:"replacements"`
Exclusions []GoModuleVersion `json:"exclusions"`
Tools []string `json:"tools"` // tool directive package paths
WorkspacePaths []string `json:"workspace_paths"` // go.work files that name this module
}
GoProject is one parsed go.mod (default or alternate manifest). Requirements are declarations, not the selected build list.
type GoRecordedChecksum ¶ added in v1.18.0
type GoRecordedChecksum struct {
Kind string `json:"kind"` // GoChecksumKind*
Value string `json:"value"` // canonical h1:
Source string `json:"source"` // GoChecksumSource*
SourceID string `json:"source_id"`
SourcePath string `json:"source_path"`
Verification string `json:"verification"` // always GoChecksumNotVerified
}
GoRecordedChecksum is one recorded h1 value and the file or binary that held it.
type GoReplacement ¶ added in v1.18.0
type GoReplacement struct {
FromPath string `json:"from_path"`
FromVersion string `json:"from_version,omitempty"`
Kind string `json:"kind"` // GoReplaceModule | GoReplaceLocal
ToModulePath string `json:"to_module_path,omitempty"`
ToVersion string `json:"to_version,omitempty"`
ToLocalPath string `json:"to_local_path,omitempty"` // as declared
GoChecksumEvidence
}
GoReplacement keeps the logical module and its provider apart; a local path is never a module identity.
type GoRequirement ¶ added in v1.18.0
type GoRequirement struct {
ModulePath string `json:"module_path"`
RequestedVersion string `json:"requested_version"` // a minimum, not the selected version
Indirect bool `json:"indirect"`
GoChecksumEvidence
}
type GoSource ¶ added in v1.18.0
type GoSource struct {
SourceID string `json:"source_id"`
Kind string `json:"kind"` // GoSource*
Path string `json:"path"` // absolute logical path
Status string `json:"status"`
Presence string `json:"presence"`
Reasons []string `json:"reasons"`
// ParentSourceID names the discovery source that owns this one.
ParentSourceID string `json:"parent_source_id,omitempty"`
// DiscoveredSources lists every child found, including unreadable ones.
DiscoveredSources []string `json:"discovered_sources"`
}
GoSource is one thing the collector looked at. Its ID hashes the developer identity, kind and absolute logical path, so it survives content edits.
type GoVendoredModule ¶ added in v1.18.0
type GoVendoredModule struct {
SourceID string `json:"source_id"` // the vendor_root source
ModulePath string `json:"module_path"`
ObservedVersion string `json:"observed_version,omitempty"`
Replacement *GoReplacement `json:"replacement,omitempty"`
VendorRoot string `json:"vendor_root"`
PackagePaths []string `json:"package_paths"`
GoChecksumEvidence
}
GoVendoredModule is a vendor/modules.txt module with at least one package directory corroborated on disk.
type GoWorkspace ¶ added in v1.18.0
type GoWorkspace struct {
SourceID string `json:"source_id"`
Path string `json:"path"`
GoVersion string `json:"go_version,omitempty"`
Toolchain string `json:"toolchain,omitempty"`
Members []GoWorkspaceMember `json:"members"`
Replacements []GoReplacement `json:"replacements"`
}
GoWorkspace is one parsed go.work. Path is the go.work file.
type GoWorkspaceMember ¶ added in v1.18.0
type GroupResult ¶ added in v1.12.0
type GroupResult struct {
GroupID string `json:"group_id"`
FullMatch bool `json:"full_match"`
Conditions []ConditionResult `json:"conditions"`
}
GroupResult reports one condition group. FullMatch is true when every condition in the group matched (after applying negation).
type MCPConfig ¶
type MCPConfig struct {
ConfigSource string `json:"config_source"`
ConfigPath string `json:"config_path"`
Vendor string `json:"vendor"`
}
MCPConfig represents a detected MCP server configuration (community mode).
type MCPConfigEnterprise ¶
type MCPConfigEnterprise struct {
ConfigSource string `json:"config_source"`
ConfigPath string `json:"config_path"`
Vendor string `json:"vendor"`
ConfigContentBase64 string `json:"config_content_base64,omitempty"`
}
MCPConfigEnterprise includes base64-encoded content for enterprise mode.
type MachineResources ¶ added in v1.11.3
type MachineResources struct {
CPUModel string `json:"cpu_model"` // e.g. "Apple M3 Pro", "Intel(R) Core(TM) i9-13900K"
CPUArchitecture string `json:"cpu_architecture"` // "arm64", "amd64"
PhysicalCores int `json:"physical_cores"` // 0 if undeterminable
LogicalCores int `json:"logical_cores"` // includes SMT/hyperthreads
MemoryBytes uint64 `json:"memory_bytes"` // total installed RAM
DiskTotalBytes uint64 `json:"disk_total_bytes"` // capacity of the system/root volume
}
MachineResources captures the static hardware capacity of the machine — what's there, not what's currently in use. Answers "how much resource does this machine have?".
type MarketplaceObservation ¶ added in v1.17.0
type MarketplaceObservation struct {
MarketplaceID string `json:"marketplace_id"`
Name string `json:"name"` // native registered name
Source *SourceLocator `json:"source,omitempty"`
CatalogPath string `json:"catalog_path,omitempty"` // may name a file, not a directory
Revision string `json:"revision,omitempty"`
Registered bool `json:"registered"`
// Native recorded catalog refresh. Separate from any plugin's update time,
// and never a filesystem mtime.
LastRefreshedAtMs *int64 `json:"last_refreshed_at_ms,omitempty"`
// Explicit configured automatic-update preference. Nil is unknown, not the
// vendor's default, and never proof an update ran.
AutoUpdateEnabled *bool `json:"auto_update_enabled,omitempty"`
// Contributing scoped preferences. Conflicting project values stay separate
// rather than collapsing into one device-wide answer.
AutoUpdatePreferences []EnablementObservation `json:"auto_update_preferences,omitempty"`
}
MarketplaceObservation is one catalog registration. A catalog that supplies a still-installed plugin but is no longer registered is emitted with Registered=false and whatever provenance survives, rather than omitted.
type NPMRCAudit ¶ added in v1.11.3
type NPMRCAudit struct {
Available bool `json:"npm_available"`
NPMVersion string `json:"npm_version,omitempty"`
NPMPath string `json:"npm_path,omitempty"`
Files []NPMRCFile `json:"files"`
Effective *NPMRCEffective `json:"effective,omitempty"`
Env []NPMRCEnvVar `json:"env"`
DiscoveryError string `json:"discovery_error,omitempty"`
}
NPMRCAudit is the top-level structure produced by the npmrc detector.
type NPMRCEffective ¶ added in v1.11.3
type NPMRCEffective struct {
SourceByKey map[string]string `json:"source_by_key,omitempty"`
Config map[string]any `json:"config,omitempty"`
Error string `json:"error,omitempty"`
}
NPMRCEffective mirrors the merged-config view emitted by `npm config ls -l --json`. Auth values are returned by npm as "(protected)" — that's what we surface.
type NPMRCEntry ¶ added in v1.11.3
type NPMRCEntry struct {
Key string `json:"key"`
DisplayValue string `json:"display_value"`
LineNum int `json:"line_num"`
IsArray bool `json:"is_array,omitempty"`
IsAuth bool `json:"is_auth,omitempty"`
IsEnvRef bool `json:"is_env_ref,omitempty"`
EnvRefVars []string `json:"env_ref_vars,omitempty"`
ValueSHA256 string `json:"value_sha256,omitempty"`
Quoted bool `json:"quoted,omitempty"`
}
NPMRCEntry is one parsed line of a .npmrc file. DisplayValue is always safe to print: auth values are redacted to ***last4 (or *** when the secret is short). The raw value is never stored — ValueSHA256 is the only fingerprint kept.
type NPMRCEnvVar ¶ added in v1.11.3
type NPMRCEnvVar struct {
Name string `json:"name"`
Set bool `json:"set"`
DisplayValue string `json:"display_value,omitempty"`
ValueSHA256 string `json:"value_sha256,omitempty"`
}
NPMRCEnvVar is a single npm-relevant process environment variable. Set=false records are kept so the audit shape stays stable across hosts.
type NPMRCFile ¶ added in v1.11.3
type NPMRCFile struct {
Path string `json:"path"`
Scope string `json:"scope"` // builtin | global | user | project
Exists bool `json:"exists"`
Readable bool `json:"readable"`
SizeBytes int64 `json:"size_bytes,omitempty"`
ModTimeUnix int64 `json:"mtime_unix,omitempty"`
Mode string `json:"mode,omitempty"`
OwnerUID int `json:"owner_uid,omitempty"`
OwnerName string `json:"owner_name,omitempty"`
GroupGID int `json:"group_gid,omitempty"`
GroupName string `json:"group_name,omitempty"`
SHA256 string `json:"sha256,omitempty"`
SymlinkTo string `json:"symlink_target,omitempty"`
InGitRepo bool `json:"in_git_repo,omitempty"`
GitTracked bool `json:"git_tracked,omitempty"`
Entries []NPMRCEntry `json:"entries,omitempty"`
ParseError string `json:"parse_error,omitempty"`
}
NPMRCFile is a single .npmrc file. Metadata is best-effort: fields that could not be determined (e.g. owner_name on Windows) are omitted.
type NodePackage ¶ added in v1.13.0
type NodePackage struct {
Name string `json:"name"`
Version string `json:"version"`
// IsDirect marks a top-level dependency (declared in the project's
// package.json) versus a transitive one pulled in by another package.
// Derived from lockfile structure, not from running the package manager.
IsDirect bool `json:"is_direct,omitempty"`
}
NodePackage is one installed Node package discovered by disk parsing.
Fields are intentionally limited to what the backend persists today (name, version, direct-vs-transitive) — see DeviceNPMPackageUsageInfo. The agent-api NodePackage additionally declares InstallPath and Dependencies, but both are parsed-then-discarded server-side and are omitted here on purpose. JSON tags match ddbmodels.NodePackage.
type NodeScanResult ¶
type NodeScanResult struct {
ProjectPath string `json:"project_path"`
PackageManager string `json:"package_manager"`
PMVersion string `json:"package_manager_version"`
WorkingDirectory string `json:"working_directory"`
RawStdoutBase64 string `json:"raw_stdout_base64,omitempty"`
RawStderrBase64 string `json:"raw_stderr_base64,omitempty"`
Packages []NodePackage `json:"packages,omitempty"`
PackagesCount int `json:"packages_count"`
Error string `json:"error"`
ExitCode int `json:"exit_code"`
ScanDurationMs int64 `json:"scan_duration_ms"`
}
NodeScanResult holds one project's (or one global root's) scan output for enterprise telemetry. Used for both global packages and per-project scans.
Two mutually-exclusive shapes flow through this struct depending on how the scan was produced:
- Legacy (command) path: RawStdoutBase64 carries the raw `npm ls`/`yarn`/ `pnpm`/`bun` output; the backend parses it into packages on ingest.
- Disk-parse path: Packages is populated directly and RawStdoutBase64 is left empty. The backend's ParseNodeProjects passes a project through untouched when RawStdoutBase64 == "", so pre-parsed packages reach storage with no backend change. Never set both: a non-empty RawStdoutBase64 makes the backend re-parse and overwrite Packages.
JSON tags match agent-api's ddbmodels.NodeProject so the payload deserializes server-side without a schema change.
type NuGetConfigAudit ¶ added in v1.18.0
type NuGetConfigAudit struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"` // complete | partial
Reasons []string `json:"reasons"`
Files []NuGetConfigFile `json:"files"`
Contexts []NuGetConfigContext `json:"contexts"`
Findings []CargoConfigFinding `json:"findings"`
ObservedRegistries []string `json:"observed_registries"`
ObservedProxies []string `json:"observed_proxies"`
SourceCount int `json:"source_count"`
ObservedRegistryCount int `json:"observed_registry_count"`
ObservedProxyCount int `json:"observed_proxy_count"`
FindingCount int `json:"finding_count"`
FindingCodeCounts map[string]int `json:"finding_code_counts"`
FindingCounts map[string]int `json:"finding_counts"` // by uppercase severity
}
NuGetConfigAudit follows Composer's observed-source model. Credentials are inline in NuGet.Config, so presence flags replace a credential-file list. The endpoint lists and counts are derived from the read files; the backend recomputes them and treats the producer's values as informational.
type NuGetConfigContext ¶ added in v1.18.0
type NuGetConfigContext struct {
ProjectPath string `json:"project_path"`
ContextKind string `json:"context_kind"` // ambient | restore
Status string `json:"status"` // complete | partial
Reasons []string `json:"reasons"`
ConfigSourceIDs []string `json:"config_source_ids"` // highest precedence first
RestoreMetadataPath string `json:"restore_metadata_path,omitempty"`
}
NuGetConfigContext is an ambient config chain for a project directory, or the config input an assets file recorded for one restore.
type NuGetConfigFile ¶ added in v1.18.0
type NuGetConfigFile struct {
SourceID string `json:"source_id"`
Scope string `json:"scope"` // user | machine | project | process
Path string `json:"path,omitempty"`
Status string `json:"status"` // read | not_found | unreadable | unsupported
Reasons []string `json:"reasons"`
Settings []CargoConfigSetting `json:"settings"`
}
NuGetConfigFile is one configuration source. The process source has no path; a source that was not read carries no current settings.
type NuGetInstallation ¶ added in v1.18.0
type NuGetInventory ¶ added in v1.18.0
type NuGetInventory struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"`
Reasons []string `json:"reasons"`
Sources []NuGetSource `json:"sources"`
Projects []NuGetProject `json:"projects"`
Packages []NuGetPackage `json:"packages"`
}
NuGetInventory keeps declarations, locks, restored graphs, caches, tools, templates and build manifests as independent evidence.
type NuGetOrigin ¶ added in v1.18.0
type NuGetOrigin struct {
Kind string `json:"kind"` // feed | local | unknown
URL string `json:"url,omitempty"`
Path string `json:"path,omitempty"`
}
NuGetOrigin is an observed download source, never a configured candidate.
type NuGetPackage ¶ added in v1.18.0
type NuGetPackage struct {
SourceID string `json:"source_id"`
Evidence string `json:"evidence"` // declared_requirement | locked_package | restored_package | cached_package | installed_tool | installed_template | binary_dependency
PackageName string `json:"package_name"` // lowercase canonical ID
DisplayName string `json:"display_name,omitempty"` // ID as written
SourcePath string `json:"source_path"`
ProjectPath string `json:"project_path,omitempty"`
Scope string `json:"scope"` // project | user | custom | unknown
Reasons []string `json:"reasons"`
VersionStatus string `json:"version_status"` // known | unknown
Version string `json:"version,omitempty"`
VersionNormalized string `json:"version_normalized,omitempty"` // lowercase prerelease identity
RequestedVersion string `json:"requested_version,omitempty"`
DependencyRelation string `json:"dependency_relation"` // direct | transitive | unknown
DevelopmentDependency *bool `json:"development_dependency,omitempty"`
PrivateAssets string `json:"private_assets,omitempty"`
IncludeAssets string `json:"include_assets,omitempty"`
ExcludeAssets string `json:"exclude_assets,omitempty"`
FrameworkAlias string `json:"framework_alias,omitempty"`
TargetFramework string `json:"target_framework,omitempty"`
RuntimeIdentifier string `json:"runtime_identifier,omitempty"`
Conditional bool `json:"conditional,omitempty"` // declared under an MSBuild Condition
AllowedVersions string `json:"allowed_versions,omitempty"`
DeclarationKind string `json:"declaration_kind,omitempty"` // package_reference | global_package_reference | package_download | msbuild_sdk
LockDependencyType string `json:"lock_dependency_type,omitempty"` // Direct | Transitive | CentralTransitive
ToolCommands []string `json:"tool_commands,omitempty"`
Origin NuGetOrigin `json:"origin"`
Installation *NuGetInstallation `json:"installation,omitempty"`
ChecksumStatus string `json:"checksum_status"` // recorded | not_recorded | partial
RecordedChecksums []NuGetRecordedChecksum `json:"recorded_checksums"`
}
NuGetPackage is one fact owned by a single source. A declaration keeps its requested range; exact versions come only from resolved or receipt metadata.
type NuGetProject ¶ added in v1.18.0
type NuGetProject struct {
ManifestSourceID string `json:"manifest_source_id"`
ManifestPath string `json:"manifest_path"`
ProjectPath string `json:"project_path"`
ProjectKind string `json:"project_kind"` // msbuild | legacy | file_based | fsharp_script | tool_manifest
TargetFrameworks []string `json:"target_frameworks"`
SelectionStatus string `json:"selection_status"` // resolved | partial | unresolved
AssetsPath string `json:"assets_path,omitempty"`
LockfilePath string `json:"lockfile_path,omitempty"`
PackagesPath string `json:"packages_path,omitempty"` // legacy packages directory
}
NuGetProject is one declaration context. Target frameworks are the literal project values; an unresolvable value leaves the selection partial.
type NuGetRecordedChecksum ¶ added in v1.18.0
type NuGetRecordedChecksum struct {
Kind string `json:"kind"` // content | archive
Algorithm string `json:"algorithm"` // sha512
Value string `json:"value"` // base64
SourceID string `json:"source_id"`
SourceKind string `json:"source_kind"`
SourcePath string `json:"source_path"`
Verification string `json:"verification"` // recorded
}
NuGetRecordedChecksum distinguishes NuGet's package-content hash from the archive byte hash; the two differ for signed packages.
type NuGetSource ¶ added in v1.18.0
type NuGetSource = CargoSource
NuGetSource shares Cargo's source ownership and coverage contract. Kinds: project_search_root, project_manifest, central_versions, project_assets, lockfile, legacy_manifest, script_manifest, package_cache, package_archive, tool_manifest, tool_store, tool_resolver_cache, template_receipt, binary_metadata.
type PackageDetail ¶ added in v1.10.0
PackageDetail represents a single package name and version.
type PackageScanConfig ¶ added in v1.17.0
type PackageScanConfig struct {
DeltaEnabled bool `json:"delta_enabled"`
}
PackageScanConfig is the backend authorization for delta package uploads. Missing, null, and false all select legacy full-snapshot reporting.
type PipAudit ¶ added in v1.11.3
type PipAudit struct {
Available bool `json:"pip_available"`
Invocation string `json:"pip_invocation,omitempty"` // "pip" | "pip3" | "python3 -m pip"
Version string `json:"pip_version,omitempty"`
Path string `json:"pip_path,omitempty"`
Files []PipConfigFile `json:"files"`
EnvVars []PipEnvVar `json:"env_vars"`
Effective *PipEffective `json:"effective,omitempty"`
Netrc *PipNetrcStatus `json:"netrc,omitempty"`
Findings []PipFinding `json:"findings"`
DiscoveryError string `json:"discovery_error,omitempty"`
}
PipAudit is the top-level pip audit object.
type PipConfigFile ¶ added in v1.11.3
type PipConfigFile struct {
Path string `json:"path"`
Layer string `json:"layer"` // global | user | user-legacy | site | PIP_CONFIG_FILE
Exists bool `json:"exists"`
Readable bool `json:"readable"`
SizeBytes int64 `json:"size_bytes,omitempty"`
ModTimeUnix int64 `json:"mtime_unix,omitempty"`
Mode string `json:"mode,omitempty"`
OwnerName string `json:"owner_name,omitempty"`
GroupName string `json:"group_name,omitempty"`
SHA256 string `json:"sha256,omitempty"`
InGitRepo bool `json:"in_git_repo,omitempty"`
GitTracked bool `json:"git_tracked,omitempty"`
Sections []PipSection `json:"sections,omitempty"`
ParseError string `json:"parse_error,omitempty"`
}
PipConfigFile is one pip.conf / pip.ini discovered on disk. Layer is the precedence layer pip itself assigns.
type PipEffective ¶ added in v1.11.3
type PipEffective struct {
SourceByKey map[string]string `json:"source_by_key,omitempty"`
Config map[string]string `json:"config,omitempty"`
Error string `json:"error,omitempty"`
}
PipEffective is the merged-config view from `pip config list -v`. The SourceByKey map keys are "<section>.<key>" to disambiguate the same key appearing in multiple sections.
type PipEnvVar ¶ added in v1.11.3
type PipEnvVar struct {
Name string `json:"name"`
Set bool `json:"set"`
Value string `json:"-"` // raw; never serialized
Display string `json:"display,omitempty"`
SHA256 string `json:"sha256,omitempty"`
}
PipEnvVar captures one PIP_* environment variable. Display is the finding-grade safe-to-print form (creds redacted in URLs). Unset vars are kept (Set=false) so the audit shape stays stable across hosts and a future change-tracking layer can detect newly-set vars between runs.
type PipFinding ¶ added in v1.11.3
type PipFinding struct {
ID string `json:"id"` // "pip-001" etc.
Severity string `json:"severity"` // CRITICAL | HIGH | MEDIUM | LOW | INFO
Category string `json:"category"`
Source string `json:"source"` // file path or env var name
Section string `json:"section,omitempty"` // "global" / "install" / "" for env vars
Key string `json:"key,omitempty"`
ValueShown string `json:"value_shown,omitempty"`
Detail string `json:"detail"`
Remediation string `json:"remediation,omitempty"`
}
PipFinding is one detection from the rule catalog (pip-001 .. pip-024). ValueShown is always pre-redacted; the raw value never leaves the detector.
type PipKeyValue ¶ added in v1.11.3
type PipKeyValue struct {
Key string `json:"key"`
// Values holds the raw, un-redacted parsed values. Used internally by
// the findings engine (URL.User parsing, http-scheme detection, etc.)
// — NEVER serialized to JSON or pretty output, since for keys like
// `extra-index-url` it can hold a literal `user:pass@host` URL. Use
// Display for any user-visible rendering.
Values []string `json:"-"`
Display string `json:"display,omitempty"` // human-readable single-line rendering, with creds redacted
LineNum int `json:"line_num"`
}
PipKeyValue is a single key/value (or key/multi-value) entry inside a section. Repeatable options surface as multiple Values.
type PipNetrcStatus ¶ added in v1.11.3
type PipNetrcStatus struct {
Path string `json:"path"`
Exists bool `json:"exists"`
Mode string `json:"mode,omitempty"` // empty on Windows
}
PipNetrcStatus is informational: pip falls back to ~/.netrc for credentials, so its presence + permissions matter even though we don't parse the contents (.netrc is shared with curl/wget/twine/etc.; auditing its content is a separate concern).
type PipSection ¶ added in v1.11.3
type PipSection struct {
Name string `json:"name"` // "global", "install", "freeze", "wheel", "list", "hash", ...
LineNum int `json:"line_num"`
Entries []PipKeyValue `json:"entries"`
}
PipSection is one [section] block in a pip config file.
type PkgManager ¶
type PluginComponent ¶ added in v1.17.0
type PluginComponent struct {
ComponentID string `json:"component_id"`
Kind string `json:"kind"`
Name string `json:"name"` // native declaration name, not display text
// Relative to the selected plugin root, forward-slash, never containing "..".
// A root declaration uses ".".
RelativePath string `json:"relative_path"`
Status string `json:"status"`
DefinitionPath string `json:"definition_path,omitempty"`
// Symlink-resolved absolute path, when resolution succeeded. Used for
// deduplicating one physical read; never a cross-device identity.
ResolvedDefinitionPath string `json:"resolved_definition_path,omitempty"`
// RFC 6901 pointer into the manifest, for a declaration that has no file of
// its own. It never implies a file exists at RelativePath.
DeclarationPointer string `json:"declaration_pointer,omitempty"`
// How the agent invokes this declaration. Empty for kinds that are not invoked.
CallableNames []string `json:"callable_names"`
Skill *AgentSkill `json:"skill,omitempty"`
Command *AgentCommandDefinition `json:"command,omitempty"`
MCPConfig *MCPConfigEnterprise `json:"mcp_config,omitempty"`
MCPEnablement []EnablementObservation `json:"mcp_enablement,omitempty"`
}
PluginComponent is one declaration inside one installation. Exactly one payload matches Kind — Skill, Command or MCPConfig — and the remaining kinds carry none: they are descriptive, and their scripts, hooks and manifests are never uploaded.
type PluginObservation ¶ added in v1.17.0
type PluginObservation struct {
InstanceID string `json:"instance_id"`
NativeID string `json:"native_id"`
Name string `json:"name"` // catalog entry / native display name
MarketplaceID string `json:"marketplace_id,omitempty"`
// The manifest's own name, which need not equal the catalog entry name.
ManifestName string `json:"manifest_name,omitempty"`
// Stable non-secret account object id from a supported local marker.
RemotePluginID string `json:"remote_plugin_id,omitempty"`
InstallationKind string `json:"installation_kind"`
Scope string `json:"scope"`
// The project a project/local installation applies to. It need not contain the
// payload — a shared cache outside the project can supply both scopes — and a
// user or system installation has none rather than an invented one.
ProjectPath string `json:"project_path,omitempty"`
InstallPath string `json:"install_path,omitempty"`
// Original local source, retained separately from the installation's cache path.
SourcePath string `json:"source_path,omitempty"`
ManifestPath string `json:"manifest_path,omitempty"`
Source *SourceLocator `json:"source,omitempty"` // payload, not catalog
ManifestFormat string `json:"manifest_format,omitempty"`
ManifestVersion string `json:"manifest_version,omitempty"`
CacheVersion string `json:"cache_version,omitempty"` // directory label, not the manifest's version
// Self-declared package metadata. Publisher is a name the package claims, not
// a verified identity; homepage is a sanitized HTTP(S) URL.
Description string `json:"description,omitempty"`
Publisher string `json:"publisher,omitempty"`
Homepage string `json:"homepage,omitempty"`
// Native recorded times. Not catalog refresh, not first-seen, not mtime.
InstalledAtMs *int64 `json:"installed_at_ms,omitempty"`
LastUpdatedAtMs *int64 `json:"last_updated_at_ms,omitempty"`
// Tri-state. Installed=true needs positive native installation or supported
// directory-loading evidence; a cache directory or a stray flag is neither.
// FilesPresent=false keeps an installation that lost its payload.
Installed *bool `json:"installed,omitempty"`
FilesPresent *bool `json:"files_present,omitempty"`
InstallationEvidence string `json:"installation_evidence"`
// The preference at this installation's own scope, and the resolved result —
// populated only when every relevant layer for that same scope was readable.
// Neither proves the agent loaded the plugin.
ConfiguredEnabled *bool `json:"configured_enabled,omitempty"`
EffectiveEnabled *bool `json:"effective_enabled,omitempty"`
Enablement []EnablementObservation `json:"enablement"`
ComponentStatus string `json:"component_status"`
Components []PluginComponent `json:"components"`
Errors []AgentScanError `json:"errors"`
}
PluginObservation is one installation of one plugin within one context.
type PnpmAudit ¶ added in v1.12.0
type PnpmAudit struct {
Available bool `json:"pnpm_available"`
PnpmVersion string `json:"pnpm_version,omitempty"`
PnpmPath string `json:"pnpm_path,omitempty"`
Files []NPMRCFile `json:"files"`
Effective *PnpmEffective `json:"effective,omitempty"`
Env []NPMRCEnvVar `json:"env"`
DiscoveryError string `json:"discovery_error,omitempty"`
}
PnpmAudit reuses NPMRCFile/NPMRCEnvVar — pnpm reads the same .npmrc syntax as npm. Only the effective view and env list diverge.
type PnpmEffective ¶ added in v1.12.0
type PnpmEffective struct {
SourceByKey map[string]string `json:"source_by_key,omitempty"`
Config map[string]any `json:"config,omitempty"`
Error string `json:"error,omitempty"`
}
PnpmEffective mirrors `pnpm config list --json`. SourceByKey is kept on the struct for renderer parity with npm but is typically empty — pnpm doesn't emit per-key source attribution.
type ProjectInfo ¶ added in v1.10.0
type ProjectInfo struct {
Path string `json:"path"`
PackageManager string `json:"package_manager,omitempty"`
Packages []PackageDetail `json:"packages,omitempty"`
}
ProjectInfo represents a detected project directory with its packages.
type PythonPackage ¶ added in v1.10.0
PythonPackage represents a single installed Python package.
type PythonScanResult ¶ added in v1.10.0
type PythonScanResult struct {
PackageManager string `json:"package_manager"`
PMVersion string `json:"package_manager_version"`
BinaryPath string `json:"binary_path"` // Resolved path to the package manager binary
RawStdoutBase64 string `json:"raw_stdout_base64"`
RawStderrBase64 string `json:"raw_stderr_base64"`
Error string `json:"error"`
ExitCode int `json:"exit_code"`
ScanDurationMs int64 `json:"scan_duration_ms"`
}
PythonScanResult holds raw Python scan output for enterprise telemetry.
type RemovedProjectRef ¶ added in v1.13.0
type RemovedProjectRef struct {
Path string `json:"path"`
LastUploadedExecutionID string `json:"last_uploaded_execution_id,omitempty"`
}
RemovedProjectRef tells the backend a project has disappeared from disk. Backend drops Path from every matching row's ProjectPaths and bumps RecordUpdatedAt but not LastSeenAt.
type RubyConfigAudit ¶ added in v1.18.0
type RubyConfigAudit struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"` // complete | partial
Reasons []string `json:"reasons"`
Files []RubyConfigFile `json:"files"`
Contexts []RubyConfigContext `json:"contexts"`
CredentialFiles []RubyCredentialFile `json:"credential_files"`
Findings []CargoConfigFinding `json:"findings"`
}
RubyConfigAudit follows Composer's observed-source model with a manager on each file and context. The backend derives endpoint summaries and counts.
type RubyConfigContext ¶ added in v1.18.0
type RubyConfigContext struct {
Manager string `json:"manager"`
ProjectPath string `json:"project_path,omitempty"`
ConfigSourceIDs []string `json:"config_source_ids"` // highest precedence first
SelectionStatus string `json:"selection_status"` // observed | partial
}
RubyConfigContext is one manager's observed precedence chain, not a claim of a single effective configuration. Ambient contexts have no project.
type RubyConfigFile ¶ added in v1.18.0
type RubyConfigFile struct {
SourceID string `json:"source_id"`
Manager string `json:"manager"` // rubygems | bundler
Scope string `json:"scope"` // system | user | project | process
Path string `json:"path,omitempty"`
Status string `json:"status"` // present | absent | skipped_protected | unreadable | invalid | unsupported
Reasons []string `json:"reasons"`
Settings []CargoConfigSetting `json:"settings"`
}
RubyConfigFile is one configuration source. Process sources have no path; a source that is not present carries no current settings.
type RubyCredentialFile ¶ added in v1.18.0
type RubyCredentialFile = CargoCredentialFile
RubyCredentialFile reports existence only; contents are never read.
type RubyInstallation ¶ added in v1.18.0
type RubyInstallation struct {
Path string `json:"path,omitempty"`
PathStatus string `json:"path_status"` // resolved | unresolved | not_applicable
Presence string `json:"presence"` // present | absent | unknown | not_applicable
DefaultGem bool `json:"default_gem"`
}
RubyInstallation is directory presence, separate from receipt lifecycle. Default gems can live in Ruby's own library and have no package directory.
type RubyInventory ¶ added in v1.18.0
type RubyInventory struct {
SchemaVersion int `json:"schema_version"`
Status string `json:"status"` // complete | partial
Reasons []string `json:"reasons"`
Sources []RubySource `json:"sources"`
Projects []RubyProject `json:"projects"`
Packages []RubyPackage `json:"packages"`
}
RubyInventory covers RubyGems and Bundler from passive metadata reads; no Ruby, gem, bundle or Git command runs. Declarations, locks, installed receipts and caches stay separate evidence.
type RubyOrigin ¶ added in v1.18.0
type RubyOrigin struct {
Kind string `json:"kind"` // registry | git | path | unknown
URL string `json:"url,omitempty"`
Path string `json:"path,omitempty"`
}
RubyOrigin is observed provenance. Receipts and caches are always unknown; a configured default registry is never assumed.
type RubyPackage ¶ added in v1.18.0
type RubyPackage struct {
SourceID string `json:"source_id"`
SourcePath string `json:"source_path"`
PackageName string `json:"package_name"`
Evidence string `json:"evidence"` // declared_requirement | locked_package | installed_package | cached_package
ProjectPath string `json:"project_path,omitempty"`
Scope string `json:"scope"` // project | user | system | unknown
Reasons []string `json:"reasons"`
VersionStatus string `json:"version_status"` // known | unknown (declarations)
Version string `json:"version,omitempty"`
Platform string `json:"platform,omitempty"`
// RequestedVersions is present, possibly [], on declarations only.
RequestedVersions *[]string `json:"requested_versions,omitempty"`
Groups []string `json:"groups,omitempty"`
DeclaredPlatforms []string `json:"declared_platforms,omitempty"`
DependencyRelation string `json:"dependency_relation"` // direct | transitive | unknown
DependencyKind string `json:"dependency_kind"` // runtime | development | unknown
Origin RubyOrigin `json:"origin"`
Revision string `json:"revision,omitempty"` // recorded Git revision, lock evidence only
Installation *RubyInstallation `json:"installation,omitempty"` // installed evidence only
ChecksumStatus string `json:"checksum_status"` // absent | recorded | partial
RecordedChecksums []RubyRecordedChecksum `json:"recorded_checksums"`
}
RubyPackage is one observation. Names and versions keep their exact spelling; platform is the exact artifact platform, never a Gemfile selector.
type RubyProject ¶ added in v1.18.0
type RubyProject struct {
ManifestSourceID string `json:"manifest_source_id"`
ManifestPath string `json:"manifest_path"`
ProjectPath string `json:"project_path"`
SelectionStatus string `json:"selection_status"` // observed | partial
LockfilePaths []string `json:"lockfile_paths"`
PackageName string `json:"package_name,omitempty"`
PackageVersion string `json:"package_version,omitempty"`
}
RubyProject is a Gemfile, gems.rb or standalone gemspec project. Partial selection means its active lock or declarations are not established.
type RubyRecordedChecksum ¶ added in v1.18.0
type RubyRecordedChecksum = ComposerRecordedChecksum
RubyRecordedChecksum is a lock-recorded SHA-256, never a verification.
type RubySource ¶ added in v1.18.0
type RubySource = CargoSource
RubySource reuses the Cargo source shape. Kinds: project_search_root | gem_home | manifest | gemspec | lockfile | installed_metadata | bundler_checkout | cache_root | cache_archive | cached_metadata.
type RuleFileMatch ¶ added in v1.12.0
type RuleFileMatch struct {
Path string `json:"path"`
MatchedGlob string `json:"matched_glob"`
FileSHA256 string `json:"file_sha256,omitempty"`
SizeExceeded bool `json:"size_exceeded,omitempty"`
Groups []GroupResult `json:"groups,omitempty"`
FileAttrs FileAttrs `json:"file_attrs"`
}
RuleFileMatch is one candidate file reported for a rule. SizeExceeded is set when the file was larger than the rule's size guard: it is reported but not read, so FileSHA256 and Groups are empty. FileAttrs (Stat-only metadata) is always present.
type RuleResult ¶ added in v1.12.0
type RuleResult struct {
RuleID string `json:"rule_id"`
RuleRevision string `json:"rule_revision,omitempty"`
MatchesTruncated bool `json:"matches_truncated,omitempty"`
Files []RuleFileMatch `json:"files"`
}
RuleResult is one rule that matched at least one file. MatchesTruncated is true when more than the per-rule cap (200) of files matched; the Files slice is capped and the corresponding EvaluatedRule.Complete is false.
type RuleScan ¶ added in v1.12.0
type RuleScan struct {
ScanComplete bool `json:"scan_complete"`
EvaluatedRules []EvaluatedRule `json:"evaluated_rules"`
Results []RuleResult `json:"results"`
}
RuleScan is the top-level result of one malicious-file scan. It carries the scan-level completeness flag, every rule the engine evaluated (even those with zero matches), and the per-rule match results. ScanComplete is false when a global file/time budget cut the walk short, which suppresses backend auto-resolution for the whole run.
type RuntimeInstall ¶ added in v1.18.0
type RuntimeInstall struct {
Runtime string `json:"runtime"` // node, python, php, java, go, ruby, deno, bun, dotnet
Version string `json:"version"` // "unknown" when no strategy yielded one
VersionSource string `json:"version_source"` // file, pe, pkg, binary, path, unknown
ExecutablePath string `json:"executable_path"` // symlink-resolved path of the binary
InstallRoot string `json:"install_root,omitempty"` // runtime home (parent of bin/, or the exe dir)
Source string `json:"source"` // nvm, fnm, volta, brew, scoop, pyenv, sdkman, system, installer, manual, …
Scope string `json:"scope"` // user (under the user's home) or machine
Vendor string `json:"vendor,omitempty"` // distribution vendor where known (java IMPLEMENTOR)
BundledBy string `json:"bundled_by,omitempty"` // app that ships this runtime privately; empty for standalone installs
Arch string `json:"arch,omitempty"` // from the binary header: amd64, arm64, 386, universal
InstallTimeUnix int64 `json:"install_time_unix,omitempty"` // executable mtime
}
RuntimeInstall is one language runtime install found on disk (node, python, java, …), independent of how it was installed.
type RuntimeScanResult ¶ added in v1.18.0
type RuntimeScanResult struct {
Runtimes []RuntimeInstall `json:"runtimes"`
RuntimesCount int `json:"runtimes_count"`
Truncated bool `json:"truncated,omitempty"` // walk stopped early (entry cap or deadline)
TruncatedRoots []string `json:"truncated_roots,omitempty"` // set only when every truncation was a per-root budget hit: installs outside these roots are complete
Error string `json:"error,omitempty"`
ScanDurationMs int64 `json:"scan_duration_ms"`
}
RuntimeScanResult holds the runtime inventory for enterprise telemetry.
type ScanResult ¶
type ScanResult struct {
AgentVersion string `json:"agent_version"`
AgentURL string `json:"agent_url"`
ScanTimestamp int64 `json:"scan_timestamp"`
ScanTimestampISO string `json:"scan_timestamp_iso"`
Device Device `json:"device"`
AIAgentsAndTools []AITool `json:"ai_agents_and_tools"`
IDEInstallations []IDE `json:"ide_installations"`
IDEExtensions []Extension `json:"ide_extensions"`
MCPConfigs []MCPConfig `json:"mcp_configs"`
NodePkgManagers []PkgManager `json:"node_package_managers"`
NodePackages []any `json:"node_packages"`
NodeProjects []ProjectInfo `json:"node_projects"`
BrewPkgManager *PkgManager `json:"brew_package_manager,omitempty"`
BrewFormulae []BrewPackage `json:"brew_formulae"`
BrewCasks []BrewPackage `json:"brew_casks"`
PythonPkgManagers []PkgManager `json:"python_package_managers"`
PythonPackages []PythonPackage `json:"python_packages"`
PythonProjects []ProjectInfo `json:"python_projects"`
SystemPkgManager *PkgManager `json:"system_package_manager,omitempty"`
SystemPackages []SystemPackage `json:"system_packages"`
SnapPkgManager *PkgManager `json:"snap_package_manager,omitempty"`
SnapPackages []SystemPackage `json:"snap_packages"`
FlatpakPkgManager *PkgManager `json:"flatpak_package_manager,omitempty"`
FlatpakPackages []SystemPackage `json:"flatpak_packages"`
// WindowsPackageScans holds the Windows system package sources (arp,
// choco, scoop, winget); Windows only.
WindowsPackageScans []SystemPackageScanResult `json:"windows_package_scans,omitempty"`
// RuntimeScan is the language runtime inventory; nil when disabled.
RuntimeScan *RuntimeScanResult `json:"runtime_scan,omitempty"`
NPMRCAudit *NPMRCAudit `json:"npmrc_audit,omitempty"`
PipAudit *PipAudit `json:"pip_audit,omitempty"`
PnpmAudit *PnpmAudit `json:"pnpm_audit,omitempty"`
BunAudit *BunAudit `json:"bun_audit,omitempty"`
YarnAudit *YarnAudit `json:"yarn_audit,omitempty"`
// AgentSkills is the flat list of discovered AI agent skills. AgentSkillScan
// is the phase summary; its non-nil presence is the "scan ran" sentinel (a
// nil section must never cause the backend to delete skill state).
AgentSkills []AgentSkill `json:"agent_skills,omitempty"`
AgentSkillScan *AgentSkillScanInfo `json:"agent_skill_scan,omitempty"`
// CredentialScan is the credential-location inventory. Nil means the phase
// did not run, which is the only "no information" signal a reader has — a
// non-nil section with zero findings means it ran and found nothing.
CredentialScan *CredentialScanInfo `json:"credential_scan,omitempty"`
// BrowserExtensionScan is the browser extension inventory. Nil means the
// phase did not run — the only "no information" signal a reader has, and the
// difference between it and a section carrying zero findings is what keeps a
// skipped scan from erasing a device's extensions.
BrowserExtensionScan *BrowserExtensionScanInfo `json:"browser_extension_scan,omitempty"`
// Nil plugin coverage means unreported, not an empty inventory.
AgentPlugins *AgentPlugins `json:"agent_plugins,omitempty"`
Summary Summary `json:"summary"`
}
ScanResult is the community-mode JSON output structure.
type SkillUsage ¶ added in v1.17.0
type SkillUsage struct {
Availability string `json:"availability"`
RecordedUses *int64 `json:"recorded_uses,omitempty"`
LastRecordedUseAtMs *int64 `json:"last_recorded_use_at_ms,omitempty"`
RawKey string `json:"raw_key,omitempty"`
SourceID string `json:"source_id,omitempty"`
ObservedAtMs int64 `json:"observed_at_ms,omitempty"`
}
SkillUsage is a native cumulative counter associated with a detected skill. A nil count means unavailable or ambiguous, not zero uses.
type SourceLocator ¶ added in v1.17.0
type SourceLocator struct {
Kind string `json:"kind"`
// The native discriminator as written — "file", "directory", "git-subdir",
// "url" — kept because normalization is lossy, not because it is replayable.
NativeKind string `json:"native_kind,omitempty"`
// Sanitized repository or catalog URL, local path, registry URL or non-secret
// account object id. Userinfo, query and fragment are stripped.
Location string `json:"location,omitempty"`
Subdirectory string `json:"subdirectory,omitempty"` // slash-separated, no traversal
// What was asked for, kept apart from what is actually installed: a pin is
// not a verified checkout.
RequestedRef string `json:"requested_ref,omitempty"`
RequestedSHA string `json:"requested_sha,omitempty"`
ResolvedRevision string `json:"resolved_revision,omitempty"`
Integrity string `json:"integrity,omitempty"`
PackageName string `json:"package_name,omitempty"`
PackageVersion string `json:"package_version,omitempty"` // requested range/tag, not resolved
// PluginCommandModeCopy | PluginCommandModeLink. The command text itself is
// never collected: a real producer command can embed a secret.
CommandMode string `json:"command_mode,omitempty"`
// Declared catalog checkout selection. Records configuration; grants no reads.
SparsePaths []string `json:"sparse_paths,omitempty"`
}
SourceLocator describes where one catalog or one payload came from. A marketplace's source and its entries' payload sources are independent and need not be the same repository.
type Summary ¶
type Summary struct {
AIAgentsAndToolsCount int `json:"ai_agents_and_tools_count"`
IDEInstallationsCount int `json:"ide_installations_count"`
IDEExtensionsCount int `json:"ide_extensions_count"`
MCPConfigsCount int `json:"mcp_configs_count"`
NodeProjectsCount int `json:"node_projects_count"`
BrewFormulaeCount int `json:"brew_formulae_count"`
BrewCasksCount int `json:"brew_casks_count"`
PythonProjectsCount int `json:"python_projects_count"`
SystemPackagesCount int `json:"system_packages_count"`
SnapPackagesCount int `json:"snap_packages_count"`
FlatpakPackagesCount int `json:"flatpak_packages_count"`
RuntimesCount int `json:"runtimes_count"`
AgentSkillsCount int `json:"agent_skills_count"`
AgentPluginsCount int `json:"agent_plugins_count"`
}
type SystemPackage ¶ added in v1.11.0
type SystemPackage struct {
Name string `json:"name"`
Version string `json:"version"`
Arch string `json:"arch,omitempty"` // CPU architecture: x86_64, amd64, noarch, arm64, etc.
Source string `json:"source,omitempty"` // Origin: source RPM, dpkg source, snap publisher, flatpak remote
InstallPath string `json:"install_path,omitempty"` // On-disk install root. Populated for snap (/snap/<name>/current) and flatpak (~/.local/share/flatpak/app/<id> or /var/lib/flatpak/app/<id>). Not applicable for rpm/dpkg/pacman/apk (file collections).
InstallTimeUnix int64 `json:"install_time_unix,omitempty"` // Unix epoch seconds when installed (rpm, dpkg, pacman)
Scope string `json:"scope,omitempty"` // Windows: "machine" (HKLM, ProgramData) or "user" (HKCU, user profile)
// Provenance & trust signals
Vendor string `json:"vendor,omitempty"` // Distributor: rpm VENDOR, dpkg Origin
Maintainer string `json:"maintainer,omitempty"` // Packager identity: rpm PACKAGER, dpkg Maintainer, apk maintainer, pacman Packager
URL string `json:"url,omitempty"` // Upstream project URL
License string `json:"license,omitempty"` // SPDX license expression
Section string `json:"section,omitempty"` // dpkg Section category (e.g. "libs", "non-free/libs")
Signature string `json:"signature,omitempty"` // Signature info: rpm SIGPGP/RSAHEADER, pacman Validated By
BuildTimeUnix int64 `json:"build_time_unix,omitempty"` // Unix epoch when package was built (rpm, apk, pacman)
// Size
InstalledSize int64 `json:"installed_size,omitempty"` // Installed size in bytes (rpm SIZE, dpkg Installed-Size * 1024)
// Sandboxing / confinement (snap, flatpak)
Confinement string `json:"confinement,omitempty"` // snap: strict/classic/devmode
Channel string `json:"channel,omitempty"` // snap tracking channel, flatpak branch
Runtime string `json:"runtime,omitempty"` // flatpak runtime ref
// Source control
CommitHash string `json:"commit_hash,omitempty"` // apk commit, flatpak active commit
}
SystemPackage represents a package installed via the system package manager (rpm, dpkg, pacman, apk, snap, flatpak; on Windows: ARP, choco, scoop, winget).
type SystemPackageScanResult ¶ added in v1.11.0
type SystemPackageScanResult struct {
ScanType string `json:"scan_type"` // "rpm", "dpkg", "pacman", "apk", "snap", "flatpak"; Windows: "arp", "choco", "scoop", "winget"
PackageManager *PkgManager `json:"package_manager,omitempty"`
Packages []SystemPackage `json:"packages"`
PackagesCount int `json:"packages_count"`
Error string `json:"error,omitempty"`
ScanDurationMs int64 `json:"scan_duration_ms"`
}
SystemPackageScanResult holds parsed system package data for enterprise telemetry. Unlike BrewScanResult (which sends raw base64), this sends pre-parsed packages since syspkg.go already handles the format-specific parsing edge cases.
type UnchangedGlobalRef ¶ added in v1.13.0
type UnchangedGlobalRef struct {
PackageManager string `json:"package_manager"`
ScanOutputHash string `json:"scan_output_hash"`
LastUploadedExecutionID string `json:"last_uploaded_execution_id,omitempty"`
}
UnchangedGlobalRef tells the backend a PM's global package set is unchanged. Keyed by PM name (globals are PM-scoped, not path-scoped).
type UnchangedProjectRef ¶ added in v1.13.0
type UnchangedProjectRef struct {
Path string `json:"path"`
ScanOutputHash string `json:"scan_output_hash"`
LastUploadedExecutionID string `json:"last_uploaded_execution_id,omitempty"`
}
UnchangedProjectRef tells the backend a project is unchanged since the last successful upload. Backend bumps LastSeenAt on every package row whose ProjectPaths contains Path.
type WSLDistro ¶ added in v1.17.0
type WSLDistro struct {
Name string `json:"name"`
// DistroID is the distribution's registry key name, a GUID, and the only
// stable per-distro identifier. It survives restarts and renames (renaming
// rewrites DistributionName only — this WSL build has no `--rename` command
// at all) and changes on unregister/re-import, which genuinely is a new
// environment. Never derive it from BasePath: only store-installed distros
// carry the GUID in their path, an imported one reads e.g. C:\wsl1\Alpine.
DistroID string `json:"distro_id,omitempty"`
// WSLVersion is 1 or 2 (0 if undeterminable), derived from the registry
// Flags 0x8 bit — the per-distro Version DWORD is unreliable (it reads 2 on
// WSL1 distros). Measured on both: WSL1 → Flags 0x7 → v1, WSL2 → Flags 0xF
// → v2 (microsoft/WSL#4251; verified on the metal WSL2 test VM).
WSLVersion int `json:"wsl_version"`
Running bool `json:"running"`
Default bool `json:"default"`
OwnerSID string `json:"owner_sid,omitempty"`
BasePath string `json:"base_path,omitempty"`
// DefaultUID is the uid `wsl -d <name>` runs as, read from the registry
// DefaultUid value. Distinguishing 0 from absent matters: 0 means the
// distro has no non-root user, so its home holds nothing worth scanning,
// whereas nil means we could not read the value. Never scan as root
// explicitly — root's home is empty and would read as a clean machine.
DefaultUID *uint32 `json:"default_uid,omitempty"`
}
WSLDistro is one registered WSL distribution.
type WSLGuest ¶ added in v1.17.0
type WSLGuest struct {
HostDeviceID string `json:"host_device_id"`
DistroID string `json:"distro_id"`
}
WSLGuest identifies this agent as running INSIDE a WSL distribution and names the Windows host it belongs to. Set only from the flags the host passes at trigger time (--wsl-host-serial / --wsl-distro-id): a distro cannot discover either value for itself without depending on Windows interop.
It exists because a distro has no usable identity of its own — it inherits the host's hostname, and a minimal or WSL1 distro has no /etc/machine-id at all. The backend pairs on DistroID against the host's own reported distro list.
type WSLInfo ¶ added in v1.17.0
type WSLInfo struct {
Presence string `json:"presence"` // WSLPresence* — yes | no | unknown
Installed bool `json:"installed"` // WSL runtime service (WslService/LxssManager) present
Active bool `json:"active"` // at least one distribution running right now
Version string `json:"version"` // installed WSL package version; "unknown" if undeterminable
Distros []WSLDistro `json:"distros,omitempty"`
}
WSLInfo reports Windows Subsystem for Linux on a Windows host: whether it is present, whether a distribution is currently running, the installed WSL package version, and the registered distributions. Populated only by the Windows agent (WSL detection is a host-side concern — the Linux binary runs *inside* a distro and identifies itself separately).
type YarnAudit ¶ added in v1.12.0
type YarnAudit struct {
Available bool `json:"yarn_available"`
YarnVersion string `json:"yarn_version,omitempty"`
YarnPath string `json:"yarn_path,omitempty"`
Flavor string `json:"flavor,omitempty"` // "classic" | "berry" | "unknown"
Files []YarnConfigFile `json:"files"`
NPMRCFiles []NPMRCFile `json:"npmrc_files"` // auth side-channel
Env []NPMRCEnvVar `json:"env"`
DiscoveryError string `json:"discovery_error,omitempty"`
}
YarnAudit covers both classic (v1.x, .yarnrc) and berry (v2+, .yarnrc.yml). Top-level Flavor reflects the binary's major; per-file Flavor reflects the file's own syntax — the renderer flags mismatches.
type YarnConfigFile ¶ added in v1.12.0
type YarnConfigFile struct {
Path string `json:"path"`
Scope string `json:"scope"` // "user" | "project"
Flavor string `json:"flavor"` // "classic" | "berry"
Exists bool `json:"exists"`
Readable bool `json:"readable"`
SizeBytes int64 `json:"size_bytes,omitempty"`
ModTimeUnix int64 `json:"mtime_unix,omitempty"`
Mode string `json:"mode,omitempty"`
OwnerUID int `json:"owner_uid,omitempty"`
OwnerName string `json:"owner_name,omitempty"`
GroupGID int `json:"group_gid,omitempty"`
GroupName string `json:"group_name,omitempty"`
SHA256 string `json:"sha256,omitempty"`
SymlinkTo string `json:"symlink_target,omitempty"`
InGitRepo bool `json:"in_git_repo,omitempty"`
GitTracked bool `json:"git_tracked,omitempty"`
Entries []YarnEntry `json:"entries,omitempty"`
ParseError string `json:"parse_error,omitempty"`
}
YarnConfigFile is a discovered .yarnrc (classic) or .yarnrc.yml (berry).
type YarnEntry ¶ added in v1.12.0
type YarnEntry struct {
Key string `json:"key"`
DisplayValue string `json:"display_value"`
LineNum int `json:"line_num,omitempty"`
IsAuth bool `json:"is_auth,omitempty"`
IsEnvRef bool `json:"is_env_ref,omitempty"`
EnvRefVars []string `json:"env_ref_vars,omitempty"`
ValueSHA256 string `json:"value_sha256,omitempty"`
Quoted bool `json:"quoted,omitempty"`
}
YarnEntry is a parsed key/value from either flavor. Berry nested maps flatten to dotted keys (e.g. `npmScopes.@step-security.npmAuthToken`) so the same slice carries both flavors.