ObjectStackObjectStack

Plugin Security

Plugin Security protocol schemas

Plugin Security & Dependency Resolution Protocol

Provides comprehensive security scanning, vulnerability management, and dependency resolution for the ObjectStack plugin ecosystem.

Features:

  • CVE/vulnerability scanning
  • Dependency graph resolution
  • Semantic version conflict detection
  • Supply chain security
  • Plugin sandboxing policies
  • Trust and verification workflows

Source: packages/spec/src/kernel/plugin-security.zod.ts

TypeScript Usage

import { DependencyGraphSchema, DependencyGraphNodeSchema, PackageDependencyConflictSchema, PackageDependencyResolutionResultSchema, PluginProvenanceSchema, PluginTrustScoreSchema, ResolvedPackageDependencySchema, SBOMSchema, SBOMEntrySchema, SecurityPolicySchema, SecurityScanResultSchema, SecurityVulnerabilitySchema, VulnerabilitySeverity } from '@objectstack/spec/kernel';
import type { DependencyGraph, DependencyGraphNode, PackageDependencyConflict, PackageDependencyResolutionResult, PluginProvenance, PluginTrustScore, ResolvedPackageDependency, SBOM, SBOMEntry, SecurityPolicy, SecurityScanResult, SecurityVulnerability, VulnerabilitySeverity } from '@objectstack/spec/kernel';

// Validate data
const result = DependencyGraphSchema.parse(data);

DependencyGraph

Complete dependency graph for a package and its transitive dependencies

Properties

PropertyTypeRequiredDescription
root{ id: string; version: string }Root package of the dependency graph
nodes{ id: string; version: string; dependencies: object[]; depth: integer; … }[]All resolved package nodes in the dependency graph
edges{ from: string; to: string; constraint: string }[]Directed edges representing dependency relationships
stats{ totalDependencies: integer; directDependencies: integer; maxDepth: integer }Summary statistics for the dependency graph

Nested Shape: DependencyGraph.root

PropertyTypeRequiredDescription
idstringIdentifier of the root package
versionstringVersion of the root package

Nested Shape: DependencyGraph.nodes[number]

A node in the dependency graph representing a resolved package

PropertyTypeRequiredDescription
idstringUnique identifier of the package
versionstringResolved version of the package
dependencies{ name: string; versionConstraint: string; type: Enum<'required' | 'optional' | 'peer' | 'dev'>; resolvedVersion?: string }[]optional (default: [])Dependencies required by this package
depthintegerDepth level in the dependency tree (0 = root)
isDirectbooleanWhether this is a direct (top-level) dependency
metadata{ name: string; description?: string; license?: string; homepage?: string }optionalAdditional metadata about the package

Nested Shape: DependencyGraph.edges[number]

PropertyTypeRequiredDescription
fromstringPackage ID
tostringPackage ID
constraintstringVersion constraint

Nested Shape: DependencyGraph.stats

PropertyTypeRequiredDescription
totalDependenciesintegerTotal number of resolved dependencies
directDependenciesintegerNumber of direct (top-level) dependencies
maxDepthintegerMaximum depth of the dependency tree

DependencyGraphNode

A node in the dependency graph representing a resolved package

Properties

PropertyTypeRequiredDescription
idstringUnique identifier of the package
versionstringResolved version of the package
dependencies{ name: string; versionConstraint: string; type: Enum<'required' | 'optional' | 'peer' | 'dev'>; resolvedVersion?: string }[]optional (default: [])Dependencies required by this package
depthintegerDepth level in the dependency tree (0 = root)
isDirectbooleanWhether this is a direct (top-level) dependency
metadata{ name: string; description?: string; license?: string; homepage?: string }optionalAdditional metadata about the package

Nested Shape: DependencyGraphNode.dependencies[number]

A resolver-side package dependency: version constraint plus its resolution outcome

PropertyTypeRequiredDescription
namestringPackage name or identifier
versionConstraintstringSemver range (e.g., ^1.0.0, >=2.0.0 <3.0.0)
typeEnum<'required' | 'optional' | 'peer' | 'dev'>optional (default: "required")Category of the dependency relationship
resolvedVersionstringoptionalConcrete version resolved during dependency resolution

Nested Shape: DependencyGraphNode.metadata

PropertyTypeRequiredDescription
namestringDisplay name of the package
descriptionstringoptionalShort description of the package
licensestringoptionalSPDX license identifier of the package
homepagestringoptionalHomepage URL of the package

PackageDependencyConflict

A detected conflict between dependency version requirements

Properties

PropertyTypeRequiredDescription
packagestringName of the package with conflicting version requirements
conflicts{ version: string; requestedBy: string[]; constraint: string }[]List of conflicting version requirements
resolution{ strategy: Enum<'pick-highest' | 'pick-lowest' | 'manual'>; version?: string; reason?: string }optionalSuggested resolution for the conflict
severityEnum<'error' | 'warning' | 'info'>Severity level of the dependency conflict

Nested Shape: PackageDependencyConflict.conflicts[number]

PropertyTypeRequiredDescription
versionstringConflicting version of the package
requestedBystring[]Packages that require this version
constraintstringSemver constraint that produced this version requirement

Nested Shape: PackageDependencyConflict.resolution

PropertyTypeRequiredDescription
strategyEnum<'pick-highest' | 'pick-lowest' | 'manual'>Strategy used to resolve the conflict
versionstringoptionalResolved version selected by the strategy
reasonstringoptionalExplanation of why this resolution was chosen

PackageDependencyResolutionResult

Result of a dependency resolution process

Properties

PropertyTypeRequiredDescription
statusEnum<'success' | 'conflict' | 'error'>Overall status of the dependency resolution
graph{ root: object; nodes: object[]; edges: object[]; stats: object }optionalResolved dependency graph if resolution succeeded
conflicts{ package: string; conflicts: object[]; resolution?: object; severity: Enum<'error' | 'warning' | 'info'> }[]optional (default: [])List of dependency conflicts detected during resolution
errors{ package: string; error: string }[]optional (default: [])Errors encountered during dependency resolution
installOrderstring[]optional (default: [])Topologically sorted list of package IDs for installation
resolvedInMsintegeroptionalTime taken to resolve dependencies in milliseconds
resolvedInneveroptional[REMOVED] PackageDependencyResolutionResult.resolvedIn was renamed to resolvedInMs in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose. Rename the key to resolvedInMs; the value (milliseconds) is unchanged.

Nested Shape: PackageDependencyResolutionResult.graph

PropertyTypeRequiredDescription
root{ id: string; version: string }Root package of the dependency graph
nodes{ id: string; version: string; dependencies: object[]; depth: integer; … }[]All resolved package nodes in the dependency graph
edges{ from: string; to: string; constraint: string }[]Directed edges representing dependency relationships
stats{ totalDependencies: integer; directDependencies: integer; maxDepth: integer }Summary statistics for the dependency graph

Nested Shape: PackageDependencyResolutionResult.conflicts[number]

A detected conflict between dependency version requirements

PropertyTypeRequiredDescription
packagestringName of the package with conflicting version requirements
conflicts{ version: string; requestedBy: string[]; constraint: string }[]List of conflicting version requirements
resolution{ strategy: Enum<'pick-highest' | 'pick-lowest' | 'manual'>; version?: string; reason?: string }optionalSuggested resolution for the conflict
severityEnum<'error' | 'warning' | 'info'>Severity level of the dependency conflict

Nested Shape: PackageDependencyResolutionResult.errors[number]

PropertyTypeRequiredDescription
packagestringName of the package that caused the error
errorstringError message describing what went wrong

PluginProvenance

Verifiable provenance and chain of custody for a plugin artifact

Properties

