Fixes https://github.com/twentyhq/core-team-issues/issues/1956 **Problem** Within an app, the `.yarn/releases/` folder contains executable Yarn binaries that run when executing any yarn command (`.yarnrc` file indicates yarn path to be `.yarn/releases/yarn-4.9.2.cjs `.) This is a supply chain attack vector: a malicious actor could submit a PR with a compromised `yarn-4.9.2.cjs binary`, which would execute arbitrary code on developers' machines or CI systems. **Fix** Actually, thanks to Corepack, we don't need to store and execute this binary. Corepack can be seen as the manager of a package manager: in `package.json` we indicate a packageManager version like `"packageManager": "yarn@4.9.2"`, and when executing `yarn` Corepack will securely fetch the verified version from npm, avoiding the risk of executing a compromised binary committed to the repository. This was already in our app's package.json template but we were not using it! We can now - remove the folder containing the binary from our app template base-application (that is scaffolded when creating an app through cli), `.yarn/releases/`, and remove `yarnPath: .yarn/releases/yarn-4.9.2.cjs` from its .yarnrc - remove them from the community apps that were already published in the repo - add .yarn to gitignore **Tested** This has been tested and works for app created in the repo, outside the repo, and existing apps in the repo
Mailchimp synchronizer
Synchronizing contacts between Twenty and Mailchimp
Requirements
- Mailchimp API key - Mailchimp > avatar in top right corner > Profile > Extras > API keys
Setup
- Add app to your workspace
cd packages/twenty-apps/community/mailchimp-synchronizer
yarn auth
yarn generate
yarn sync
- Go to Settings > Integrations > Mailchimp synchronizer > Settings and add required variables
Flow
- Check if required variables are set, if not, exit
- Validate data based on set constraints, if data doesn't match constraints, exit
- Check if person already exists in Mailchimp:
- if yes, check if UPDATE_PERSON is set to true
- if UPDATE_PERSON is true, check if Twenty record is the same as Mailchimp record
- if they're the same, exit
- if not, update
- if UPDATE_PERSON is false, exit
- if UPDATE_PERSON is true, check if Twenty record is the same as Mailchimp record
- if person doesn't exist in Mailchimp, send a request to Mailchimp with new contact
- if yes, check if UPDATE_PERSON is set to true
Note
- SMS support is experimental and may cause errors
- constraints are directly responsible for sent data so if e.g. you want to have a company name in Mailchimp, you have to set IS_COMPANY_CONSTRAINT to true