Skip to content

Commit

Permalink
Merge pull request #4042 from cisagov/feature/update-cisa-email
Browse files Browse the repository at this point in the history
feature: cset-656 update contact email
  • Loading branch information
jekuipers authored Sep 11, 2024
2 parents 7ed2a73 + bd183cb commit d6eda7a
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<p class="sub align-center">
Contact CSET CISA
U.S. Toll Free: (888) 282-0870<br />
email: central@cisa.gov<br />
email: {{DHSEmail}}<br />
</p>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ public void SendMail(MailMessage mail)
mail.Body = mail.Body.Replace("{{email-footer-CF}}", footerCF);

string footer = _resourceHelper.GetEmbeddedResource(@"App_Data\EmailFooter.html");
footer = footer.Replace("{{DHSEmail}}", _configuration.GetValue<string>("Email:DHSEmail"));
mail.Body = mail.Body.Replace("{{email-footer}}", footer);

SmtpClient client = new SmtpClient
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;

namespace CSETWebCore.Api.Controllers
{
[ApiController]
[Route("api/[controller]")]
public class EmailController : ControllerBase
{
private readonly IConfiguration _configuration;

public EmailController(IConfiguration configuration)
{
_configuration = configuration;
}

[HttpGet("dhsemail")]
public IActionResult GetDHSEmail()
{
var dhsEmail = _configuration.GetValue<string>("Email:DHSEmail");
if (string.IsNullOrEmpty(dhsEmail))
{
return Ok("test"); // 204 No Content
}
return Ok(dhsEmail);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h6><a target="_blank" rel="noopener noreferrer" href="https://www.cisa.gov/" [i
</h6>
</div>
<h3 class="mt-4">{{t('about.contact')}}</h3>
<p class="mb-3 wrap-text" [innerHTML]="t('about.learn more') | safe">
<p class="mb-3 wrap-text" [innerHTML]="t('about.learn more', {'dhsEmail': this.configSvc.dhsEmail}) | safe">
</p>
<p class="wrap-text" [innerHTML]="t('about.encourage reporting')"></p>
</article>
Expand Down
12 changes: 11 additions & 1 deletion CSETWebNg/src/app/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class ConfigService {
* host/api/library
*/
libraryUrl: string;
dhsEmail: string;


onlineUrl: string;
Expand Down Expand Up @@ -156,6 +157,10 @@ export class ConfigService {
return this.http.get(this.apiUrl + 'HasLocalDocuments');
}

getDhsEmail() {
return this.http.get(this.apiUrl + 'Email/dhsemail', { responseType: 'text' });
}

/**
*
*/
Expand Down Expand Up @@ -186,7 +191,12 @@ export class ConfigService {
this.helpContactEmail = this.config.helpContactEmail;
this.helpContactPhone = this.config.helpContactPhone;
this.csetGithubApiUrl = this.config.csetGithubApiUrl;

this.getDhsEmail().subscribe((resp: string) => {
this.dhsEmail = resp;
if (!this.helpContactEmail) {
this.helpContactEmail = resp;
}
});
// configure the reference document URL if the "library" property is defined
// or if passed in as query param and stored as local storage variable. Local storage should
// take precedence over the config file, since Electron uses it to dynamically set the port.
Expand Down
2 changes: 1 addition & 1 deletion CSETWebNg/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@
"version": "Version",
"build date": "Build Date",
"contact": "Contact",
"learn more": "To learn more about cyber vulnerabilities, training, standards, and references, visit the <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.cisa.gov/cyber-resource-hub\">CISA Vulnerability Management website</a> or contact <a class=\"wrap-text\" href=\"mailto:vulnerability@cisa.gov\" class=\"mailto\">vulnerability@cisa.gov</a>.",
"learn more": "To learn more about cyber vulnerabilities, training, standards, and references, visit the <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.cisa.gov/cyber-resource-hub\">CISA Vulnerability Management website</a> or contact <a class=\"wrap-text\" href=\"mailto:{{dhsEmail}}\" class=\"mailto\">{{dhsEmail}}</a>.",
"encourage reporting": "CISA — Cybersecurity and Infrastructure Security Agency — encourages you to report suspicious cyber activity, incidents, and vulnerabilities affecting critical infrastructure control systems.",
"cset training resources": "Training Resources",
"training available": "training is available through the following resources",
Expand Down
2 changes: 1 addition & 1 deletion CSETWebNg/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@
"version": "Versión",
"build date": "Fecha de Compilación",
"contact": "Contacto",
"learn more": "Para obtener más información sobre vulnerabilidades cibernéticas, capacitación, estándares y referencias, visite el <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.cisa.gov/cyber-resource-hub\">sitio web de gestión de vulnerabilidades de CISA</a> o póngase en contacto con <a class=\"wrap-text\" href=\"mailto:vulnerability@cisa.gov\" class=\"mailto\">vulnerability@cisa.gov</a>.",
"learn more": "Para obtener más información sobre vulnerabilidades cibernéticas, capacitación, estándares y referencias, visite el <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.cisa.gov/cyber-resource-hub\">sitio web de gestión de vulnerabilidades de CISA</a> o póngase en contacto con <a class=\"wrap-text\" href=\"mailto:{{dhsEmail}}\" class=\"mailto\">{{dhsEmail}}</a>.",
"encourage reporting": "CISA (Agencia de Seguridad de la Infraestructura y Ciberseguridad) lo alienta a informar sobre actividades cibernéticas sospechosas, incidentes y vulnerabilidades que afectan los sistemas de control de infraestructura crítica.",
"cset training resources": "Recursos de capacitación CSET",
"training available": "La capacitación CSET está disponible a través de los siguientes recursos",
Expand Down
2 changes: 1 addition & 1 deletion CSETWebNg/src/assets/i18n/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@
"version": "Версія",
"build date": "Дата збірки",
"contact": "контакт",
"learn more": "Щоб дізнатися більше про кіберуразливості, навчання, стандарти та посилання, відвідайте <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.cisa.gov/cyber-resource-hub\">Веб-сайт керування вразливостями CISA</a> або зв’яжіться з <a class=\"wrap-text\" href=\"mailto:vulnerability@cisa.gov\" class=\"mailto\">vulnerability@cisa.gov</a>.",
"learn more": "Щоб дізнатися більше про кіберуразливості, навчання, стандарти та посилання, відвідайте <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.cisa.gov/cyber-resource-hub\">Веб-сайт керування вразливостями CISA</a> або зв’яжіться з <a class=\"wrap-text\" href=\"mailto:{{dhsEmail}}\" class=\"mailto\">{{dhsEmail}}</a>.",
"encourage reporting": "CISA — Агентство з кібербезпеки та безпеки інфраструктури — заохочує вас повідомляти про підозрілу кіберактивність, інциденти та вразливі місця, що впливають на системи контролю критичної інфраструктури.",
"cset training resources": "Навчальні ресурси CSET",
"training available": "Навчання CSET доступне через такі ресурси",
Expand Down

0 comments on commit d6eda7a

Please sign in to comment.