Adding a custom repository to the main project is the only way to make Composer aware of the new source.
And this is intentionally done in this way, because otherwise repos can add repos, can add repos ... without guaranteeing to have a finite list of repositories.
In addition, adding a repo does not make any statements about what software will be found there, Composer will check every tag and branch. Theoretically, the repository may have a different branch for a completely different, well-known package, offering a newer version and adding some malicious actions.
The composer as a whole, apparently, is very suitable for protection against remote code execution, except that a person who does not know a person makes bad decisions.
So, if you find a bug in a package published on packagist.org, the best way for everyone is to offer a transfer request. The second best way is to fork the project under a new name and publish it on packagist.org. Fixing a problem using a forked repo with the same project name and pointing to Composer is the worst solution and is usually only possible for the dependencies of your own projects.
source share