SendGrid
email.sendgrid
Protects against destructive SendGrid API operations like template deletion, API key deletion, and domain authentication removal.
- 8blocking rules
- 0safe patterns
- 3Critical
- 3High
- 2Medium
[packs]
enabled = ["email.sendgrid"]Evaluated when a command contains sendgrid, api.sendgrid.com.
Blocking rules
Each rule ID is email.sendgrid:<name>. Use it in allowlists and [policy.rules].
Criticalsendgrid-delete-api-keyDELETE to SendGrid /v3/api_keys removes an API key.
Explanation
Deleting an API key immediately revokes access. All applications using this key will fail to authenticate. You cannot recover the key value after deletion. Safer alternatives: - Create new API key before deleting old one - Update applications with new key first - Use API key scopes to limit damage
Criticalsendgrid-delete-subuserDELETE to SendGrid /v3/subusers removes a subuser account.
Explanation
Deleting a subuser removes all their data including templates, statistics, and API keys. Applications using subuser credentials will fail immediately. This cannot be undone. Safer alternatives: - Export subuser data and configurations - Migrate to new subuser before deleting - Disable subuser access instead of deleting
Criticalsendgrid-delete-whitelabel-domainDELETE to SendGrid /v3/whitelabel/domains removes domain authentication.
Explanation
Deleting domain authentication removes DKIM and SPF records. Emails sent from this domain will fail authentication checks, leading to delivery issues and potential spam classification. Safer alternatives: - Document DNS records before deletion - Verify new domain authentication is working - Plan for DNS propagation delays
Highsendgrid-delete-senderDELETE to SendGrid /v3/senders or /v3/verified_senders removes a sender identity.
Explanation
Deleting a sender identity prevents sending from that email address. Marketing campaigns and transactional emails using this sender will fail. Re-verification may require email confirmation. Safer alternatives: - Create new sender identity before deleting - Update email configurations first - Check for scheduled campaigns using this sender
Highsendgrid-delete-suppressionDELETE to SendGrid suppression endpoints removes entries from suppression lists.
Explanation
Removing suppression entries allows emails to be sent to addresses that previously bounced, complained, or unsubscribed. This can damage sender reputation and violate CAN-SPAM compliance. Safer alternatives: - Verify the email address is valid before removing - Check bounce reason codes - Respect unsubscribe requests (may be legally required)
Highsendgrid-delete-templateDELETE to SendGrid /v3/templates removes a transactional template.
Explanation
Deleting a template breaks any email sends referencing that template ID. Applications will receive errors when trying to send with a deleted template. All versions of the template are removed. Safer alternatives: - GET /v3/templates/{id}: Export template before deletion - Create a new version instead of deleting - Check email code for template ID references
Mediumsendgrid-delete-teammateDELETE to SendGrid /v3/teammates removes a teammate from the account.
Explanation
Deleting a teammate revokes their access to the SendGrid account. They lose access to templates, statistics, and settings they may have been managing. Safer alternatives: - Change teammate permissions instead of deleting - Ensure knowledge transfer is complete - Verify teammate doesn't own critical configurations
Mediumsendgrid-delete-webhookDELETE to SendGrid /v3/user/webhooks removes a webhook configuration.
Explanation
Deleting a webhook stops event notifications to your application. Bounce handling, open tracking, and click tracking data will not be received. This can affect email analytics and automation. Safer alternatives: - Document webhook URL and event types - Test new webhook before removing old one - Verify no critical automations depend on events