-
Notifications
You must be signed in to change notification settings - Fork 185
Content integrity hashing in lockfile (SHA-256) #315
Copy link
Copy link
Closed
Labels
enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.securityDeprecated: use theme/security. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use theme/security. Kept for issue history; will be removed in milestone 0.10.0.
Metadata
Metadata
Assignees
Labels
enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.securityDeprecated: use theme/security. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use theme/security. Kept for issue history; will be removed in milestone 0.10.0.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Add content integrity verification by storing SHA-256 checksums of downloaded package content in
apm.lock.yaml. Verify checksums on subsequent installs to detect tampering or MITM modifications.Background
Identified during the security assessment for #313 (content security scanner). APM currently stores
resolved_commit(git SHA) in the lockfile but does not verify that the downloaded file content matches any expected hash. A network-level attacker, compromised proxy, or force-pushed commit could serve different content for the same SHA.For comparison, npm stores
integrityhashes (SHA-512) inpackage-lock.jsonand verifies every download against them.Proposed behavior
apm install, after downloading a package, compute SHA-256 of the package's file tree (deterministic hash of all file contents)apm.lock.yamlalongsideresolved_commit:Considerations
content_hash(older lockfiles) should not block installPriority
P0 — highest impact security improvement available per the security panel assessment.
Related
apm auditcommand #313 — Content security scanner (PR)