Skip to content

feat(cli): make quickstart catalog repository configurable via --catalog-repo flag#6364

Open
sachin9058 wants to merge 3 commits intomindersec:mainfrom
sachin9058:feat/quickstart-configurable-repo
Open

feat(cli): make quickstart catalog repository configurable via --catalog-repo flag#6364
sachin9058 wants to merge 3 commits intomindersec:mainfrom
sachin9058:feat/quickstart-configurable-repo

Conversation

@sachin9058
Copy link
Copy Markdown
Contributor

Summary

Add a --catalog-repo flag to the quickstart command to allow users to specify a custom repository for loading rule and profile catalogs.

Previously, the catalog repository URL was hardcoded, limiting flexibility to the default Minder catalog. This change enables users to provide their own repository while preserving the existing default behavior.

If the flag is not provided, the quickstart flow continues to use the default Minder catalog repository.

Additionally, the help text has been improved to better describe the purpose and usage of the flag.

Testing

  • Ran:
    make lint-fix
    go test ./...
    
  • Verified CLI flag parsing by running:
    go run ./cmd/cli quickstart --catalog-repo
  • Confirmed default behavior remains unchanged when no flag is provided
  • Confirmed custom repository value is correctly read and passed into the catalog loading flow
  • Verified fallback logic remains intact when repository loading fails

@sachin9058 sachin9058 requested a review from a team as a code owner April 14, 2026 12:55
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 14, 2026

Coverage Status

coverage: 59.515% (-0.02%) from 59.539% — sachin9058:feat/quickstart-configurable-repo into mindersec:main

@evankanderson
Copy link
Copy Markdown
Member

@evankanderson This PR depends on the in-memory repository clone utility introduced in #6357.

The quickstart changes use the internal/repo package from that PR. Once it is merged, CI/build issues related to missing imports will be resolved.

The way to do this is to git rebase this branch onto that one.

Thinking about the amount of code and a desire to test it, we should probably put the clone and find directories code in internal/cli.

@sachin9058
Copy link
Copy Markdown
Contributor Author

sachin9058 commented Apr 14, 2026

@evankanderson

@evankanderson This PR depends on the in-memory repository clone utility introduced in #6357.
The quickstart changes use the internal/repo package from that PR. Once it is merged, CI/build issues related to missing imports will be resolved.

The way to do this is to git rebase this branch onto that one.

Thinking about the amount of code and a desire to test it, we should probably put the clone and find directories code in internal/cli.

Got it, that makes sense thanks!

I’ve moved away from depending on #6357 and implemented the clone logic inline for now so the PR is self-contained.

That said, I agree it would be better to structure this under internal/cli for clarity and testability. I’ll refactor the current implementation accordingly.

Let me update the PR with that approach 👍

Copy link
Copy Markdown
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

Rather than just converting the existing rule loading, we should probably do something more extensive where we load a profile, ruletypes, and supporting datasources from one of the README enabled directories in minder-rules-and-profiles?

That way, we can include the description of what the profile will do in the guided setup.

@sachin9058
Copy link
Copy Markdown
Contributor Author

@evankanderson That makes sense, I like that direction 👍

Right now I focused on keeping the existing quickstart behavior but sourcing the rule type and profile from the repo.

Extending this to support README-based directories with profiles, rule types, and datasources would definitely make the flow more flexible and user-friendly.

I can open a follow-up PR to explore that approach once this one is in, if that sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants