Documentation
¶
Overview ¶
Package lock reads and writes pin.lock as a CycloneDX 1.6 BOM.
The in-memory model (Lock, Asset) is flat — one Asset per vendored file. CycloneDX nesting (one library component per package, file components nested under each) is a serialisation detail handled by Read and Write.
Index ¶
Constants ¶
View Source
const MaxLockfileBytes = 16 << 20
MaxLockfileBytes is a DoS-prevention cap. A 1000-file monorepo lockfile stays under 1 MiB; 16 MiB is the comfortable upper bound.
View Source
const Version = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
type Asset struct {
Name string
Version string
PURL string
Type string
Format string
Path string
Out string
URL string
Integrity string
Size int64
PackageIntegrity string
License string
// Repository is the package's *declared* repository URL. NOT to
// be conflated with Attestation.SourceRepository (the repo the
// attestation says the build came from); the
// publisher-matches-repository check compares the two.
Repository string
Attestation *Attestation
}
type Attestation ¶
type Attestation struct {
PredicateType string
BuilderID string
SourceRepository string
SourceRevision string
SignerIdentity string
BundleURL string
}
Attestation holds SLSA Provenance v1 identity fields. Cryptographic verification of the underlying bundle is gated separately on --verify-provenance.
Click to show internal directories.
Click to hide internal directories.