Skip to content

[MNG] Warn or fail when an external-model profile repository shadows central #13146

Description

@gnodet

Problem

When a dependency POM contributes a repository through a JDK/OS/activeByDefault-activated profile (the legitimate path, see #13100 / #13116 / #13141), that repository can declare a URL that shadows central or another well-known repository with a different (potentially malicious) URL.

Maven currently has no defense against this: the repository is accepted as-is and used for artifact resolution.

Proposed Solution

Implement a WARN (or optionally FAIL with a flag) policy that triggers when:

  • A repository contributed by an external-model profile has the same <id> as a repository already registered in the effective repository list (e.g. central), but a different URL.

This is a repository URL-mismatch check, scoped to the dependency resolution path.

Non-goals

Notes

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions