publish-safe
v0.1.2
Published
Migration & verification tool for secure npm publishing
Maintainers
Readme
publish-safe
CLI tool to help npm maintainers audit and migrate to trusted publishing safely.
English
Installation
npx publish-safeCommands
audit - Check current publish configuration
npx publish-safe auditfix - Generate patches to migrate to trusted publishing
npx publish-safe fixCreates 2 files in .publish-safe/:
publish-workflow.yml- New GitHub Actions workflowmigration-checklist.md- Migration checklist
verify - Verify setup is correct
npx publish-safe verifydoctor - Explain security concepts
npx publish-safe doctorinit-ci - Create GitHub Actions workflow for continuous auditing
npx publish-safe init-ciCreates .github/workflows/publish-safe-audit.yml for automated security checks.
JSON Output
All commands support JSON output:
npx publish-safe audit --json
npx publish-safe verify --jsonUse Cases
- Solo maintainer: Audit and fix 1 repo in 5 minutes
- Agency: Audit all client repos before handover
- Open source maintainer: Enable provenance for packages
Resources
Tiếng Việt
CLI tool giúp npm maintainers audit và migrate sang trusted publishing một cách an toàn.
Cài đặt
npx publish-safeCác lệnh chính
audit - Kiểm tra cấu hình publish hiện tại
npx publish-safe auditfix - Tạo patch để migrate sang trusted publishing
npx publish-safe fixTạo ra 2 file trong .publish-safe/:
publish-workflow.yml- GitHub Actions workflow mớimigration-checklist.md- Checklist để migrate
verify - Kiểm tra setup đã đúng chưa
npx publish-safe verifydoctor - Giải thích khái niệm bảo mật
npx publish-safe doctorinit-ci - Tạo GitHub Actions workflow để audit liên tục
npx publish-safe init-ciTạo ra .github/workflows/publish-safe-audit.yml để kiểm tra bảo mật tự động.
JSON Output
Tất cả commands hỗ trợ JSON output:
npx publish-safe audit --json
npx publish-safe verify --jsonUse cases
- Solo maintainer: Audit và fix 1 repo trong 5 phút
- Agency: Audit tất cả client repos trước khi handover
- Open source maintainer: Enable provenance cho package
