Skip to content

harbor label create allows invalid project-scoped labels #640

@Sypher845

Description

@Sypher845

Description

When creating a label with scope "p" (project-specific), the command allows creating invalid labels in two scenarios:

Issue 1: Missing project ID

Using --scope p without --project flag creates an orphan label with no project association.

Image

Issue 2: Non-existent project

Using --scope p --project <id> with a non-existent project ID creates a label linked to nothing.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: MediumAffecting a limited number of users,degrading the customer experience.bugSomething isn't workinggoPull requests that update go code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions