fix: improve validation guidance and generated password guarantees - #9
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #8.
Improves CLI validation guidance, generated secret coverage guarantees, typo/missing-value recovery, ambiguous preset handling, security documentation, human-readable
--infodiagnostics, and built-in--helpdiscovery. This PR improves the existing branch for issue #8 instead of opening a duplicate.This cycle extends the same PR with an explicit CLI validation contract, a CLI safety review checklist, and static regression guards wired into
npm test, so future edits cannot accidentally remove the most important issue #8 safety boundaries from the implementation or documentation.Changes
--mode streng.--no-symbols,--no-upper,--no-lower, and--no-numbers.--no-symblsuggests--no-symbolsand fails before generating output.--length,-l, and--mode.--modevalues, so commands likepassgen ULTRAandpassgen --mode " strong "behave predictably.passgen strong extraand mixed forms likepassgen --mode strong ultra.--infooutput by showing selectedMode, active character sets, minimum coverage length, required represented sets, and explicit coverage status while keeping generated passwords on stdout.--helpepilogue with usage examples, safe defaults, recommended presets, stdout/stderr behavior, and secret-handling reminders.--infodiagnostics, and--helpsafety guidance.docs/CLI_VALIDATION_CONTRACT.mdto define output separation, length validation, character-set validation, preset validation, option validation, security guidance, and regression expectations.docs/CLI_REVIEW_CHECKLIST.mdto turn the issue Fix/Improve: Improve validation, security notes, and CLI output #8 safety requirements into a concrete pre-merge review gate.test-validation-contract.jsandtest-cli-review-checklist.js, both wired intonpm test, to guard implementation and documentation drift.SECURITY.mdand includes the validation/review docs in the npm packagefilesallowlist.Issue review and prioritization
Open issues reviewed in
asimawdah/passgen:Validation
a678c39b8b9ae5b6ed120e7bbd57cabf9d943127.mainat52714bba413177134d83c0d9108105691ff14136.main.CIrun28587249819completed successfully.Notes for review
--info, CLI help/output clarity, review checklist coverage, and regression guards for those contracts.