Install Trusted Unsigned Plugins Automatically
When you install a plugin with the sf plugins
install command, Salesforce CLI first verifies its digital signature. If the plugin
provides a valid signature, the CLI installs it. Otherwise, Salesforce CLI doesn't install it
until you answer a warning prompt and acknowledge that you understand the risks. This process
works well when you install a plugin interactively at the command line, but can prevent a batch
job from completing. To automatically install a plugin without prompting, even when unsigned,
create an allowlist file on your local file system and add the plugins you trust.
-
Create a file called unsignedPluginAllowList.json and put it in one of
these directories:
- (Linux and macOS): $HOME/.config/sf
- (Windows) Depending on your Windows configuration, either C:\Users\username\.config\sf or %LOCALAPPDATA%\sf
-
Add the names of the plugins you trust to the JSON file in a simple array of strings.
For example:
[ "sfdx-templates", "salesforce-cmdt", ... ]