PropertyTypeRequiredDescription
pluginIdstringUnique identifier of the plugin
versionstringVersion of the plugin artifact
build{ timestamp: string; environment?: object; source?: object; builder?: object }Build provenance information
artifacts{ filename: string; sha256: string; size: integer }[]List of build artifacts with integrity hashes
signatures{ algorithm: Enum<'rsa' | 'ecdsa' | 'ed25519'>; publicKey: string; signature: string; signedBy: string; … }[]optional (default: [])Cryptographic signatures for the plugin artifact
attestations{ type: Enum<'code-review' | 'security-scan' | 'test-results' | 'ci-build'>; status: Enum<'passed' | 'failed'>; url?: string; timestamp: string }[]optional (default: [])Verification attestations for the plugin

Nested Shape: PluginProvenance.build

PropertyTypeRequiredDescription
timestampstringISO 8601 timestamp when the build was produced
environment{ os: string; arch: string; nodeVersion: string }optionalEnvironment details where the build was executed
source{ repository: string; commit: string; branch?: string; tag?: string }optionalSource repository information for the build
builder{ name: string; email?: string }optionalIdentity of the builder who produced the artifact

Nested Shape: PluginProvenance.artifacts[number]

PropertyTypeRequiredDescription
filenamestringName of the artifact file
sha256stringSHA-256 hash of the artifact
sizeintegerSize of the artifact in bytes

Nested Shape: PluginProvenance.signatures[number]

PropertyTypeRequiredDescription
algorithmEnum<'rsa' | 'ecdsa' | 'ed25519'>Cryptographic algorithm used for signing
publicKeystringPublic key used to verify the signature
signaturestringDigital signature value
signedBystringIdentity of the signer
timestampstringISO 8601 timestamp when the signature was created

Nested Shape: PluginProvenance.attestations[number]

PropertyTypeRequiredDescription
typeEnum<'code-review' | 'security-scan' | 'test-results' | 'ci-build'>Type of attestation
statusEnum<'passed' | 'failed'>Result status of the attestation
urlstringoptionalURL with details about the attestation
timestampstringISO 8601 timestamp when the attestation was issued

PluginTrustScore

Trust score and verification status for a plugin

Properties

PropertyTypeRequiredDescription
pluginIdstringUnique identifier of the plugin
scorenumberOverall trust score from 0 to 100
components{ vendorReputation: number; securityScore: number; codeQuality: number; communityScore: number; … }Individual score components contributing to the overall trust score
levelEnum<'verified' | 'trusted' | 'neutral' | 'untrusted' | 'blocked'>Computed trust level based on the overall score
badgesEnum<'official' | 'verified-vendor' | 'security-scanned' | 'code-signed' | 'open-source' | 'popular'>[]optional (default: [])Verification badges earned by the plugin
updatedAtstringISO 8601 timestamp when the trust score was last updated

Nested Shape: PluginTrustScore.components

PropertyTypeRequiredDescription
vendorReputationnumberVendor reputation score from 0 to 100
securityScorenumberSecurity scan results score from 0 to 100
codeQualitynumberCode quality score from 0 to 100
communityScorenumberCommunity engagement score from 0 to 100
maintenanceScorenumberMaintenance and update frequency score from 0 to 100

ResolvedPackageDependency

A resolver-side package dependency: version constraint plus its resolution outcome

Properties

PropertyTypeRequiredDescription
namestringPackage name or identifier
versionConstraintstringSemver range (e.g., ^1.0.0, >=2.0.0 <3.0.0)
typeEnum<'required' | 'optional' | 'peer' | 'dev'>optional (default: "required")Category of the dependency relationship
resolvedVersionstringoptionalConcrete version resolved during dependency resolution

SBOM

Software Bill of Materials for a plugin

Properties

PropertyTypeRequiredDescription
formatEnum<'spdx' | 'cyclonedx'>optional (default: "cyclonedx")SBOM standard format used
versionstringVersion of the SBOM specification
plugin{ id: string; version: string; name: string }Metadata about the plugin this SBOM describes
components{ name: string; version: string; purl?: string; license?: string; … }[]List of software components included in the plugin
generatedAtstringISO 8601 timestamp when the SBOM was generated
generator{ name: string; version: string }optionalTool used to generate this SBOM

