Skip to content

Help catch internal-crate squatting attacks when adding a dependency #10656

@epage

Description

@epage

Problem

Say a company has an internal registry and with an internal crate company-utils. If an attacker knows this and creates a malicious crate in crates.io with that name, people will pick it up when running cargo add and forgetting the --registry flag

Proposed Solution

Warn the user when a new registry dependency is added without --registry and the dependency name exists in one of the configured registries.Se

Notes

See also killercup/cargo-edit#451

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-addS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions