Every invocation may automatically download and execute an unpinned npm package
Source references: 2The instructions mandate `npx -y firebase-tools@latest`. `@latest` does not pin a reviewed version, while `-y` accepts installation automatically; even a version check can therefore download and execute newly published code. When run after login, that code is also in an environment with access to Firebase credentials.
If the upstream package, publishing account, or dependency chain is compromised, code could read local files or session credentials and execute with the user's privileges. The supplied evidence does not show that such a compromise has occurred.
The source supports the risk: it mandates an unpinned `@latest` package with `-y`, while the login step establishes a Firebase identity in the same environment. Later CLI runs may therefore access local login state and authorized projects. There is no evidence that credentials were misused; the risk arises if the commands are run. Users can pin a version and use a low-privilege account or isolated environment.
1. **Use npx for CLI commands:** To ensure you always use the latest version of the Firebase CLI, always prepend commands with `npx -y firebase-tools@latest` instead of just `firebase`. For example, use `npx -y firebase-tools@latest --version`. NEVER suggest the naked `firebase` command as an alternative.1. **Prioritize official knowledge:** For any Firebase-related knowledge,Show 1 other places
1. **Authentication:** Ensure you are logged in to Firebase so that commands have the correct permissions. Run `npx -y firebase-tools@latest login`. For environments without a browser (e.g., remote shells), use `npx -y firebase-tools@latest login --no-localhost`. - The command should output the current user. - If you are not logged in, follow the interactive instructions from this command to authenticate.