@descope/angular-sdk 0.0.0-next-a6b67f6a-20231228 → 0.0.0-next-cc7eda17-20231228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/.editorconfig +16 -0
  2. package/.eslintrc.json +40 -0
  3. package/.github/workflows/ci.yml +98 -0
  4. package/.github/workflows/publish-next.yml +43 -0
  5. package/.github/workflows/publish.yml +31 -0
  6. package/.github/workflows/release.yml +41 -0
  7. package/.husky/pre-commit +4 -0
  8. package/.prettierrc +8 -0
  9. package/.vscode/extensions.json +4 -0
  10. package/.vscode/launch.json +20 -0
  11. package/.vscode/settings.json +3 -0
  12. package/.vscode/tasks.json +42 -0
  13. package/angular.json +154 -0
  14. package/jest.config.js +17 -0
  15. package/package.json +1 -4
  16. package/projects/angular-sdk/.eslintrc.json +32 -0
  17. package/projects/angular-sdk/ng-package.json +8 -0
  18. package/projects/angular-sdk/src/environment.ts +3 -0
  19. package/projects/angular-sdk/src/lib/components/descope/descope.component.spec.ts +104 -0
  20. package/projects/angular-sdk/src/lib/components/descope/descope.component.ts +114 -0
  21. package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.html +15 -0
  22. package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.spec.ts +53 -0
  23. package/projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.ts +32 -0
  24. package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.html +15 -0
  25. package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.spec.ts +51 -0
  26. package/projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.ts +32 -0
  27. package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.html +15 -0
  28. package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.spec.ts +53 -0
  29. package/projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.ts +32 -0
  30. package/projects/angular-sdk/src/lib/descope-auth.module.ts +46 -0
  31. package/projects/angular-sdk/src/lib/services/descope-auth.guard.spec.ts +76 -0
  32. package/projects/angular-sdk/src/lib/services/descope-auth.guard.ts +16 -0
  33. package/projects/angular-sdk/src/lib/services/descope-auth.service.spec.ts +264 -0
  34. package/projects/angular-sdk/src/lib/services/descope-auth.service.ts +176 -0
  35. package/projects/angular-sdk/src/lib/services/descope.interceptor.spec.ts +102 -0
  36. package/projects/angular-sdk/src/lib/services/descope.interceptor.ts +76 -0
  37. package/projects/angular-sdk/src/lib/types/types.ts +10 -0
  38. package/projects/angular-sdk/src/lib/utils/constants.ts +8 -0
  39. package/projects/angular-sdk/src/lib/utils/helpers.spec.ts +103 -0
  40. package/projects/angular-sdk/src/lib/utils/helpers.ts +36 -0
  41. package/{dist/public-api.d.ts → projects/angular-sdk/src/public-api.ts} +4 -0
  42. package/projects/angular-sdk/tsconfig.lib.json +12 -0
  43. package/projects/angular-sdk/tsconfig.lib.prod.json +10 -0
  44. package/projects/angular-sdk/tsconfig.spec.json +11 -0
  45. package/projects/demo-app/.eslintrc.json +31 -0
  46. package/projects/demo-app/src/app/app-routing.module.ts +23 -0
  47. package/projects/demo-app/src/app/app.component.html +3 -0
  48. package/projects/demo-app/src/app/app.component.scss +16 -0
  49. package/projects/demo-app/src/app/app.component.spec.ts +37 -0
  50. package/projects/demo-app/src/app/app.component.ts +8 -0
  51. package/projects/demo-app/src/app/app.module.ts +52 -0
  52. package/projects/demo-app/src/app/home/home.component.html +23 -0
  53. package/projects/demo-app/src/app/home/home.component.scss +15 -0
  54. package/projects/demo-app/src/app/home/home.component.spec.ts +44 -0
  55. package/projects/demo-app/src/app/home/home.component.ts +61 -0
  56. package/projects/demo-app/src/app/interceptor/auth.interceptor.ts +20 -0
  57. package/projects/demo-app/src/app/login/login.component.html +12 -0
  58. package/projects/demo-app/src/app/login/login.component.spec.ts +42 -0
  59. package/projects/demo-app/src/app/login/login.component.ts +35 -0
  60. package/projects/demo-app/src/app/protected/protected.component.html +18 -0
  61. package/projects/demo-app/src/app/protected/protected.component.scss +8 -0
  62. package/projects/demo-app/src/app/protected/protected.component.spec.ts +42 -0
  63. package/projects/demo-app/src/app/protected/protected.component.ts +40 -0
  64. package/projects/demo-app/src/assets/.gitkeep +0 -0
  65. package/projects/demo-app/src/environments/conifg.ts +13 -0
  66. package/projects/demo-app/src/environments/environment.ts +19 -0
  67. package/projects/demo-app/src/favicon.ico +0 -0
  68. package/projects/demo-app/src/index.html +17 -0
  69. package/projects/demo-app/src/main.ts +7 -0
  70. package/projects/demo-app/src/styles.scss +21 -0
  71. package/projects/demo-app/tsconfig.app.json +10 -0
  72. package/projects/demo-app/tsconfig.spec.json +10 -0
  73. package/renovate.json +4 -0
  74. package/scripts/gitleaks/.gitleaks.toml +653 -0
  75. package/scripts/gitleaks/gitleaks.sh +34 -0
  76. package/scripts/setversion/setversion.js +20 -0
  77. package/setup-jest.ts +1 -0
  78. package/thirdPartyLicenseCollector_linux_amd64 +0 -0
  79. package/tsconfig.json +35 -0
  80. package/dist/environment.d.ts +0 -3
  81. package/dist/esm2022/descope-angular-sdk.mjs +0 -5
  82. package/dist/esm2022/environment.mjs +0 -4
  83. package/dist/esm2022/lib/components/descope/descope.component.mjs +0 -106
  84. package/dist/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +0 -40
  85. package/dist/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +0 -40
  86. package/dist/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +0 -40
  87. package/dist/esm2022/lib/descope-auth.module.mjs +0 -52
  88. package/dist/esm2022/lib/services/descope-auth.guard.mjs +0 -15
  89. package/dist/esm2022/lib/services/descope-auth.service.mjs +0 -139
  90. package/dist/esm2022/lib/services/descope.interceptor.mjs +0 -51
  91. package/dist/esm2022/lib/types/types.mjs +0 -6
  92. package/dist/esm2022/lib/utils/constants.mjs +0 -7
  93. package/dist/esm2022/lib/utils/helpers.mjs +0 -27
  94. package/dist/esm2022/public-api.mjs +0 -13
  95. package/dist/fesm2022/descope-angular-sdk.mjs +0 -500
  96. package/dist/fesm2022/descope-angular-sdk.mjs.map +0 -1
  97. package/dist/index.d.ts +0 -5
  98. package/dist/lib/components/descope/descope.component.d.ts +0 -32
  99. package/dist/lib/components/sign-in-flow/sign-in-flow.component.d.ts +0 -24
  100. package/dist/lib/components/sign-up-flow/sign-up-flow.component.d.ts +0 -24
  101. package/dist/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.d.ts +0 -24
  102. package/dist/lib/descope-auth.module.d.ts +0 -14
  103. package/dist/lib/services/descope-auth.guard.d.ts +0 -2
  104. package/dist/lib/services/descope-auth.service.d.ts +0 -38
  105. package/dist/lib/services/descope.interceptor.d.ts +0 -2
  106. package/dist/lib/types/types.d.ts +0 -8
  107. package/dist/lib/utils/constants.d.ts +0 -5
  108. package/dist/lib/utils/helpers.d.ts +0 -5
  109. package/dist/package.json +0 -42
  110. /package/{dist → projects/angular-sdk}/README.md +0 -0