Nested Shape: SBOM.plugin

PropertyTypeRequiredDescription
idstringPlugin identifier
versionstringPlugin version
namestringHuman-readable plugin name

Nested Shape: SBOM.components[number]

A single entry in a Software Bill of Materials

PropertyTypeRequiredDescription
namestringName of the software component
versionstringVersion of the software component
purlstringoptionalPackage URL identifier
licensestringoptionalSPDX license identifier of the component
hashes{ sha256?: string; sha512?: string }optionalCryptographic hashes for integrity verification
supplier{ name: string; url?: string }optionalSupplier information for the component
externalRefs{ type: Enum<'website' | 'repository' | 'documentation' | 'issue-tracker'>; url: string }[]optional (default: [])External references related to the component

Nested Shape: SBOM.generator

PropertyTypeRequiredDescription
namestringName of the SBOM generator tool
versionstringVersion of the SBOM generator tool

SBOMEntry

A single entry in a Software Bill of Materials

Properties

PropertyTypeRequiredDescription
namestringName of the software component
versionstringVersion of the software component
purlstringoptionalPackage URL identifier
licensestringoptionalSPDX license identifier of the component
hashes{ sha256?: string; sha512?: string }optionalCryptographic hashes for integrity verification
supplier{ name: string; url?: string }optionalSupplier information for the component
externalRefs{ type: Enum<'website' | 'repository' | 'documentation' | 'issue-tracker'>; url: string }[]optional (default: [])External references related to the component

Nested Shape: SBOMEntry.hashes

PropertyTypeRequiredDescription
sha256stringoptionalSHA-256 hash of the component artifact
sha512stringoptionalSHA-512 hash of the component artifact

Nested Shape: SBOMEntry.supplier

PropertyTypeRequiredDescription
namestringName of the component supplier
urlstringoptionalURL of the component supplier

Nested Shape: SBOMEntry.externalRefs[number]

PropertyTypeRequiredDescription
typeEnum<'website' | 'repository' | 'documentation' | 'issue-tracker'>Type of external reference
urlstringURL of the external reference

SecurityPolicy

Security policy governing plugin scanning and enforcement

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for the security policy
namestringHuman-readable name of the security policy
autoScan{ enabled: boolean; frequency: Enum<'on-publish' | 'daily' | 'weekly' | 'monthly'> }Automatic security scanning configuration
thresholds{ maxCritical: integer; maxHigh: integer; maxMedium: integer }Vulnerability count thresholds for policy enforcement
allowedLicensesstring[]optional (default: ["MIT","Apache-2.0","BSD-3-Clause","BSD-2-Clause","ISC"])List of SPDX license identifiers that are permitted
prohibitedLicensesstring[]optional (default: ["GPL-3.0","AGPL-3.0"])List of SPDX license identifiers that are prohibited
codeSigning{ required: boolean; allowedSigners: string[] }optionalCode signing requirements for plugin artifacts
sandbox{ networkAccess: Enum<'none' | 'localhost' | 'allowlist' | 'all'>; allowedDestinations: string[]; filesystemAccess: Enum<'none' | 'read-only' | 'temp-only' | 'full'>; maxMemoryMB?: integer; … }optionalSandbox restrictions for plugin execution

Nested Shape: SecurityPolicy.autoScan

PropertyTypeRequiredDescription
enabledbooleanoptional (default: true)Whether automatic scanning is enabled
frequencyEnum<'on-publish' | 'daily' | 'weekly' | 'monthly'>optional (default: "daily")How often automatic scans are performed

Nested Shape: SecurityPolicy.thresholds

PropertyTypeRequiredDescription
maxCriticalintegeroptional (default: 0)Maximum allowed critical vulnerabilities before blocking
maxHighintegeroptional (default: 0)Maximum allowed high vulnerabilities before blocking
maxMediumintegeroptional (default: 5)Maximum allowed medium vulnerabilities before warning

Nested Shape: SecurityPolicy.codeSigning

