Repository navigation
Conversation
There was a problem hiding this comment.
4 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/generator-cli/src/README.md">
<violation number="1" location="apps/generator-cli/src/README.md:197">
P2: Malformed Markdown code fence: the closing ``` is on the same line as the JSON brace (`}```), so the fenced block is not properly terminated and subsequent README content can render as code.</violation>
</file>
<file name="apps/generator-cli/src/config.schema.json">
<violation number="1" location="apps/generator-cli/src/config.schema.json:35">
P2: New repository auth fields are added under a schema object that lacks "type"/"properties", so JSON Schema draft-07 will ignore these keys and not validate or document repository.username/password at all.</violation>
</file>
<file name="apps/generator-cli/src/app/services/version-manager.service.ts">
<violation number="1" location="apps/generator-cli/src/app/services/version-manager.service.ts:71">
P2: Repository credentials are now sent with version query requests even when the query URL points to a different host than the download URL, which can leak private repo credentials to the default public search endpoint.</violation>
<violation number="2" location="apps/generator-cli/src/app/services/version-manager.service.ts:169">
P2: `new URL(downloadLink)` is executed before the `try/catch`, so an invalid custom `downloadUrl` now throws synchronously and bypasses the error handling that logs and returns `false`. This is a regression for user-configured download URLs.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| ); | ||
|
|
||
| return this.httpService.get(queryUrl).pipe( | ||
| return this.httpService.get(queryUrl, this.getAuthConfig()).pipe( |
There was a problem hiding this comment.
P2: Repository credentials are now sent with version query requests even when the query URL points to a different host than the download URL, which can leak private repo credentials to the default public search endpoint.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/generator-cli/src/app/services/version-manager.service.ts, line 71:
<comment>Repository credentials are now sent with version query requests even when the query URL points to a different host than the download URL, which can leak private repo credentials to the default public search endpoint.</comment>
<file context>
@@ -68,7 +68,7 @@ export class VersionManagerService {
);
- return this.httpService.get(queryUrl).pipe(
+ return this.httpService.get(queryUrl, this.getAuthConfig()).pipe(
map(({ data }) => data.response.docs),
map((docs) =>
</file context>
There was a problem hiding this comment.
Maybe add download and query as objects with url, username and password.
But still support just a URL as it is now.
|
fixes #660 |
Removed 'repository' properties from the schema.
|
@haakonph @kay-schecker why wasnt this change merged in the main branch? this feature is still missing from the current released version (2.34.0) |
Summary by cubic
Add basic auth support for private Maven repositories in the
generator-cli. When both username and password are set, version lookups and downloads use HTTP Basic Auth, with clearer download logging.New Features
generator-cli.repository.usernameandgenerator-cli.repository.password(supports${env.VAR_NAME}).authonly when both values are provided for query and download requests.Refactors
config.schema.jsonby inliningrepositoryfields (removedpropertieswrapper).Written for commit 4c95e65. Summary will update on new commits.