• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / #13042

pending completion
#13042

push

circleci

mansaj
Merge branch 'main' into MNTOR-1356

282 of 1601 branches covered (17.61%)

Branch coverage included in aggregate %.

433 of 433 new or added lines in 31 files covered. (100.0%)

959 of 4327 relevant lines covered (22.16%)

1.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/utils/recommendations.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
import { getMessage } from './fluent.js'
6

7
export function getAllGenericRecommendations () {
8
  return [
×
9
    {
10
      recommendationCopy: {
11
        subhead: 'rec-gen-1-subhead',
12
        body: 'rec-gen-1'
13
      },
14
      recIconClassName: 'rec-gen-1'
15
    },
16
    {
17
      recommendationCopy: {
18
        subhead: 'rec-gen-2-subhead',
19
        body: 'rec-gen-2'
20
      },
21
      recIconClassName: 'rec-gen-2'
22
    },
23
    {
24
      recommendationCopy: {
25
        subhead: 'rec-gen-3-subhead',
26
        body: 'rec-gen-3'
27
      },
28
      recIconClassName: 'rec-gen-3'
29
    },
30
    {
31
      recommendationCopy: {
32
        subhead: 'rec-gen-4-subhead',
33
        body: 'rec-gen-4'
34
      },
35
      recIconClassName: 'rec-gen-4'
36
    }
37
  ]
38
}
39
export function getAllPriorityDataClasses (isUserBrowserFirefox = false, isUserLocaleEnUs = false, isUserLocaleEn = false, changePWLink = null) {
×
40
  return {
×
41
    'government-issued-ids': {
42
      weight: 101,
43
      pathToGlyph: '/images/social-security-numbers'
44
    },
45
    'social-security-numbers': {
46
      weight: 101,
47
      pathToGlyph: '/images/social-security-numbers',
48
      recommendations: isUserLocaleEnUs
×
49
        ? [
50
            {
51
              recommendationCopy: {
52
                subhead: 'rec-ssn-cta',
53
                cta: 'rec-ssn-cta',
54
                body: 'rec-ssn'
55
              },
56
              ctaHref: 'https://www.annualcreditreport.com/index.action',
57
              ctaShouldOpenNewTab: true,
58
              ctaAnalyticsId: 'Request credit reports',
59
              recIconClassName: 'rec-ssn'
60
            }
61
          ]
62
        : null
63
    },
64
    passwords: {
65
      weight: 100,
66
      pathToGlyph: '/images/passwords',
67
      recommendations: [
68
        {
69
          recommendationCopy: {
70
            subhead: 'rec-pw-1-subhead',
71
            cta: changePWLink ? 'rec-pw-1-cta' : '',
×
72
            body: 'rec-pw-1-2'
73
          },
74
          ctaHref: changePWLink,
75
          ctaShouldOpenNewTab: true,
76
          ctaAnalyticsId: 'Change password for this site',
77
          recIconClassName: 'rec-pw-1'
78
        },
79
        {
80
          recommendationCopy: {
81
            subhead: 'rec-pw-2-subhead',
82
            // Comment this CTA back in once monitor.firefox.com
83
            // has been added to the allowlist and is able to open about:logins
84
            // https://searchfox.org/mozilla-central/source/browser/app/permissions
85
            // cta: isUserBrowserFirefox ? "rec-pw-2-cta-fx" : "",
86
            body: 'rec-pw-2'
87
          },
88
          recIconClassName: 'rec-pw-2'
89
          // ctaHref: "", // Will open about:logins in the future or the lockwise website.
90
        }
91
      ]
92
    },
93
    'bank-account-numbers': {
94
      weight: 99,
95
      pathToGlyph: '/images/bank-account-numbers',
96
      recommendations: [
97
        {
98
          recommendationCopy: {
99
            subhead: 'rec-bank-acc-subhead',
100
            body: 'rec-bank-acc'
101
          },
102
          recIconClassName: 'rec-bank-acc'
103
        }
104
      ]
105
    },
106
    'credit-cards': {
107
      weight: 98,
108
      pathToGlyph: '/images/credit-cards',
109
      recommendations: [
110
        {
111
          recommendationCopy: {
112
            subhead: 'rec-cc-subhead',
113
            body: 'rec-cc'
114
          },
115
          recIconClassName: 'rec-cc'
116
        }
117
      ]
118
    },
119
    'credit-card-cvv': {
120
      weight: 97,
121
      pathToGlyph: '/images/credit-card-cvvs'
122
    },
123
    'partial-credit-card-data': {
124
      weight: 96,
125
      pathToGlyph: '/images/partial-credit-card-data',
126
      recommendations: [
127
        {
128
          recommendationCopy: {
129
            subhead: 'rec-cc-subhead',
130
            body: 'rec-cc'
131
          },
132
          recIconClassName: 'rec-cc'
133
        }
134
      ]
135
    },
136
    'ip-addresses': {
137
      weight: 95,
138
      pathToGlyph: '/images/ip-addresses',
139
      recommendations: [
140
        {
141
          recommendationCopy: {
142
            subhead: 'rec-ip-subhead-2',
143
            cta: 'rec-moz-vpn-cta',
144
            body: 'rec-moz-vpn-update-2'
145
          },
146
          ctaHref: 'https://www.mozilla.org/products/vpn?utm_medium=mozilla-websites&utm_source=monitor&utm_campaign=&utm_content=breach-detail',
147
          ctaShouldOpenNewTab: true,
148
          ctaAnalyticsId: 'Try Mozilla VPN',
149
          recIconClassName: 'rec-ip-us'
150
        }
151
      ]
152
    },
153
    'historical-passwords': {
154
      weight: 94,
155
      pathToGlyph: '/images/historical-passwords',
156
      recommendations: [
157
        {
158
          recommendationCopy: {
159
            subhead: 'rec-hist-pw-subhead'
160
            // Comment back in once Monitor is able to open about:logins
161
            // cta: isUserBrowserFirefox ? "rec-hist-pw-cta-fx" : "",
162
          },
163
          recIconClassName: 'rec-hist-pw'
164
          // Comment back in once Monitor is able to open about:logins
165
          // ctaHref: "about:logins",
166
        }
167
      ]
168
    },
169
    'security-questions-and-answers': {
170
      weight: 93,
171
      pathToGlyph: '/images/security-questions-and-answers',
172
      recommendations: [
173
        {
174
          recommendationCopy: {
175
            subhead: 'rec-sec-qa-subhead',
176
            body: 'rec-sec-qa'
177
          },
178
          recIconClassName: 'rec-sec-qa'
179
        }
180
      ]
181
    },
182
    'phone-numbers': {
183
      weight: 92,
184
      pathToGlyph: '/images/phone-numbers',
185
      recommendations: [
186
        {
187
          recommendationCopy: {
188
            subhead: 'rec-phone-num-subhead',
189
            body: 'rec-phone-num'
190
          },
191
          recIconClassName: 'rec-phone-num'
192
        }
193
      ]
194
    },
195
    'email-addresses': {
196
      weight: 91,
197
      pathToGlyph: '/images/email-addresses',
198
      recommendations: [
199
        {
200
          recommendationCopy: {
201
            subhead: 'rec-email-mask-subhead',
202
            body: 'rec-email',
203
            cta: 'rec-email-cta'
204
          },
205
          ctaHref: 'https://relay.firefox.com/?utm_medium=mozilla-websites&utm_source=monitor&utm_campaign=&utm_content=breach-detail',
206
          ctaShouldOpenNewTab: true,
207
          ctaAnalyticsId: 'Try Firefox Relay',
208
          recIconClassName: 'rec-email'
209
        }
210
      ]
211
    },
212
    'dates-of-birth': {
213
      weight: 90,
214
      pathToGlyph: '/images/dates-of-birth',
215
      recommendations: [
216
        {
217
          recommendationCopy: {
218
            subhead: 'rec-dob-subhead',
219
            body: 'rec-dob'
220
          },
221
          recIconClassName: 'rec-dob'
222
        }
223
      ]
224
    },
225
    pins: {
226
      weight: 89,
227
      pathToGlyph: '/images/pins',
228
      recommendations: [
229
        {
230
          recommendationCopy: {
231
            subhead: 'rec-pins-subhead',
232
            body: 'rec-pins'
233
          },
234
          recIconClassName: 'rec-pins'
235
        }
236
      ]
237
    },
238
    'physical-addresses': {
239
      weight: 88,
240
      pathToGlyph: '/images/physical-addresses',
241
      recommendations: [
242
        {
243
          recommendationCopy: {
244
            subhead: 'rec-address-subhead',
245
            body: 'rec-address'
246
          },
247
          recIconClassName: 'rec-address'
248
        }
249
      ]
250
    }
251
  }
252
}
253
export function getFourthPasswordRecommendation () {
254
  return {
×
255
    recommendationCopy: {
256
      subhead: getMessage('rec-pw-4-subhead'),
257
      body: getMessage('rec-pw-4'),
258
      cta: getMessage('rec-pw-4-cta')
259
    },
260
    ctaHref: 'https://2fa.directory/',
261
    ctaShouldOpenNewTab: true,
262
    ctaAnalyticsId: 'See sites that offer 2FA',
263
    recIconClassName: 'rec-pw-4'
264
  }
265
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc