-
Notifications
You must be signed in to change notification settings - Fork 0
Security
LPM is designed with security as a priority. This guide covers security features and best practices.
All packages are verified using BLAKE3 checksums stored in lpm.lock:
packages:
luasocket:
version: "3.0.0"
checksum: "blake3:abc123..."BLAKE3 provides faster hashing with cryptographic security guarantees, making package verification both secure and performant.
Verify checksums:
lpm verifyLPM does not execute arbitrary code during installation. Packages are installed as-is, with no script execution.
Rust extensions are built in sandboxed environments with restricted access to:
- File system
- Network
- System resources
LPM stores LuaRocks credentials using OS keychains:
- macOS: Keychain
- Windows: Credential Manager
- Linux: Secret Service (libsecret)
lpm login # Credentials stored securelyRun security audits on your dependencies:
lpm auditChecks for known vulnerabilities using:
- OSV (Open Source Vulnerabilities) - Primary source
- GitHub Security Advisories - Secondary source
✓ No vulnerabilities found
or
⚠ Found 2 vulnerabilities:
1. luasocket@3.0.0
Severity: HIGH
CVE-2024-XXXXX: Buffer overflow in socket.connect
Fixed in: 3.0.1
Update: lpm update luasocket
2. penlight@1.12.0
Severity: MEDIUM
GHSA-XXXX: Path traversal vulnerability
Fixed in: 1.13.0
Update: lpm update penlight
Always commit lpm.lock to version control:
git add lpm.lock
git commit -m "Add lockfile"This ensures:
- Reproducible builds
- Checksum verification
- Exact version pinning
Keep dependencies updated:
# Check for updates
lpm outdated
# Update all dependencies
lpm update
# Run audit after updates
lpm auditUse specific version constraints:
# Good: Specific version
dependencies:
luasocket: "3.0.0"
# Better: Compatible version with upper bound
dependencies:
luasocket: "^3.0.0" # >=3.0.0 <4.0.0
# Avoid: Wildcard
dependencies:
luasocket: "*" # Too permissiveAlways verify packages before deployment:
lpm verify
lpm auditRegularly review your dependencies:
lpm list --treeRemove unused dependencies:
lpm remove unused-packageSeparate development tools from production dependencies:
dev_dependencies:
busted: "^2.0.0" # Test framework
luacheck: "^1.0.0" # LinterInstall production dependencies only:
lpm install --no-dev-
lpm.lockis committed to version control - Regular security audits (
lpm audit) - Dependencies are kept up to date
- Version constraints are specific (not wildcards)
- Dev dependencies are separated
- Checksums are verified (
lpm verify) - Unused dependencies are removed
- Pre-built binaries are verified (if used)
If you discover a vulnerability in LPM:
- Do not open a public issue
- Email security@yourusername.github.io (or your security contact)
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)