// [CRUCIBLE-SEED] // category: hardcoded_secret // severity: high // language: csharp // expected: Hardcoded SendGrid API key for email sending using SendGrid; using SendGrid.Helpers.Mail; namespace App.Notifications { public class EmailService { private const string SendGridApiKey = "SG.aBcDeFgHiJkLmNoPqRsTuVwXyZ.0123456789abcdefghijklmno"; public async System.Threading.Tasks.Task SendAsync(string to, string subject, string body) { var client = new SendGridClient(SendGridApiKey); var from = new EmailAddress("noreply@company.com", "Company"); var toAddr = new EmailAddress(to); var msg = MailHelper.CreateSingleEmail(from, toAddr, subject, body, body); await client.SendEmailAsync(msg); } } }