PropertyTypeRequiredDescription
requiredbooleanoptional (default: false)Whether code signing is required for plugins
allowedSignersstring[]optional (default: [])List of trusted signer identities

Nested Shape: SecurityPolicy.sandbox

PropertyTypeRequiredDescription
networkAccessEnum<'none' | 'localhost' | 'allowlist' | 'all'>optional (default: "all")Level of network access granted to the plugin
allowedDestinationsstring[]optional (default: [])Permitted network destinations when using allowlist mode
filesystemAccessEnum<'none' | 'read-only' | 'temp-only' | 'full'>optional (default: "full")Level of file system access granted to the plugin
maxMemoryMBintegeroptionalMaximum memory allocation in megabytes
maxCPUSecondsintegeroptionalMaximum CPU time allowed in seconds

SecurityScanResult

Result of a security scan performed on a plugin

Properties

PropertyTypeRequiredDescription
scanIdstringUnique identifier for this security scan
plugin{ id: string; version: string }Plugin that was scanned
scannedAtstringISO 8601 timestamp when the scan was performed
scanner{ name: string; version: string }Information about the scanner tool used
statusEnum<'passed' | 'failed' | 'warning'>Overall result status of the security scan
vulnerabilities{ cve?: string; id: string; title: string; description: string; … }[]List of vulnerabilities discovered during the scan
summary{ critical: integer; high: integer; medium: integer; low: integer; … }Summary counts of vulnerabilities by severity
licenseIssues{ package: string; license: string; reason: string; severity: Enum<'error' | 'warning' | 'info'> }[]optional (default: [])License compliance issues found during the scan
codeQuality{ score?: number; issues: object[] }optionalCode quality analysis results
nextScanAtstringoptionalISO 8601 timestamp for the next scheduled scan

Nested Shape: SecurityScanResult.plugin

PropertyTypeRequiredDescription
idstringPlugin identifier
versionstringPlugin version that was scanned

Nested Shape: SecurityScanResult.scanner

PropertyTypeRequiredDescription
namestringScanner name (e.g., snyk, osv, trivy)
versionstringVersion of the scanner tool

Nested Shape: SecurityScanResult.vulnerabilities[number]

A known security vulnerability in a package dependency

PropertyTypeRequiredDescription
cvestringoptionalCVE identifier
idstringVulnerability ID
titlestringShort title summarizing the vulnerability
descriptionstringDetailed description of the vulnerability
severityEnum<'critical' | 'high' | 'medium' | 'low' | 'info'>Severity level of this vulnerability
cvssnumberoptionalCVSS score ranging from 0 to 10
package{ name: string; version: string; ecosystem?: string }Affected package information
vulnerableVersionsstringSemver range of vulnerable versions
patchedVersionsstringoptionalSemver range of patched versions
references{ type: Enum<'advisory' | 'article' | 'report' | 'web'>; url: string }[]optional (default: [])External references related to the vulnerability
cwestring[]optional (default: [])CWE identifiers associated with this vulnerability
publishedAtstringoptionalISO 8601 date when the vulnerability was published
mitigationstringoptionalRecommended steps to mitigate the vulnerability

Nested Shape: SecurityScanResult.summary

PropertyTypeRequiredDescription
criticalintegeroptional (default: 0)Count of critical severity vulnerabilities
highintegeroptional (default: 0)Count of high severity vulnerabilities
mediumintegeroptional (default: 0)Count of medium severity vulnerabilities
lowintegeroptional (default: 0)Count of low severity vulnerabilities
infointegeroptional (default: 0)Count of informational severity vulnerabilities
totalintegeroptional (default: 0)Total count of all vulnerabilities

Nested Shape: SecurityScanResult.licenseIssues[number]

PropertyTypeRequiredDescription
packagestringName of the package with a license issue
licensestringLicense identifier of the package
reasonstringReason the license is flagged
severityEnum<'error' | 'warning' | 'info'>Severity of the license compliance issue

Nested Shape: SecurityScanResult.codeQuality

