Skip to content

harden: remove hardcoded secret in mailersend-email.js (CWE-798) - #571

Open
anupamme wants to merge 1 commit into
GTBitsOfGood:devfrom
anupamme:fix-repo-voluntrack-mailersend-api-key-validation
Open

anupamme wants to merge 1 commit into
GTBitsOfGood:devfrom
anupamme:fix-repo-voluntrack-mailersend-api-key-validation

Conversation

@anupamme

@anupamme anupamme commented Oct 5, 2026

Copy link
Copy Markdown

The MailerSend API key is loaded from environment variables which is the correct approach, but the code does not validate that the API key is actually set before attempting to use it. This could lead to runtime errors or fallback to insecure defaults if the environment variable is missing. The threat model identified potential hardcoded credentials which requires verification of deployment configuration. This is defence-in-depth at src/utils/mailersend-email.js:335 rather than a vulnerability I can show is exploitable here — it makes the failure mode explicit and bounded. Close it freely if the pattern is intentional.

Reference: CWE-798

What changed

  • src/utils/mailersend-email.js

Verification

No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
@netlify

netlify Bot commented Oct 5, 2026

Copy link
Copy Markdown

👷 Deploy request for volunteer-bitsofgood pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit f0245a4

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant