
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
sfdx-destruction
Advanced tools
SFDX now contains destructive changes support. You no longer need to use this plugin.
Use the following arguments:
--predestructivechanges <filepath>
--postdestructivechanges <filepath>
Destructive changes support for sfdx force:source:deploy
via a predeploy hook.
At time of writing, the sfdx force:source:deploy
command doesn't support destructive changes files out of the box. Therefore if deletions are required, either source metadata needs to be converted for use with sfdx force:mdapi:deploy
or there'll need to be multiple deployments (with downtime, difficult rollbacks and multiple unit test cycles).
This simple plugin hooks into source deploy and drops destructiveChangesPre.xml
and/or destructiveChangesPost.xml
deletions manifests into the package before the deployment initiates.
$ sfdx plugins:install sfdx-destruction
$ SFDX_DESTRUCTION_ENABLE=true sfdx force:source:deploy
Destructive changes functionality is disabled by default and therefore must be enabled by environment variable or in the project configuration file.
If the SFDX_DESTRUCTION_ENABLE
environment variable is set, it will be used to determine whether to run the plugin (true or false and regardless of configuration file settings).
Else the plugins
-> sfdx-destruction
-> enabledByDefault
variable in the project configuration file will be used (if set).
If neither is configured, the plugin will remain disabled.
The locations of the pre and post destructive changes files can also be specified by environment variable and/or configuration file. Environment variables take precedence over the configuration file. If neither is present, the plugin will have no effect.
Recommended usage is to use the configuration file to store the locations of the destructive changes files and the environment variable to enable at build time.
SFDX_DESTRUCTION_ENABLE
- true or false to enable or disable the plugin
SFDX_DESTRUCTION_PRE_FILE
- path to the destructive changes pre file i.e. deletions that will occur before the deployment
SFDX_DESTRUCTION_POST_FILE
- path to the destructive changes post file i.e. deletions that will occur after the deployment
enabledByDefault
- true or false - will be used to determine whether the plugin should run if no environment variable is present (default: false - disabled)
preFile
- path to the destructive changes pre file i.e. deletions that will occur before the deployment
postFile
- path to the destructive changes post file i.e. deletions that will occur after the deployment
{
"packageDirectories": [
{
"default": true,
"path": "force-app"
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "50.0",
"plugins": {
"sfdx-destruction": {
"enabledByDefault": false,
"preFile": "{path-to-destructiveChangesPre.xml}",
"postFile": "{path-to-destructiveChangesPost.xml}"
}
}
}
No, unfortunately not.
This functionality is implemented as a hook and although it is possible to access argv, it doesn't seem to be possible to define additional arguments. Passing in an extra argument will return an error of Unexpected argument
.
FAQs
Destructive changes support for sfdx force:source:deploy
We found that sfdx-destruction demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.