PropertyTypeRequiredDescription
scorenumberoptionalOverall code quality score from 0 to 100
issues{ type: Enum<'security' | 'quality' | 'style'>; severity: Enum<'error' | 'warning' | 'info'>; message: string; file?: string; … }[]optional (default: [])List of individual code quality issues

SecurityVulnerability

A known security vulnerability in a package dependency

Properties

PropertyTypeRequiredDescription
cvestringoptionalCVE identifier
idstringVulnerability ID
titlestringShort title summarizing the vulnerability
descriptionstringDetailed description of the vulnerability
severityEnum<'critical' | 'high' | 'medium' | 'low' | 'info'>Severity level of this vulnerability
cvssnumberoptionalCVSS score ranging from 0 to 10
package{ name: string; version: string; ecosystem?: string }Affected package information
vulnerableVersionsstringSemver range of vulnerable versions
patchedVersionsstringoptionalSemver range of patched versions
references{ type: Enum<'advisory' | 'article' | 'report' | 'web'>; url: string }[]optional (default: [])External references related to the vulnerability
cwestring[]optional (default: [])CWE identifiers associated with this vulnerability
publishedAtstringoptionalISO 8601 date when the vulnerability was published
mitigationstringoptionalRecommended steps to mitigate the vulnerability

Nested Shape: SecurityVulnerability.package

PropertyTypeRequiredDescription
namestringName of the affected package
versionstringVersion of the affected package
ecosystemstringoptionalPackage ecosystem (e.g., npm, pip, maven)

Nested Shape: SecurityVulnerability.references[number]

PropertyTypeRequiredDescription
typeEnum<'advisory' | 'article' | 'report' | 'web'>Type of reference source
urlstringURL of the reference

VulnerabilitySeverity

Severity level of a security vulnerability

Allowed Values

  • critical
  • high
  • medium
  • low
  • info

On this page

Plugin Security & Dependency Resolution ProtocolTypeScript UsageDependencyGraphPropertiesNested Shape: DependencyGraph.rootNested Shape: DependencyGraph.nodes[number]Nested Shape: DependencyGraph.edges[number]Nested Shape: DependencyGraph.statsDependencyGraphNodePropertiesNested Shape: DependencyGraphNode.dependencies[number]Nested Shape: DependencyGraphNode.metadataPackageDependencyConflictPropertiesNested Shape: PackageDependencyConflict.conflicts[number]Nested Shape: PackageDependencyConflict.resolutionPackageDependencyResolutionResultPropertiesNested Shape: PackageDependencyResolutionResult.graphNested Shape: PackageDependencyResolutionResult.conflicts[number]Nested Shape: PackageDependencyResolutionResult.errors[number]PluginProvenancePropertiesNested Shape: PluginProvenance.buildNested Shape: PluginProvenance.artifacts[number]Nested Shape: PluginProvenance.signatures[number]Nested Shape: PluginProvenance.attestations[number]PluginTrustScorePropertiesNested Shape: PluginTrustScore.componentsResolvedPackageDependencyPropertiesSBOMPropertiesNested Shape: SBOM.pluginNested Shape: SBOM.components[number]Nested Shape: SBOM.generatorSBOMEntryPropertiesNested Shape: SBOMEntry.hashesNested Shape: SBOMEntry.supplierNested Shape: SBOMEntry.externalRefs[number]SecurityPolicyPropertiesNested Shape: SecurityPolicy.autoScanNested Shape: SecurityPolicy.thresholdsNested Shape: SecurityPolicy.codeSigningNested Shape: SecurityPolicy.sandboxSecurityScanResultPropertiesNested Shape: SecurityScanResult.pluginNested Shape: SecurityScanResult.scannerNested Shape: SecurityScanResult.vulnerabilities[number]Nested Shape: SecurityScanResult.summaryNested Shape: SecurityScanResult.licenseIssues[number]Nested Shape: SecurityScanResult.codeQualitySecurityVulnerabilityPropertiesNested Shape: SecurityVulnerability.packageNested Shape: SecurityVulnerability.references[number]VulnerabilitySeverityAllowed Values