@@ -0,0 +1,653 @@
1
+ title = "gitleaks config"
2
+
3
+ [[rules]]
4
+ id = "gitlab-pat"
5
+ description = "GitLab Personal Access Token"
6
+ regex = '''glpat-[0-9a-zA-Z\-\_]{20}'''
7
+ keywords = ["glpat"]
8
+
9
+ [[rules]]
10
+ id = "aws-access-token"
11
+ description = "AWS"
12
+ regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
13
+ keywords = [
14
+ "AKIA",
15
+ "AGPA",
16
+ "AIDA",
17
+ "AROA",
18
+ "AIPA",
19
+ "ANPA",
20
+ "ANVA",
21
+ "ASIA",
22
+ ]
23
+
24
+ [[rules]]
25
+ id = "PKCS8-PK"
26
+ description = "PKCS8 private key"
27
+ regex = '''-----BEGIN PRIVATE KEY-----'''
28
+ keywords = ["BEGIN PRIVATE"]
29
+
30
+ [[rules]]
31
+ id = "RSA-PK"
32
+ description = "RSA private key"
33
+ regex = '''-----BEGIN RSA PRIVATE KEY-----'''
34
+ keywords = ["BEGIN RSA"]
35
+
36
+ [[rules]]
37
+ id = "OPENSSH-PK"
38
+ description = "SSH private key"
39
+ regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
40
+ keywords = ["BEGIN OPENSSH"]
41
+
42
+ [[rules]]
43
+ id = "PGP-PK"
44
+ description = "PGP private key"
45
+ regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
46
+ keywords = ["BEGIN PGP"]
47
+
48
+ [[rules]]
49
+ id = "github-pat"
50
+ description = "GitHub Personal Access Token"
51
+ regex = '''ghp_[0-9a-zA-Z]{36}'''
52
+ keywords = ["ghp_"]
53
+
54
+ [[rules]]
55
+ id = "github-oauth"
56
+ description = "GitHub OAuth Access Token"
57
+ regex = '''gho_[0-9a-zA-Z]{36}'''
58
+ keywords = ["gho_"]
59
+
60
+
61
+ [[rules]]
62
+ id = "SSH-DSA-PK"
63
+ description = "SSH (DSA) private key"
64
+ regex = '''-----BEGIN DSA PRIVATE KEY-----'''
65
+ keywords = ["BEGIN DSA"]
66
+
67
+ [[rules]]
68
+ id = "SSH-EC-PK"
69
+ description = "SSH (EC) private key"
70
+ regex = '''-----BEGIN EC PRIVATE KEY-----'''
71
+ keywords = ["BEGIN EC"]
72
+
73
+
74
+ [[rules]]
75
+ id = "github-app-token"
76
+ description = "GitHub App Token"
77
+ regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}'''
78
+ keywords = [
79
+ "ghu_",
80
+ "ghs_"
81
+ ]
82
+
83
+ [[rules]]
84
+ id = "github-refresh-token"
85
+ description = "GitHub Refresh Token"
86
+ regex = '''ghr_[0-9a-zA-Z]{76}'''
87
+ keywords = ["ghr_"]
88
+
89
+ [[rules]]
90
+ id = "shopify-shared-secret"
91
+ description = "Shopify shared secret"
92
+ regex = '''shpss_[a-fA-F0-9]{32}'''
93
+ keywords = ["shpss_"]
94
+
95
+ [[rules]]
96
+ id = "shopify-access-token"
97
+ description = "Shopify access token"
98
+ regex = '''shpat_[a-fA-F0-9]{32}'''
99
+ keywords = ["shpat_"]
100
+
101
+ [[rules]]
102
+ id = "shopify-custom-access-token"
103
+ description = "Shopify custom app access token"
104
+ regex = '''shpca_[a-fA-F0-9]{32}'''
105
+ keywords = ["shpca_"]
106
+
107
+ [[rules]]
108
+ id = "shopify-private-app-access-token"
109
+ description = "Shopify private app access token"
110
+ regex = '''shppa_[a-fA-F0-9]{32}'''
111
+ keywords = ["shppa_"]
112
+
113
+ [[rules]]
114
+ id = "slack-access-token"
115
+ description = "Slack token"
116
+ regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
117
+ keywords = [
118
+ "xoxb",
119
+ "xoxa",
120
+ "xoxp",
121
+ "xoxr",
122
+ "xoxs"
123
+ ]
124
+
125
+ [[rules]]
126
+ id = "stripe-access-token"
127
+ description = "Stripe"
128
+ regex = '''(?i)(sk|pk)_(test|live)_[0-9a-z]{10,32}'''
129
+ keywords = [
130
+ "sk_test",
131
+ "pk_test",
132
+ "sk_live",
133
+ "pk_live"
134
+ ]
135
+
136
+ [[rules]]
137
+ id = "pypi-upload-token"
138
+ description = "PyPI upload token"
139
+ regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}'''
140
+ keywords = ["pypi-AgEIcHlwaS5vcmc"]
141
+
142
+ [[rules]]
143
+ id = "gcp-service-account"
144
+ description = "Google (GCP) Service-account"
145
+ regex = '''\"type\": \"service_account\"'''
146
+ keywords = ["\"type\": \"service_account\""]
147
+
148
+ [[rules]]
149
+ id = "heroku-api-key"
150
+ description = "Heroku API Key"
151
+ regex = ''' (?i)(heroku[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})['\"]'''
152
+ secretGroup = 3
153
+ keywords = ["heroku"]
154
+
155
+ [[rules]]
156
+ id = "slack-web-hook"
157
+ description = "Slack Webhook"
158
+ regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
159
+ keywords = ["https://hooks.slack.com/services/"]
160
+
161
+ [[rules]]
162
+ id = "twilio-api-key"
163
+ description = "Twilio API Key"
164
+ regex = '''SK[0-9a-fA-F]{32}'''
165
+ keywords = ["twilio"]
166
+
167
+ [[rules]]
168
+ id = "age-secret-key"
169
+ description = "Age secret key"
170
+ regex = '''AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}'''
171
+ keywords = ["AGE-SECRET-KEY-1"]
172
+
173
+ [[rules]]
174
+ id = "facebook-token"
175
+ description = "Facebook token"
176
+ regex = '''(?i)(facebook[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
177
+ secretGroup = 3
178
+ keywords = ["facebook"]
179
+
180
+ [[rules]]
181
+ id = "twitter-token"
182
+ description = "Twitter token"
183
+ regex = '''(?i)(twitter[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{35,44})['\"]'''
184
+ secretGroup = 3
185
+ keywords = ["twitter"]
186
+
187
+ [[rules]]
188
+ id = "adobe-client-id"
189
+ description = "Adobe Client ID (Oauth Web)"
190
+ regex = '''(?i)(adobe[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
191
+ secretGroup = 3
192
+ keywords = ["adobe"]
193
+
194
+ [[rules]]
195
+ id = "adobe-client-secret"
196
+ description = "Adobe Client Secret"
197
+ regex = '''(p8e-)(?i)[a-z0-9]{32}'''
198
+ keywords = ["p8e-"]
199
+
200
+ [[rules]]
201
+ id = "alibaba-access-key-id"
202
+ description = "Alibaba AccessKey ID"
203
+ regex = '''(LTAI)(?i)[a-z0-9]{20}'''
204
+ keywords = ["LTAI"]
205
+
206
+ [[rules]]
207
+ id = "alibaba-secret-key"
208
+ description = "Alibaba Secret Key"
209
+ regex = '''(?i)(alibaba[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{30})['\"]'''
210
+ secretGroup = 3
211
+ keywords = ["alibaba"]
212
+
213
+ [[rules]]
214
+ id = "asana-client-id"
215
+ description = "Asana Client ID"
216
+ regex = '''(?i)(asana[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9]{16})['\"]'''
217
+ secretGroup = 3
218
+ keywords = ["asana"]
219
+
220
+ [[rules]]
221
+ id = "asana-client-secret"
222
+ description = "Asana Client Secret"
223
+ regex = '''(?i)(asana[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{32})['\"]'''
224
+ secretGroup = 3
225
+ keywords = ["asana"]
226
+
227
+ [[rules]]
228
+ id = "atlassian-api-token"
229
+ description = "Atlassian API token"
230
+ regex = '''(?i)(atlassian[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{24})['\"]'''
231
+ secretGroup = 3
232
+ keywords = ["atlassian"]
233
+
234
+ [[rules]]
235
+ id = "bitbucket-client-id"
236
+ description = "Bitbucket client ID"
237
+ regex = '''(?i)(bitbucket[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{32})['\"]'''
238
+ secretGroup = 3
239
+ keywords = ["bitbucket"]
240
+
241
+ [[rules]]
242
+ id = "bitbucket-client-secret"
243
+ description = "Bitbucket client secret"
244
+ regex = '''(?i)(bitbucket[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9_\-]{64})['\"]'''
245
+ secretGroup = 3
246
+ keywords = ["bitbucket"]
247
+
248
+ [[rules]]
249
+ id = "beamer-api-token"
250
+ description = "Beamer API token"
251
+ regex = '''(?i)(beamer[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](b_[a-z0-9=_\-]{44})['\"]'''
252
+ secretGroup = 3
253
+ keywords = ["beamer"]
254
+
255
+ [[rules]]
256
+ id = "clojars-api-token"
257
+ description = "Clojars API token"
258
+ regex = '''(CLOJARS_)(?i)[a-z0-9]{60}'''
259
+ keywords = ["clojars"]
260
+
261
+ [[rules]]
262
+ id = "contentful-delivery-api-token"
263
+ description = "Contentful delivery API token"
264
+ regex = '''(?i)(contentful[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9\-=_]{43})['\"]'''
265
+ secretGroup = 3
266
+ keywords = ["contentful"]
267
+
268
+ [[rules]]
269
+ id = "databricks-api-token"
270
+ description = "Databricks API token"
271
+ regex = '''dapi[a-h0-9]{32}'''
272
+ keywords = ["dapi"]
273
+
274
+ [[rules]]
275
+ id = "discord-api-token"
276
+ description = "Discord API key"
277
+ regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{64})['\"]'''
278
+ secretGroup = 3
279
+ keywords = ["discord"]
280
+
281
+ [[rules]]
282
+ id = "discord-client-id"
283
+ description = "Discord client ID"
284
+ regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9]{18})['\"]'''
285
+ secretGroup = 3
286
+ keywords = ["discord"]
287
+
288
+ [[rules]]
289
+ id = "discord-client-secret"
290
+ description = "Discord client secret"
291
+ regex = '''(?i)(discord[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_\-]{32})['\"]'''
292
+ secretGroup = 3
293
+ keywords = ["discord"]
294
+
295
+ [[rules]]
296
+ id = "doppler-api-token"
297
+ description = "Doppler API token"
298
+ regex = '''['\"](dp\.pt\.)(?i)[a-z0-9]{43}['\"]'''
299
+ keywords = ["doppler"]
300
+
301
+ [[rules]]
302
+ id = "dropbox-api-secret"
303
+ description = "Dropbox API secret/key"
304
+ regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{15})['\"]'''
305
+ keywords = ["dropbox"]
306
+
307
+ [[rules]]
308
+ id = "dropbox--api-key"
309
+ description = "Dropbox API secret/key"
310
+ regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{15})['\"]'''
311
+ keywords = ["dropbox"]
312
+
313
+ [[rules]]
314
+ id = "dropbox-short-lived-api-token"
315
+ description = "Dropbox short lived API token"
316
+ regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](sl\.[a-z0-9\-=_]{135})['\"]'''
317
+ keywords = ["dropbox"]
318
+
319
+ [[rules]]
320
+ id = "dropbox-long-lived-api-token"
321
+ description = "Dropbox long lived API token"
322
+ regex = '''(?i)(dropbox[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"][a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43}['\"]'''
323
+ keywords = ["dropbox"]
324
+
325
+ [[rules]]
326
+ id = "duffel-api-token"
327
+ description = "Duffel API token"
328
+ regex = '''['\"]duffel_(test|live)_(?i)[a-z0-9_-]{43}['\"]'''
329
+ keywords = ["duffel"]
330
+
331
+ [[rules]]
332
+ id = "dynatrace-api-token"
333
+ description = "Dynatrace API token"
334
+ regex = '''['\"]dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}['\"]'''
335
+ keywords = ["dynatrace"]
336
+
337
+ [[rules]]
338
+ id = "easypost-api-token"
339
+ description = "EasyPost API token"
340
+ regex = '''['\"]EZAK(?i)[a-z0-9]{54}['\"]'''
341
+ keywords = ["EZAK"]
342
+
343
+ [[rules]]
344
+ id = "easypost-test-api-token"
345
+ description = "EasyPost test API token"
346
+ regex = '''['\"]EZTK(?i)[a-z0-9]{54}['\"]'''
347
+ keywords = ["EZTK"]
348
+
349
+ [[rules]]
350
+ id = "fastly-api-token"
351
+ description = "Fastly API token"
352
+ regex = '''(?i)(fastly[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9\-=_]{32})['\"]'''
353
+ secretGroup = 3
354
+ keywords = ["fastly"]
355
+
356
+ [[rules]]
357
+ id = "finicity-client-secret"
358
+ description = "Finicity client secret"
359
+ regex = '''(?i)(finicity[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{20})['\"]'''
360
+ secretGroup = 3
361
+ keywords = ["finicity"]
362
+
363
+ [[rules]]
364
+ id = "finicity-api-token"
365
+ description = "Finicity API token"
366
+ regex = '''(?i)(finicity[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
367
+ secretGroup = 3
368
+ keywords = ["finicity"]
369
+
370
+ [[rules]]
371
+ id = "flutterwave-public-key"
372
+ description = "Flutterwave public key"
373
+ regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X'''
374
+ keywords = ["FLWPUBK_TEST"]
375
+
376
+ [[rules]]
377
+ id = "flutterwave-secret-key"
378
+ description = "Flutterwave secret key"
379
+ regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X'''
380
+ keywords = ["FLWSECK_TEST"]
381
+
382
+ [[rules]]
383
+ id = "flutterwave-enc-key"
384
+ description = "Flutterwave encrypted key"
385
+ regex = '''FLWSECK_TEST[a-h0-9]{12}'''
386
+ keywords = ["FLWSECK_TEST"]
387
+
388
+ [[rules]]
389
+ id = "frameio-api-token"
390
+ description = "Frame.io API token"
391
+ regex = '''fio-u-(?i)[a-z0-9\-_=]{64}'''
392
+ keywords = ["fio-u-"]
393
+
394
+ [[rules]]
395
+ id = "gocardless-api-token"
396
+ description = "GoCardless API token"
397
+ regex = '''['\"]live_(?i)[a-z0-9\-_=]{40}['\"]'''
398
+ keywords = ["live_"]
399
+
400
+ [[rules]]
401
+ id = "hashicorp-tf-api-token"
402
+ description = "HashiCorp Terraform user/org API token"
403
+ regex = '''['\"](?i)[a-z0-9]{14}\.atlasv1\.[a-z0-9\-_=]{60,70}['\"]'''
404
+ keywords = ["atlasv1"]
405
+
406
+ [[rules]]
407
+ id = "hubspot-api-token"
408
+ description = "HubSpot API token"
409
+ regex = '''(?i)(hubspot[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
410
+ secretGroup = 3
411
+ keywords = ["hubspot"]
412
+
413
+ [[rules]]
414
+ id = "intercom-api-token"
415
+ description = "Intercom API token"
416
+ regex = '''(?i)(intercom[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9=_]{60})['\"]'''
417
+ secretGroup = 3
418
+ keywords = ["intercom"]
419
+
420
+ [[rules]]
421
+ id = "intercom-client-secret"
422
+ description = "Intercom client secret/ID"
423
+ regex = '''(?i)(intercom[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
424
+ secretGroup = 3
425
+ keywords = ["intercom"]
426
+
427
+ [[rules]]
428
+ id = "ionic-api-token"
429
+ description = "Ionic API token"
430
+ regex = '''(?i)(ionic[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](ion_[a-z0-9]{42})['\"]'''
431
+ keywords = ["ionic"]
432
+
433
+ [[rules]]
434
+ id = "linear-api-token"
435
+ description = "Linear API token"
436
+ regex = '''lin_api_(?i)[a-z0-9]{40}'''
437
+ keywords = ["lin_api_"]
438
+
439
+ [[rules]]
440
+ id = "linear-client-secret"
441
+ description = "Linear client secret/ID"
442
+ regex = '''(?i)(linear[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32})['\"]'''
443
+ secretGroup = 3
444
+ keywords = ["linear"]
445
+
446
+ [[rules]]
447
+ id = "lob-api-key"
448
+ description = "Lob API Key"
449
+ regex = '''(?i)(lob[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]((live|test)_[a-f0-9]{35})['\"]'''
450
+ secretGroup = 3
451
+ keywords = ["lob"]
452
+
453
+ [[rules]]
454
+ id = "lob-pub-api-key"
455
+ description = "Lob Publishable API Key"
456
+ regex = '''(?i)(lob[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]((test|live)_pub_[a-f0-9]{31})['\"]'''
457
+ secretGroup = 3
458
+ keywords = [
459
+ "test_pub",
460
+ "live_pub",
461
+ "_pub"
462
+ ]
463
+
464
+ [[rules]]
465
+ id = "mailchimp-api-key"
466
+ description = "Mailchimp API key"
467
+ regex = '''(?i)(mailchimp[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-f0-9]{32}-us20)['\"]'''
468
+ secretGroup = 3
469
+ keywords = ["mailchimp"]
470
+
471
+ [[rules]]
472
+ id = "mailgun-private-api-token"
473
+ description = "Mailgun private API token"
474
+ regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](key-[a-f0-9]{32})['\"]'''
475
+ secretGroup = 3
476
+ keywords = [
477
+ "mailgun",
478
+ "key-"
479
+ ]
480
+
481
+ [[rules]]
482
+ id = "mailgun-pub-key"
483
+ description = "Mailgun public validation key"
484
+ regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"](pubkey-[a-f0-9]{32})['\"]'''
485
+ secretGroup = 3
486
+ keywords = [
487
+ "mailgun",
488
+ "pubkey-"
489
+ ]
490
+
491
+ [[rules]]
492
+ id = "mailgun-signing-key"
493
+ description = "Mailgun webhook signing key"
494
+ regex = '''(?i)(mailgun[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})['\"]'''
495
+ secretGroup = 3
496
+ keywords = ["mailgun"]
497
+
498
+ [[rules]]
499
+ id = "mapbox-api-token"
500
+ description = "Mapbox API token"
501
+ regex = '''(?i)(pk\.[a-z0-9]{60}\.[a-z0-9]{22})'''
502
+ keywords = ["mapbox"]
503
+
504
+ [[rules]]
505
+ id = "messagebird-api-token"
506
+ description = "MessageBird API token"
507
+ regex = '''(?i)(messagebird[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{25})['\"]'''
508
+ secretGroup = 3
509
+ keywords = [
510
+ "messagebird",
511
+ "message_bird",
512
+ "message-bird"
513
+ ]
514
+
515
+ [[rules]]
516
+ id = "messagebird-client-id"
517
+ description = "MessageBird API client ID"
518
+ regex = '''(?i)(messagebird[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-h0-9]{8}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{4}-[a-h0-9]{12})['\"]'''
519
+ secretGroup = 3
520
+ keywords = [
521
+ "messagebird",
522
+ "message_bird",
523
+ "message-bird"
524
+ ]
525
+
526
+ [[rules]]
527
+ id = "new-relic-user-api-key"
528
+ description = "New Relic user API Key"
529
+ regex = '''['\"](NRAK-[A-Z0-9]{27})['\"]'''
530
+ keywords = ["NRAK-"]
531
+
532
+ [[rules]]
533
+ id = "new-relic-user-api-id"
534
+ description = "New Relic user API ID"
535
+ regex = '''(?i)(newrelic[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([A-Z0-9]{64})['\"]'''
536
+ secretGroup = 3
537
+ keywords = ["newrelic"]
538
+
539
+ [[rules]]
540
+ id = "new-relic-browser-api-token"
541
+ description = "New Relic ingest browser API token"
542
+ regex = '''['\"](NRJS-[a-f0-9]{19})['\"]'''
543
+ keywords = ["NRJS-"]
544
+
545
+ [[rules]]
546
+ id = "npm-access-token"
547
+ description = "npm access token"
548
+ regex = '''['\"](npm_(?i)[a-z0-9]{36})['\"]'''
549
+ keywords = ["npm_"]
550
+
551
+ [[rules]]
552
+ id = "planetscale-password"
553
+ description = "PlanetScale password"
554
+ regex = '''pscale_pw_(?i)[a-z0-9\-_\.]{43}'''
555
+ keywords = ["pscale_pw_"]
556
+
557
+ [[rules]]
558
+ id = "planetscale-api-token"
559
+ description = "PlanetScale API token"
560
+ regex = '''pscale_tkn_(?i)[a-z0-9\-_\.]{43}'''
561
+ keywords = ["pscale_tkn_"]
562
+
563
+ [[rules]]
564
+ id = "postman-api-token"
565
+ description = "Postman API token"
566
+ regex = '''PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34}'''
567
+ keywords = ["PMAK-"]
568
+
569
+ [[rules]]
570
+ id = "pulumi-api-token"
571
+ description = "Pulumi API token"
572
+ regex = '''pul-[a-f0-9]{40}'''
573
+ keywords = ["pul-"]
574
+
575
+ [[rules]]
576
+ id = "rubygems-api-token"
577
+ description = "Rubygem API token"
578
+ regex = '''rubygems_[a-f0-9]{48}'''
579
+ keywords = ["rubygems_"]
580
+
581
+ [[rules]]
582
+ id = "sendgrid-api-token"
583
+ description = "SendGrid API token"
584
+ regex = '''SG\.(?i)[a-z0-9_\-\.]{66}'''
585
+ keywords = ["sendgrid"]
586
+
587
+ [[rules]]
588
+ id = "sendinblue-api-token"
589
+ description = "Sendinblue API token"
590
+ regex = '''xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16}'''
591
+ keywords = ["xkeysib-"]
592
+
593
+ [[rules]]
594
+ id = "shippo-api-token"
595
+ description = "Shippo API token"
596
+ regex = '''shippo_(live|test)_[a-f0-9]{40}'''
597
+ keywords = ["shippo_"]
598
+
599
+ [[rules]]
600
+ id = "linkedin-client-secret"
601
+ description = "LinkedIn Client secret"
602
+ regex = '''(?i)(linkedin[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z]{16})['\"]'''
603
+ secretGroup = 3
604
+ keywords = ["linkedin"]
605
+
606
+ [[rules]]
607
+ id = "linkedin-client-id"
608
+ description = "LinkedIn Client ID"
609
+ regex = '''(?i)(linkedin[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{14})['\"]'''
610
+ secretGroup = 3
611
+ keywords = ["linkedin"]
612
+
613
+ [[rules]]
614
+ id = "twitch-api-token"
615
+ description = "Twitch API token"
616
+ regex = '''(?i)(twitch[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([a-z0-9]{30})['\"]'''
617
+ secretGroup = 3
618
+ keywords = ["twitch"]
619
+
620
+ [[rules]]
621
+ id = "typeform-api-token"
622
+ description = "Typeform API token"
623
+ regex = '''(?i)(typeform[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}(tfp_[a-z0-9\-_\.=]{59})'''
624
+ secretGroup = 3
625
+ keywords = ["tpf_"]
626
+
627
+ [[rules]]
628
+ id = "generic-api-key"
629
+ description = "Generic API Key"
630
+ regex = '''(?i)((key|api[^Version]|token|secret|password|auth)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z\-_=]{8,64})['\"]'''
631
+ entropy = 3.7
632
+ secretGroup = 4
633
+ keywords = [
634
+ "key",
635
+ "api",
636
+ "token",
637
+ "secret",
638
+ "password",
639
+ "auth",
640
+ ]
641
+
642
+ [allowlist]
643
+ description = "global allow lists"
644
+ regexes = [
645
+ '''219-09-9999''',
646
+ '''078-05-1120''',
647
+ '''(9[0-9]{2}|666)-\d{2}-\d{4}''',
648
+ ]
649
+ paths = [
650
+ '''gitleaks.toml''',
651
+ '''(.*?)(jpg|gif|doc|pdf|bin|svg|socket|js|ts|json)$''',
652
+ "node_modules/",
653
+ ]
@@ -0,0 +1,34 @@
1
+ # Run detect-secrets
2
+ lint_find_secrets() {
3
+ echo "- Running secrets check"
4
+ SECRETS_SUPPORTED_VERSION="8.8.11"
5
+ INSTALLED_SECRETS_VERSION="$(gitleaks version)"
6
+ if [[ $INSTALLED_SECRETS_VERSION != *"$SECRETS_SUPPORTED_VERSION"* ]]; then
7
+ echo "Installing gitleaks $(uname -s)_$(arch) for the first time..."
8
+ FILE=`curl --header "$headers" -s https://api.github.com/repos/zricethezav/gitleaks/releases/tags/v${SECRETS_SUPPORTED_VERSION} | jq -r "first(.assets[].name | select(test(\"$(uname -s)_$(arch)\"; \"i\") or test(\"$(uname -s)_x64\"; \"i\")))"`
9
+ if [ -z "$FILE" ]
10
+ then
11
+ echo "Using redirect URL"
12
+ URL_REDIRECT=`curl --header "$headers" -s https://api.github.com/repos/zricethezav/gitleaks/releases/tags/v${SECRETS_SUPPORTED_VERSION} | jq -r ".url"`
13
+ FILE=`curl --header "$headers" -s ${URL_REDIRECT} | jq -r "first(.assets[].name | select(test(\"$(uname -s)_$(arch)\"; \"i\") or test(\"$(uname -s)_x64\"; \"i\")))"`
14
+ fi
15
+ TMPDIR=$(mktemp -d)
16
+ curl -o ${TMPDIR}/${FILE} -JL https://github.com/zricethezav/gitleaks/releases/download/v${SECRETS_SUPPORTED_VERSION}/${FILE}
17
+ tar zxv -C /usr/local/bin -f ${TMPDIR}/${FILE} gitleaks
18
+ rm ${TMPDIR}/${FILE}
19
+ echo "Done installing gitleaks"
20
+ fi
21
+ echo " - Finding leaks in git log"
22
+ gitleaks detect -v --redact -c scripts/gitleaks/.gitleaks.toml
23
+ if [ $? -ne 0 ]; then
24
+ exit 1
25
+ fi
26
+ echo " - Finding leaks in local repo"
27
+ gitleaks detect --no-git -v --redact -c scripts/gitleaks/.gitleaks.toml
28
+ if [ $? -ne 0 ]; then
29
+ exit 1
30
+ fi
31
+ echo "- Secrets check passed sucessfully!"
32
+ }
33
+
34
+ lint_find_secrets
@@ -0,0 +1,20 @@
1
+ const { writeFile } = require('fs');
2
+ const { version } = require('./../../package.json');
3
+ const envFile = `export const environment = {
4
+ buildVersion: '${version}'
5
+ };
6
+ `;
7
+
8
+ console.log(
9
+ `Writing version ${version} to projects/angular-sdk/src/environment.ts`
10
+ );
11
+
12
+ writeFile('./projects/angular-sdk/src/environment.ts', envFile, function (err) {
13
+ if (err) {
14
+ console.error(err);
15
+ process.exit(1);
16
+ }
17
+ console.log(`Environment file updated with version: ${version}`);
18
+ });
19
+
20
+ console.log('Writing version done!');