Skip to content

Refactor into production-ready CLI service#1

Merged
VectoDE merged 1 commit intomainfrom
codex/initialize-production-ready-enterprise-project
Oct 21, 2025
Merged

Refactor into production-ready CLI service#1
VectoDE merged 1 commit intomainfrom
codex/initialize-production-ready-enterprise-project

Conversation

@VectoDE
Copy link
Owner

@VectoDE VectoDE commented Oct 21, 2025

Summary

  • replace the ad-hoc main program with a modular CLI entry point that wires configuration, logging, password policy, generator, and HIBP client dependencies
  • introduce structured configuration loading, password policy evaluation, secure password generator, and breach-checking service layers with unit tests
  • rebuild the command-line experience with sub-commands, interactive mode, and documentation updates for enterprise-ready workflows

Testing

  • go test ./...

https://chatgpt.com/codex/tasks/task_e_68f70db813ac832cad6c7e340102825b

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +71 to +73
if resp.StatusCode == http.StatusNotFound {
return false, nil
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fail fast on 404 responses from breach API

The pwned-password client treats an HTTP 404 from the HIBP endpoint as “not breached” and returns false without error. The range API does not return 404 for safe passwords—404 is far more likely when the base URL is wrong or the service is unavailable. With the current logic, any misconfiguration or upstream routing issue silently produces a false negative, which undermines the whole breach check. Consider returning an error for 404 (similar to other non-200 codes) so callers can surface the failure instead of reporting a clean password.

Useful? React with 👍 / 👎.

@VectoDE VectoDE merged commit 8ab1d1a into main Oct 21, 2025
@VectoDE VectoDE deleted the codex/initialize-production-ready-enterprise-project branch October 21, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant