@contrast/agent 4.15.0 → 4.16.1
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.
- package/README.md +1 -1
- package/lib/assess/sinks/dynamo.js +87 -76
- package/lib/libraries.js +1 -1
- package/lib/protect/errors/handler-async-errors.js +1 -1
- package/lib/protect/service.js +11 -14
- package/lib/reporter/models/app-update/library.js +60 -6
- package/node_modules/moment/CHANGELOG.md +6 -0
- package/node_modules/moment/dist/locale/ar-kw.js +4 -3
- package/node_modules/moment/dist/locale/ar-ly.js +1 -1
- package/node_modules/moment/dist/locale/ar-ma.js +4 -3
- package/node_modules/moment/dist/locale/ar-sa.js +4 -3
- package/node_modules/moment/dist/locale/ar-tn.js +4 -3
- package/node_modules/moment/dist/locale/az.js +4 -3
- package/node_modules/moment/dist/locale/be.js +10 -9
- package/node_modules/moment/dist/locale/bn-bd.js +4 -3
- package/node_modules/moment/dist/locale/bn.js +4 -3
- package/node_modules/moment/dist/locale/bo.js +8 -6
- package/node_modules/moment/dist/locale/br.js +6 -3
- package/node_modules/moment/dist/locale/bs.js +4 -3
- package/node_modules/moment/dist/locale/ca.js +12 -9
- package/node_modules/moment/dist/locale/cs.js +15 -6
- package/node_modules/moment/dist/locale/cv.js +4 -3
- package/node_modules/moment/dist/locale/cy.js +4 -3
- package/node_modules/moment/dist/locale/de-at.js +6 -6
- package/node_modules/moment/dist/locale/de-ch.js +6 -6
- package/node_modules/moment/dist/locale/de.js +6 -6
- package/node_modules/moment/dist/locale/el.js +8 -6
- package/node_modules/moment/dist/locale/es-do.js +10 -6
- package/node_modules/moment/dist/locale/es-mx.js +10 -6
- package/node_modules/moment/dist/locale/es-us.js +10 -6
- package/node_modules/moment/dist/locale/es.js +10 -6
- package/node_modules/moment/dist/locale/et.js +6 -6
- package/node_modules/moment/dist/locale/eu.js +8 -6
- package/node_modules/moment/dist/locale/fa.js +12 -9
- package/node_modules/moment/dist/locale/fi.js +12 -9
- package/node_modules/moment/dist/locale/fo.js +4 -3
- package/node_modules/moment/dist/locale/fr-ca.js +4 -3
- package/node_modules/moment/dist/locale/fr-ch.js +4 -3
- package/node_modules/moment/dist/locale/fr.js +10 -6
- package/node_modules/moment/dist/locale/fy.js +4 -6
- package/node_modules/moment/dist/locale/gl.js +4 -3
- package/node_modules/moment/dist/locale/gom-deva.js +8 -6
- package/node_modules/moment/dist/locale/gom-latn.js +6 -6
- package/node_modules/moment/dist/locale/gu.js +4 -3
- package/node_modules/moment/dist/locale/he.js +4 -4
- package/node_modules/moment/dist/locale/hi.js +14 -10
- package/node_modules/moment/dist/locale/hr.js +7 -5
- package/node_modules/moment/dist/locale/hu.js +6 -6
- package/node_modules/moment/dist/locale/hy-am.js +8 -6
- package/node_modules/moment/dist/locale/is.js +4 -3
- package/node_modules/moment/dist/locale/ka.js +10 -10
- package/node_modules/moment/dist/locale/km.js +4 -3
- package/node_modules/moment/dist/locale/kn.js +4 -3
- package/node_modules/moment/dist/locale/ku.js +6 -6
- package/node_modules/moment/dist/locale/lb.js +8 -6
- package/node_modules/moment/dist/locale/lo.js +4 -3
- package/node_modules/moment/dist/locale/lt.js +8 -6
- package/node_modules/moment/dist/locale/lv.js +4 -3
- package/node_modules/moment/dist/locale/me.js +2 -3
- package/node_modules/moment/dist/locale/mi.js +4 -3
- package/node_modules/moment/dist/locale/ml.js +8 -6
- package/node_modules/moment/dist/locale/mn.js +4 -3
- package/node_modules/moment/dist/locale/mr.js +4 -3
- package/node_modules/moment/dist/locale/mt.js +4 -3
- package/node_modules/moment/dist/locale/nb.js +2 -3
- package/node_modules/moment/dist/locale/ne.js +4 -3
- package/node_modules/moment/dist/locale/nl-be.js +12 -12
- package/node_modules/moment/dist/locale/nl.js +12 -12
- package/node_modules/moment/dist/locale/nn.js +2 -3
- package/node_modules/moment/dist/locale/oc-lnc.js +8 -6
- package/node_modules/moment/dist/locale/pa-in.js +4 -3
- package/node_modules/moment/dist/locale/pl.js +10 -9
- package/node_modules/moment/dist/locale/pt-br.js +4 -3
- package/node_modules/moment/dist/locale/pt.js +4 -3
- package/node_modules/moment/dist/locale/ro.js +4 -3
- package/node_modules/moment/dist/locale/ru.js +20 -13
- package/node_modules/moment/dist/locale/se.js +6 -6
- package/node_modules/moment/dist/locale/si.js +4 -3
- package/node_modules/moment/dist/locale/sk.js +4 -3
- package/node_modules/moment/dist/locale/sl.js +4 -3
- package/node_modules/moment/dist/locale/sr-cyrl.js +32 -22
- package/node_modules/moment/dist/locale/sr.js +32 -22
- package/node_modules/moment/dist/locale/ss.js +4 -3
- package/node_modules/moment/dist/locale/sw.js +4 -3
- package/node_modules/moment/dist/locale/ta.js +8 -6
- package/node_modules/moment/dist/locale/te.js +8 -6
- package/node_modules/moment/dist/locale/tg.js +4 -3
- package/node_modules/moment/dist/locale/th.js +4 -3
- package/node_modules/moment/dist/locale/tlh.js +8 -9
- package/node_modules/moment/dist/locale/tr.js +1 -1
- package/node_modules/moment/dist/locale/tzm-latn.js +4 -3
- package/node_modules/moment/dist/locale/tzm.js +4 -3
- package/node_modules/moment/dist/locale/ug-cn.js +4 -3
- package/node_modules/moment/dist/locale/uk.js +16 -12
- package/node_modules/moment/dist/locale/uz-latn.js +4 -3
- package/node_modules/moment/dist/locale/vi.js +4 -3
- package/node_modules/moment/dist/locale/x-pseudo.js +8 -6
- package/node_modules/moment/dist/moment.js +95 -80
- package/node_modules/moment/locale/ar-kw.js +4 -3
- package/node_modules/moment/locale/ar-ly.js +1 -1
- package/node_modules/moment/locale/ar-ma.js +4 -3
- package/node_modules/moment/locale/ar-sa.js +4 -3
- package/node_modules/moment/locale/ar-tn.js +4 -3
- package/node_modules/moment/locale/az.js +4 -3
- package/node_modules/moment/locale/be.js +10 -9
- package/node_modules/moment/locale/bn-bd.js +4 -3
- package/node_modules/moment/locale/bn.js +4 -3
- package/node_modules/moment/locale/bo.js +8 -6
- package/node_modules/moment/locale/br.js +6 -3
- package/node_modules/moment/locale/bs.js +4 -3
- package/node_modules/moment/locale/ca.js +12 -9
- package/node_modules/moment/locale/cs.js +15 -6
- package/node_modules/moment/locale/cv.js +4 -3
- package/node_modules/moment/locale/cy.js +4 -3
- package/node_modules/moment/locale/de-at.js +6 -6
- package/node_modules/moment/locale/de-ch.js +6 -6
- package/node_modules/moment/locale/de.js +6 -6
- package/node_modules/moment/locale/el.js +8 -6
- package/node_modules/moment/locale/es-do.js +10 -6
- package/node_modules/moment/locale/es-mx.js +10 -6
- package/node_modules/moment/locale/es-us.js +10 -6
- package/node_modules/moment/locale/es.js +10 -6
- package/node_modules/moment/locale/et.js +6 -6
- package/node_modules/moment/locale/eu.js +8 -6
- package/node_modules/moment/locale/fa.js +12 -9
- package/node_modules/moment/locale/fi.js +12 -9
- package/node_modules/moment/locale/fo.js +4 -3
- package/node_modules/moment/locale/fr-ca.js +4 -3
- package/node_modules/moment/locale/fr-ch.js +4 -3
- package/node_modules/moment/locale/fr.js +10 -6
- package/node_modules/moment/locale/fy.js +4 -6
- package/node_modules/moment/locale/gl.js +4 -3
- package/node_modules/moment/locale/gom-deva.js +8 -6
- package/node_modules/moment/locale/gom-latn.js +6 -6
- package/node_modules/moment/locale/gu.js +4 -3
- package/node_modules/moment/locale/he.js +4 -4
- package/node_modules/moment/locale/hi.js +14 -10
- package/node_modules/moment/locale/hr.js +7 -5
- package/node_modules/moment/locale/hu.js +6 -6
- package/node_modules/moment/locale/hy-am.js +8 -6
- package/node_modules/moment/locale/is.js +4 -3
- package/node_modules/moment/locale/ka.js +10 -10
- package/node_modules/moment/locale/km.js +4 -3
- package/node_modules/moment/locale/kn.js +4 -3
- package/node_modules/moment/locale/ku.js +6 -6
- package/node_modules/moment/locale/lb.js +8 -6
- package/node_modules/moment/locale/lo.js +4 -3
- package/node_modules/moment/locale/lt.js +8 -6
- package/node_modules/moment/locale/lv.js +4 -3
- package/node_modules/moment/locale/me.js +2 -3
- package/node_modules/moment/locale/mi.js +4 -3
- package/node_modules/moment/locale/ml.js +8 -6
- package/node_modules/moment/locale/mn.js +4 -3
- package/node_modules/moment/locale/mr.js +4 -3
- package/node_modules/moment/locale/mt.js +4 -3
- package/node_modules/moment/locale/nb.js +2 -3
- package/node_modules/moment/locale/ne.js +4 -3
- package/node_modules/moment/locale/nl-be.js +12 -12
- package/node_modules/moment/locale/nl.js +12 -12
- package/node_modules/moment/locale/nn.js +2 -3
- package/node_modules/moment/locale/oc-lnc.js +8 -6
- package/node_modules/moment/locale/pa-in.js +4 -3
- package/node_modules/moment/locale/pl.js +10 -9
- package/node_modules/moment/locale/pt-br.js +4 -3
- package/node_modules/moment/locale/pt.js +4 -3
- package/node_modules/moment/locale/ro.js +4 -3
- package/node_modules/moment/locale/ru.js +20 -13
- package/node_modules/moment/locale/se.js +6 -6
- package/node_modules/moment/locale/si.js +4 -3
- package/node_modules/moment/locale/sk.js +4 -3
- package/node_modules/moment/locale/sl.js +4 -3
- package/node_modules/moment/locale/sr-cyrl.js +32 -22
- package/node_modules/moment/locale/sr.js +32 -22
- package/node_modules/moment/locale/ss.js +4 -3
- package/node_modules/moment/locale/sw.js +4 -3
- package/node_modules/moment/locale/ta.js +8 -6
- package/node_modules/moment/locale/te.js +8 -6
- package/node_modules/moment/locale/tg.js +4 -3
- package/node_modules/moment/locale/th.js +4 -3
- package/node_modules/moment/locale/tlh.js +8 -9
- package/node_modules/moment/locale/tr.js +1 -1
- package/node_modules/moment/locale/tzm-latn.js +4 -3
- package/node_modules/moment/locale/tzm.js +4 -3
- package/node_modules/moment/locale/ug-cn.js +4 -3
- package/node_modules/moment/locale/uk.js +16 -12
- package/node_modules/moment/locale/uz-latn.js +4 -3
- package/node_modules/moment/locale/vi.js +4 -3
- package/node_modules/moment/locale/x-pseudo.js +8 -6
- package/node_modules/moment/min/locales.js +613 -474
- package/node_modules/moment/min/locales.min.js +1 -1
- package/node_modules/moment/min/locales.min.js.map +1 -1
- package/node_modules/moment/min/moment-with-locales.js +707 -553
- package/node_modules/moment/min/moment-with-locales.min.js +1 -1
- package/node_modules/moment/min/moment-with-locales.min.js.map +1 -1
- package/node_modules/moment/min/moment.min.js +1 -1
- package/node_modules/moment/min/moment.min.js.map +1 -1
- package/node_modules/moment/moment.js +95 -80
- package/node_modules/moment/package.json +4 -4
- package/node_modules/moment/src/lib/create/from-string-and-array.js +4 -3
- package/node_modules/moment/src/lib/create/from-string-and-format.js +4 -3
- package/node_modules/moment/src/lib/create/from-string.js +11 -7
- package/node_modules/moment/src/lib/duration/create.js +2 -1
- package/node_modules/moment/src/lib/duration/valid.js +3 -2
- package/node_modules/moment/src/lib/format/format.js +2 -1
- package/node_modules/moment/src/lib/locale/locales.js +7 -1
- package/node_modules/moment/src/lib/moment/constructor.js +6 -3
- package/node_modules/moment/src/lib/moment/get-set.js +3 -2
- package/node_modules/moment/src/lib/parse/regex.js +8 -10
- package/node_modules/moment/src/lib/parse/token.js +4 -2
- package/node_modules/moment/src/lib/units/day-of-week.js +2 -3
- package/node_modules/moment/src/lib/units/era.js +10 -12
- package/node_modules/moment/src/lib/units/month.js +6 -6
- package/node_modules/moment/src/lib/units/week-year.js +6 -8
- package/node_modules/moment/src/lib/units/week.js +6 -8
- package/node_modules/moment/src/lib/utils/deprecate.js +3 -2
- package/node_modules/moment/src/lib/utils/is-moment-input.js +3 -2
- package/node_modules/moment/src/lib/utils/map.js +3 -2
- package/node_modules/moment/src/locale/ar-kw.js +4 -3
- package/node_modules/moment/src/locale/ar-ly.js +1 -1
- package/node_modules/moment/src/locale/ar-ma.js +4 -3
- package/node_modules/moment/src/locale/ar-sa.js +4 -3
- package/node_modules/moment/src/locale/ar-tn.js +4 -3
- package/node_modules/moment/src/locale/az.js +4 -3
- package/node_modules/moment/src/locale/be.js +10 -9
- package/node_modules/moment/src/locale/bn-bd.js +4 -3
- package/node_modules/moment/src/locale/bn.js +4 -3
- package/node_modules/moment/src/locale/bo.js +8 -6
- package/node_modules/moment/src/locale/br.js +6 -3
- package/node_modules/moment/src/locale/bs.js +4 -3
- package/node_modules/moment/src/locale/ca.js +12 -9
- package/node_modules/moment/src/locale/cs.js +15 -6
- package/node_modules/moment/src/locale/cv.js +4 -3
- package/node_modules/moment/src/locale/cy.js +4 -3
- package/node_modules/moment/src/locale/de-at.js +6 -6
- package/node_modules/moment/src/locale/de-ch.js +6 -6
- package/node_modules/moment/src/locale/de.js +6 -6
- package/node_modules/moment/src/locale/el.js +8 -6
- package/node_modules/moment/src/locale/es-do.js +10 -6
- package/node_modules/moment/src/locale/es-mx.js +10 -6
- package/node_modules/moment/src/locale/es-us.js +10 -6
- package/node_modules/moment/src/locale/es.js +10 -6
- package/node_modules/moment/src/locale/et.js +6 -6
- package/node_modules/moment/src/locale/eu.js +8 -6
- package/node_modules/moment/src/locale/fa.js +12 -9
- package/node_modules/moment/src/locale/fi.js +12 -9
- package/node_modules/moment/src/locale/fo.js +4 -3
- package/node_modules/moment/src/locale/fr-ca.js +4 -3
- package/node_modules/moment/src/locale/fr-ch.js +4 -3
- package/node_modules/moment/src/locale/fr.js +10 -6
- package/node_modules/moment/src/locale/fy.js +4 -6
- package/node_modules/moment/src/locale/gl.js +4 -3
- package/node_modules/moment/src/locale/gom-deva.js +8 -6
- package/node_modules/moment/src/locale/gom-latn.js +6 -6
- package/node_modules/moment/src/locale/gu.js +4 -3
- package/node_modules/moment/src/locale/he.js +4 -4
- package/node_modules/moment/src/locale/hi.js +14 -10
- package/node_modules/moment/src/locale/hr.js +7 -5
- package/node_modules/moment/src/locale/hu.js +6 -6
- package/node_modules/moment/src/locale/hy-am.js +8 -6
- package/node_modules/moment/src/locale/is.js +4 -3
- package/node_modules/moment/src/locale/ka.js +10 -10
- package/node_modules/moment/src/locale/km.js +4 -3
- package/node_modules/moment/src/locale/kn.js +4 -3
- package/node_modules/moment/src/locale/ku.js +6 -6
- package/node_modules/moment/src/locale/lb.js +8 -6
- package/node_modules/moment/src/locale/lo.js +4 -3
- package/node_modules/moment/src/locale/lt.js +8 -6
- package/node_modules/moment/src/locale/lv.js +4 -3
- package/node_modules/moment/src/locale/me.js +2 -3
- package/node_modules/moment/src/locale/mi.js +4 -3
- package/node_modules/moment/src/locale/ml.js +8 -6
- package/node_modules/moment/src/locale/mn.js +4 -3
- package/node_modules/moment/src/locale/mr.js +4 -3
- package/node_modules/moment/src/locale/mt.js +4 -3
- package/node_modules/moment/src/locale/nb.js +2 -3
- package/node_modules/moment/src/locale/ne.js +4 -3
- package/node_modules/moment/src/locale/nl-be.js +12 -12
- package/node_modules/moment/src/locale/nl.js +12 -12
- package/node_modules/moment/src/locale/nn.js +2 -3
- package/node_modules/moment/src/locale/oc-lnc.js +8 -6
- package/node_modules/moment/src/locale/pa-in.js +4 -3
- package/node_modules/moment/src/locale/pl.js +10 -9
- package/node_modules/moment/src/locale/pt-br.js +4 -3
- package/node_modules/moment/src/locale/pt.js +4 -3
- package/node_modules/moment/src/locale/ro.js +4 -3
- package/node_modules/moment/src/locale/ru.js +20 -13
- package/node_modules/moment/src/locale/se.js +6 -6
- package/node_modules/moment/src/locale/si.js +4 -3
- package/node_modules/moment/src/locale/sk.js +4 -3
- package/node_modules/moment/src/locale/sl.js +4 -3
- package/node_modules/moment/src/locale/sr-cyrl.js +32 -22
- package/node_modules/moment/src/locale/sr.js +32 -22
- package/node_modules/moment/src/locale/ss.js +4 -3
- package/node_modules/moment/src/locale/sw.js +4 -3
- package/node_modules/moment/src/locale/ta.js +8 -6
- package/node_modules/moment/src/locale/te.js +8 -6
- package/node_modules/moment/src/locale/tg.js +4 -3
- package/node_modules/moment/src/locale/th.js +4 -3
- package/node_modules/moment/src/locale/tlh.js +8 -9
- package/node_modules/moment/src/locale/tr.js +1 -1
- package/node_modules/moment/src/locale/tzm-latn.js +4 -3
- package/node_modules/moment/src/locale/tzm.js +4 -3
- package/node_modules/moment/src/locale/ug-cn.js +4 -3
- package/node_modules/moment/src/locale/uk.js +16 -12
- package/node_modules/moment/src/locale/uz-latn.js +4 -3
- package/node_modules/moment/src/locale/vi.js +4 -3
- package/node_modules/moment/src/locale/x-pseudo.js +8 -6
- package/node_modules/moment/src/moment.js +2 -2
- package/node_modules/moment/ts3.1-typings/moment.d.ts +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -108,4 +108,4 @@ api:
|
|
|
108
108
|
| api.service_key | Contrast user account service key |
|
|
109
109
|
| api.url | Address of the Contrast installation you would like your agent to report to |
|
|
110
110
|
|
|
111
|
-
For detailed installation and configuration instructions, see the [Node.js Agent documentation](https://docs.contrastsecurity.com/
|
|
111
|
+
For detailed installation and configuration instructions, see the [Node.js Agent documentation](https://docs.contrastsecurity.com/en/install-node-js.html).
|
|
@@ -26,34 +26,38 @@ const disallowedTags = [
|
|
|
26
26
|
'string-type-checked',
|
|
27
27
|
];
|
|
28
28
|
const requiredTags = ['untrusted'];
|
|
29
|
-
const moduleName = 'aws-sdk';
|
|
30
|
-
const moduleNameV3 = '@aws-sdk/client-dynamodb';
|
|
31
|
-
const relevantKeys = {
|
|
32
|
-
v2: ['ExpressionAttributeValues', 'ExclusiveStartKey', 'ScanFilter'],
|
|
33
|
-
v3: [
|
|
34
|
-
'ComparisonOperator',
|
|
35
|
-
'FilterExpression',
|
|
36
|
-
'ProjectionExpression',
|
|
37
|
-
'ScanFilter',
|
|
38
|
-
],
|
|
39
|
-
};
|
|
40
|
-
const requests = new WeakSet();
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
/*
|
|
31
|
+
* Schema of attributes the Node Agent is looking for user-controlled data
|
|
32
|
+
* The only exception to the rule so far is the ScanFilter in ScanCommand.
|
|
33
|
+
* It has nested schema too. So far we are only reporting a NoSQL Injection
|
|
34
|
+
* if ComparisonOperator within the ScanFilter is user-controlled.
|
|
35
|
+
* ScanFilter is handled individually in extractValues function
|
|
36
|
+
* */
|
|
37
|
+
const trackSchemaCommands = {
|
|
38
|
+
'scan': {
|
|
39
|
+
attributes: [
|
|
40
|
+
'ExpressionAttributeValues',
|
|
41
|
+
'ExclusiveStartKey',
|
|
42
|
+
'ScanFilter'
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
'executeStatement': { attributes: ['Statement'] },
|
|
46
|
+
'ScanCommand': {
|
|
47
|
+
attributes: [
|
|
48
|
+
'ComparisonOperator',
|
|
49
|
+
'FilterExpression',
|
|
50
|
+
'ProjectionExpression',
|
|
51
|
+
'ScanFilter',
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
'ExecuteStatementCommand': {
|
|
55
|
+
attributes: ['Statement']
|
|
56
|
+
}
|
|
55
57
|
};
|
|
56
58
|
|
|
59
|
+
const requests = new WeakSet();
|
|
60
|
+
|
|
57
61
|
/**
|
|
58
62
|
* Extracts all values from either a dynamo document client or client
|
|
59
63
|
*
|
|
@@ -62,44 +66,25 @@ const dataTypes = {
|
|
|
62
66
|
* @param {string} version DynamoDB SDK version
|
|
63
67
|
* @return {Array} all string values from payload
|
|
64
68
|
*/
|
|
65
|
-
function extractValues(payload = {}
|
|
69
|
+
function extractValues(command, payload = {}) {
|
|
66
70
|
return _.flatten(
|
|
67
|
-
|
|
68
|
-
if (payload[key]
|
|
71
|
+
trackSchemaCommands[command].attributes.map((key) => {
|
|
72
|
+
if (payload[key] == undefined) return;
|
|
69
73
|
if (typeof payload[key] === 'string') return payload[key];
|
|
74
|
+
|
|
75
|
+
// ScanFilter is an exception. It is almost safe for any nested attribute
|
|
76
|
+
if (key === 'ScanFilter') {
|
|
77
|
+
// collect the values from ComparisonOperator attributes ONLY
|
|
78
|
+
return getComparisonValues(payload[key]);
|
|
79
|
+
}
|
|
80
|
+
|
|
70
81
|
const values = _.values(payload[key]);
|
|
71
|
-
const extractionMethod =
|
|
72
|
-
mode === 'client' ? findTypedValues.bind(this) : findValues.bind(this);
|
|
82
|
+
const extractionMethod = findValues.bind(this);
|
|
73
83
|
return _.flattenDeep(extractionMethod(values));
|
|
74
84
|
}),
|
|
75
85
|
);
|
|
76
86
|
}
|
|
77
87
|
|
|
78
|
-
/**
|
|
79
|
-
* Extracts all strings from a dynamo client payload
|
|
80
|
-
* Note: Each key is typed so we need to properly extract keys based on AttributeValue types
|
|
81
|
-
*
|
|
82
|
-
* @param {Object} values for all keys in ExpressionAttributeValues, ExclusiveStartKey or ScanFilter
|
|
83
|
-
* @return {Array} all values
|
|
84
|
-
*/
|
|
85
|
-
function findTypedValues(values) {
|
|
86
|
-
return _.map(values, (value) => {
|
|
87
|
-
const [type] = Object.keys(value);
|
|
88
|
-
switch (dataTypes[type]) {
|
|
89
|
-
case 'value':
|
|
90
|
-
return value[type];
|
|
91
|
-
case 'array':
|
|
92
|
-
return _.values(value[type]);
|
|
93
|
-
case 'object': {
|
|
94
|
-
const values = _.values(value[type]);
|
|
95
|
-
return findTypedValues(values);
|
|
96
|
-
}
|
|
97
|
-
case 'collection':
|
|
98
|
-
return findTypedValues(value[type]);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
88
|
/**
|
|
104
89
|
* We only track strings. some data types
|
|
105
90
|
* can contain strings as keys or values but
|
|
@@ -139,6 +124,27 @@ function findValues(values) {
|
|
|
139
124
|
});
|
|
140
125
|
}
|
|
141
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Check if key exists in ScanFilter bject and return the value if so
|
|
129
|
+
* Each element of ScanFilter is an object with predictable structure
|
|
130
|
+
* "Genre": {
|
|
131
|
+
* "AttributeValueList":[ {"S":"Rock"} ],
|
|
132
|
+
* "ComparisonOperator": "EQ"
|
|
133
|
+
* }
|
|
134
|
+
*
|
|
135
|
+
* @param {Object} values for all keys in a given payload
|
|
136
|
+
* @param {String} key name we are looking the value of
|
|
137
|
+
* @return {Any} if value is found for a given key
|
|
138
|
+
*/
|
|
139
|
+
const getComparisonValues = (obj) => Object.keys(obj).map(field => {
|
|
140
|
+
if (typeof obj[field] === 'object' && Object.prototype.hasOwnProperty.call(
|
|
141
|
+
obj[field],
|
|
142
|
+
'ComparisonOperator'
|
|
143
|
+
)) {
|
|
144
|
+
return obj[field].ComparisonOperator;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
142
148
|
module.exports = ({ common }) => {
|
|
143
149
|
const { isVulnerable, report } = common;
|
|
144
150
|
|
|
@@ -147,11 +153,11 @@ module.exports = ({ common }) => {
|
|
|
147
153
|
* Registers the hooks for client and document client scan
|
|
148
154
|
*/
|
|
149
155
|
dynamoSink.handle = function () {
|
|
150
|
-
moduleHook.resolve({ name:
|
|
156
|
+
moduleHook.resolve({ name: 'aws-sdk' }, (aws) => {
|
|
151
157
|
const client = aws.DynamoDB.prototype;
|
|
152
158
|
|
|
153
159
|
patcher.patch(client, 'makeRequest', {
|
|
154
|
-
name:
|
|
160
|
+
name: 'aws-sdk.DynamoDB.prototype',
|
|
155
161
|
patchType: PATCH_TYPES.ASSESS_SINK,
|
|
156
162
|
alwaysRun: true,
|
|
157
163
|
post(data) {
|
|
@@ -163,7 +169,8 @@ module.exports = ({ common }) => {
|
|
|
163
169
|
if (!AsyncStorage.getContext()) {
|
|
164
170
|
return;
|
|
165
171
|
}
|
|
166
|
-
|
|
172
|
+
|
|
173
|
+
if (Object.keys(trackSchemaCommands).includes(data.args[0]) && data.args[1]) {
|
|
167
174
|
if (requests.has(data.args[1])) {
|
|
168
175
|
return;
|
|
169
176
|
}
|
|
@@ -176,10 +183,10 @@ module.exports = ({ common }) => {
|
|
|
176
183
|
result: data.result,
|
|
177
184
|
};
|
|
178
185
|
|
|
179
|
-
const values = extractValues(data.args[
|
|
186
|
+
const values = extractValues(data.args[0], data.args[1]);
|
|
180
187
|
dynamoSink.check({
|
|
181
188
|
values,
|
|
182
|
-
methodName:
|
|
189
|
+
methodName: `DynamoDB.prototype.${data.args[0]}`,
|
|
183
190
|
data: ctxtData,
|
|
184
191
|
});
|
|
185
192
|
}
|
|
@@ -198,7 +205,7 @@ module.exports = ({ common }) => {
|
|
|
198
205
|
name: 'aws-sdk.DynamoDB.DocumentClient.prototype',
|
|
199
206
|
patchType: PATCH_TYPES.ASSESS_SINK,
|
|
200
207
|
pre(data) {
|
|
201
|
-
if (data.args[0] === 'scan') {
|
|
208
|
+
if (data.args[0] === 'scan' && data.args[1]) {
|
|
202
209
|
requests.add(data.args[1]);
|
|
203
210
|
}
|
|
204
211
|
},
|
|
@@ -208,7 +215,7 @@ module.exports = ({ common }) => {
|
|
|
208
215
|
name: 'aws-sdk.DynamoDB.DocumentClient.prototype',
|
|
209
216
|
patchType: PATCH_TYPES.ASSESS_SINK,
|
|
210
217
|
post(data) {
|
|
211
|
-
const values = extractValues(data.args[0]
|
|
218
|
+
const values = extractValues('scan', data.args[0]);
|
|
212
219
|
dynamoSink.check({
|
|
213
220
|
values,
|
|
214
221
|
methodName: 'DynamoDB.DocumentClient.prototype.scan',
|
|
@@ -219,27 +226,31 @@ module.exports = ({ common }) => {
|
|
|
219
226
|
}
|
|
220
227
|
});
|
|
221
228
|
|
|
222
|
-
moduleHook.resolve({ name:
|
|
229
|
+
moduleHook.resolve({ name: '@aws-sdk/client-dynamodb' }, (aws) => {
|
|
223
230
|
const client = aws.DynamoDBClient.prototype;
|
|
224
231
|
|
|
225
232
|
patcher.patch(client, 'send', {
|
|
226
|
-
name:
|
|
233
|
+
name: '@aws-sdk/client-dynamodb.ScanCommand.prototype',
|
|
227
234
|
patchType: PATCH_TYPES.ASSESS_SINK,
|
|
228
235
|
alwaysRun: true,
|
|
229
236
|
post(data) {
|
|
230
237
|
if (!AsyncStorage.getContext()) return;
|
|
231
238
|
|
|
232
|
-
if (data.args[0]
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
if (data.args[0] && data.args[0].constructor && data.args[0].input) {
|
|
240
|
+
const sendCommand = data.args[0].constructor.name;
|
|
241
|
+
|
|
242
|
+
if (Object.keys(trackSchemaCommands).includes(sendCommand)) {
|
|
243
|
+
const values = extractValues(
|
|
244
|
+
sendCommand,
|
|
245
|
+
data.args[0].input
|
|
246
|
+
).filter(Boolean);
|
|
247
|
+
|
|
248
|
+
dynamoSink.check({
|
|
249
|
+
data,
|
|
250
|
+
values,
|
|
251
|
+
methodName: `DynamoDBClient.${sendCommand}`,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
243
254
|
}
|
|
244
255
|
},
|
|
245
256
|
});
|
|
@@ -257,7 +268,7 @@ module.exports = ({ common }) => {
|
|
|
257
268
|
|
|
258
269
|
if (vulnerableString.length) {
|
|
259
270
|
const ctxt = new CallContext(data);
|
|
260
|
-
const signature = new Signature({ moduleName, methodName });
|
|
271
|
+
const signature = new Signature({ moduleName: 'aws-sdk', methodName });
|
|
261
272
|
report({ ruleId, signature, input: vulnerableString[0], ctxt });
|
|
262
273
|
}
|
|
263
274
|
};
|
package/lib/libraries.js
CHANGED
|
@@ -124,7 +124,7 @@ const getLibInfo = async (agent, eluEnabled) =>
|
|
|
124
124
|
|
|
125
125
|
if (!nodeModsPath) {
|
|
126
126
|
logger.error(
|
|
127
|
-
|
|
127
|
+
'unable to read installed dependencies because a node_modules directory could not be detected given a package.json located at %s - use the agent.node.app_root configuration variable if installed in non-standard location',
|
|
128
128
|
agent.appInfo.path
|
|
129
129
|
);
|
|
130
130
|
return AppUpdate.libraries;
|
|
@@ -57,7 +57,7 @@ module.exports.install = function() {
|
|
|
57
57
|
handledErrors.add(error);
|
|
58
58
|
} else {
|
|
59
59
|
console.warn(
|
|
60
|
-
|
|
60
|
+
'An Unhandled Rejection has been found in the instrumented code:\n%s', error
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
}
|
package/lib/protect/service.js
CHANGED
|
@@ -198,7 +198,6 @@ class ProtectService {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
const arg = {
|
|
201
|
-
rules,
|
|
202
201
|
// header names must be lowercase. should this be done in agent-lib?
|
|
203
202
|
headers: req.rawHeaders.map((h, ix) => (ix & 1 ? h : h.toLowerCase()))
|
|
204
203
|
};
|
|
@@ -208,7 +207,7 @@ class ProtectService {
|
|
|
208
207
|
arg.queries = req.url.slice(questionMark + 1);
|
|
209
208
|
}
|
|
210
209
|
|
|
211
|
-
const findings = this.agentLib.scoreRequestConnect(arg, evalOptions);
|
|
210
|
+
const findings = this.agentLib.scoreRequestConnect(rules, arg, evalOptions);
|
|
212
211
|
|
|
213
212
|
return findings;
|
|
214
213
|
}
|
|
@@ -813,9 +812,9 @@ class ProtectService {
|
|
|
813
812
|
// for each key, check out the value. the key is set in the code so
|
|
814
813
|
// is not vulnerable.
|
|
815
814
|
for (const key in params) {
|
|
816
|
-
// items from scoreAtom()
|
|
815
|
+
// items from scoreAtom() return only [{ruleId, score}, ...] because the key
|
|
817
816
|
// and inputType are already known and there is no path.
|
|
818
|
-
const items = this.agentLib.scoreAtom(params[key], type
|
|
817
|
+
const items = this.agentLib.scoreAtom(libRules, params[key], type);
|
|
819
818
|
if (!items) {
|
|
820
819
|
continue;
|
|
821
820
|
}
|
|
@@ -865,7 +864,7 @@ class ProtectService {
|
|
|
865
864
|
const filenames = Object.keys(event.data);
|
|
866
865
|
|
|
867
866
|
for (const filename of filenames) {
|
|
868
|
-
const items = this.agentLib.scoreAtom(filename, type
|
|
867
|
+
const items = this.agentLib.scoreAtom(libRules, filename, type);
|
|
869
868
|
if (!items) {
|
|
870
869
|
continue;
|
|
871
870
|
}
|
|
@@ -899,12 +898,9 @@ class ProtectService {
|
|
|
899
898
|
queries.unshift(...q); return queries;
|
|
900
899
|
}, []);
|
|
901
900
|
|
|
902
|
-
const arg = {
|
|
903
|
-
rules: rulesMask,
|
|
904
|
-
queries,
|
|
905
|
-
};
|
|
901
|
+
const arg = { queries };
|
|
906
902
|
|
|
907
|
-
const findings = this.agentLib.scoreRequestConnect(arg, evalOptions);
|
|
903
|
+
const findings = this.agentLib.scoreRequestConnect(rulesMask, arg, evalOptions);
|
|
908
904
|
|
|
909
905
|
this.handleAgentLibAnalysis({
|
|
910
906
|
asyncStorageContext: event._ctxt,
|
|
@@ -920,8 +916,9 @@ class ProtectService {
|
|
|
920
916
|
acc.unshift(key, value);
|
|
921
917
|
return acc;
|
|
922
918
|
}, []);
|
|
923
|
-
const
|
|
924
|
-
const
|
|
919
|
+
const rulesMask = this.getRulesMask(rules);
|
|
920
|
+
const arg = { cookies };
|
|
921
|
+
const findings = this.agentLib.scoreRequestConnect(rulesMask, arg, evalOptions);
|
|
925
922
|
this.handleAgentLibAnalysis({
|
|
926
923
|
asyncStorageContext: event._ctxt,
|
|
927
924
|
appContext: {},
|
|
@@ -1136,7 +1133,7 @@ class ProtectService {
|
|
|
1136
1133
|
* @param {Rule[]} rules Rules from which to build findings
|
|
1137
1134
|
* @returns {Object[]} The findings from the rules
|
|
1138
1135
|
*/
|
|
1139
|
-
createFindings(rules, samples) {
|
|
1136
|
+
createFindings(rules = [], samples) {
|
|
1140
1137
|
const findings = [];
|
|
1141
1138
|
const speedracer = this.reporter.speedracer &&
|
|
1142
1139
|
this.config.agent.node.speedracer_input_analysis;
|
|
@@ -1167,7 +1164,7 @@ class ProtectService {
|
|
|
1167
1164
|
const { _type, _value: input } = finding.sample.input;
|
|
1168
1165
|
const type = this.agentLib.InputType[_type];
|
|
1169
1166
|
|
|
1170
|
-
const alFinding = this.agentLib.scoreAtom(input, type
|
|
1167
|
+
const alFinding = this.agentLib.scoreAtom(agentLibBit, input, type);
|
|
1171
1168
|
if (!alFinding) {
|
|
1172
1169
|
return false;
|
|
1173
1170
|
}
|
|
@@ -13,9 +13,10 @@ Copyright: 2022 Contrast Security, Inc
|
|
|
13
13
|
way not consistent with the End User License Agreement.
|
|
14
14
|
*/
|
|
15
15
|
'use strict';
|
|
16
|
-
const readdir = require('recursive-readdir');
|
|
17
16
|
const LibraryManifest = require('./library-manifest');
|
|
18
17
|
const logger = require('../../../core/logger')('contrast:libraries');
|
|
18
|
+
const fs = require('fs');
|
|
19
|
+
const pathModule = require('path');
|
|
19
20
|
|
|
20
21
|
module.exports = class Library {
|
|
21
22
|
/**
|
|
@@ -53,7 +54,7 @@ module.exports = class Library {
|
|
|
53
54
|
manifest: this.manifest.toSerializable(),
|
|
54
55
|
usedClassCount: 0,
|
|
55
56
|
classCount: this.fileCount,
|
|
56
|
-
tags: this.tags
|
|
57
|
+
tags: this.tags,
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
60
|
|
|
@@ -88,15 +89,68 @@ module.exports = class Library {
|
|
|
88
89
|
);
|
|
89
90
|
}
|
|
90
91
|
|
|
92
|
+
readdir(path, callback) {
|
|
93
|
+
if (!callback) {
|
|
94
|
+
return new Promise((resolve, reject) => {
|
|
95
|
+
this.readdir(path, (err, data) => {
|
|
96
|
+
if (err) {
|
|
97
|
+
reject(err);
|
|
98
|
+
} else {
|
|
99
|
+
resolve(data);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
let list = [];
|
|
106
|
+
|
|
107
|
+
fs.readdir(path, (err, files) => {
|
|
108
|
+
if (err) {
|
|
109
|
+
return callback(err);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let pending = files.length;
|
|
113
|
+
if (!pending) {
|
|
114
|
+
return callback(null, list);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
files.forEach((file) => {
|
|
118
|
+
const filePath = pathModule.join(path, file);
|
|
119
|
+
fs.stat(filePath, (_err, stats) => {
|
|
120
|
+
if (_err) {
|
|
121
|
+
return callback(_err);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (stats.isDirectory() && !filePath.endsWith('/node_modules')) {
|
|
125
|
+
this.readdir(filePath, (__err, res) => {
|
|
126
|
+
if (__err) {
|
|
127
|
+
return callback(__err);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
list = list.concat(res);
|
|
131
|
+
pending -= 1;
|
|
132
|
+
if (!pending) {
|
|
133
|
+
return callback(null, list);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
} else {
|
|
137
|
+
list.push(filePath);
|
|
138
|
+
pending -= 1;
|
|
139
|
+
if (!pending) {
|
|
140
|
+
return callback(null, list);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
91
148
|
/**
|
|
92
149
|
* Counts all the valid files in a module directory
|
|
93
150
|
*/
|
|
94
151
|
getComposition() {
|
|
95
152
|
// ignore nested node_modules
|
|
96
|
-
return readdir(this._path
|
|
97
|
-
`${this._path}/node_modules/*`,
|
|
98
|
-
`${this._path}/*/node_modules/*`
|
|
99
|
-
])
|
|
153
|
+
return this.readdir(this._path)
|
|
100
154
|
.then((files) => {
|
|
101
155
|
this.fileCount = files.filter((file) =>
|
|
102
156
|
Library.applicableFile(file)
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
### 2.29.2 [See full changelog](https://gist.github.com/ichernev/1904b564f6679d9aac1ae08ce13bc45c)
|
|
5
|
+
|
|
6
|
+
* Release Apr 3 2022
|
|
7
|
+
|
|
8
|
+
Address https://github.com/advisories/GHSA-8hfj-j24r-96c4
|
|
9
|
+
|
|
4
10
|
### 2.29.1 [See full changelog](https://gist.github.com/marwahaha/cc478ba01a1292ab4bd4e861d164d99b)
|
|
5
11
|
|
|
6
12
|
* Release Oct 6, 2020
|
|
@@ -8,9 +8,10 @@ export default moment.defineLocale('ar-kw', {
|
|
|
8
8
|
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
|
9
9
|
'_'
|
|
10
10
|
),
|
|
11
|
-
monthsShort:
|
|
12
|
-
'_'
|
|
13
|
-
|
|
11
|
+
monthsShort:
|
|
12
|
+
'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
|
13
|
+
'_'
|
|
14
|
+
),
|
|
14
15
|
weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
|
15
16
|
weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
|
|
16
17
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
|
@@ -9,9 +9,10 @@ export default moment.defineLocale('ar-ma', {
|
|
|
9
9
|
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
|
10
10
|
'_'
|
|
11
11
|
),
|
|
12
|
-
monthsShort:
|
|
13
|
-
'_'
|
|
14
|
-
|
|
12
|
+
monthsShort:
|
|
13
|
+
'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
|
|
14
|
+
'_'
|
|
15
|
+
),
|
|
15
16
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
|
16
17
|
weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
|
|
17
18
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
|
@@ -33,9 +33,10 @@ export default moment.defineLocale('ar-sa', {
|
|
|
33
33
|
months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
|
34
34
|
'_'
|
|
35
35
|
),
|
|
36
|
-
monthsShort:
|
|
37
|
-
'_'
|
|
38
|
-
|
|
36
|
+
monthsShort:
|
|
37
|
+
'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
|
38
|
+
'_'
|
|
39
|
+
),
|
|
39
40
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
|
40
41
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
|
41
42
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
|
@@ -8,9 +8,10 @@ export default moment.defineLocale('ar-tn', {
|
|
|
8
8
|
months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
|
9
9
|
'_'
|
|
10
10
|
),
|
|
11
|
-
monthsShort:
|
|
12
|
-
'_'
|
|
13
|
-
|
|
11
|
+
monthsShort:
|
|
12
|
+
'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
|
|
13
|
+
'_'
|
|
14
|
+
),
|
|
14
15
|
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
|
|
15
16
|
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
|
|
16
17
|
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
|
|
@@ -30,9 +30,10 @@ export default moment.defineLocale('az', {
|
|
|
30
30
|
'_'
|
|
31
31
|
),
|
|
32
32
|
monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
|
|
33
|
-
weekdays:
|
|
34
|
-
'_'
|
|
35
|
-
|
|
33
|
+
weekdays:
|
|
34
|
+
'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
|
|
35
|
+
'_'
|
|
36
|
+
),
|
|
36
37
|
weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
|
|
37
38
|
weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
|
|
38
39
|
weekdaysParseExact: true,
|
|
@@ -37,20 +37,21 @@ export default moment.defineLocale('be', {
|
|
|
37
37
|
format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
|
|
38
38
|
'_'
|
|
39
39
|
),
|
|
40
|
-
standalone:
|
|
41
|
-
'_'
|
|
42
|
-
|
|
40
|
+
standalone:
|
|
41
|
+
'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
|
|
42
|
+
'_'
|
|
43
|
+
),
|
|
43
44
|
},
|
|
44
|
-
monthsShort:
|
|
45
|
-
'_'
|
|
46
|
-
),
|
|
45
|
+
monthsShort:
|
|
46
|
+
'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
|
|
47
47
|
weekdays: {
|
|
48
48
|
format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
|
|
49
49
|
'_'
|
|
50
50
|
),
|
|
51
|
-
standalone:
|
|
52
|
-
'_'
|
|
53
|
-
|
|
51
|
+
standalone:
|
|
52
|
+
'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
|
|
53
|
+
'_'
|
|
54
|
+
),
|
|
54
55
|
isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
|
|
55
56
|
},
|
|
56
57
|
weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
|
|
@@ -33,9 +33,10 @@ export default moment.defineLocale('bn-bd', {
|
|
|
33
33
|
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
|
|
34
34
|
'_'
|
|
35
35
|
),
|
|
36
|
-
monthsShort:
|
|
37
|
-
'_'
|
|
38
|
-
|
|
36
|
+
monthsShort:
|
|
37
|
+
'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
|
|
38
|
+
'_'
|
|
39
|
+
),
|
|
39
40
|
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
|
|
40
41
|
'_'
|
|
41
42
|
),
|
|
@@ -33,9 +33,10 @@ export default moment.defineLocale('bn', {
|
|
|
33
33
|
months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
|
|
34
34
|
'_'
|
|
35
35
|
),
|
|
36
|
-
monthsShort:
|
|
37
|
-
'_'
|
|
38
|
-
|
|
36
|
+
monthsShort:
|
|
37
|
+
'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
|
|
38
|
+
'_'
|
|
39
|
+
),
|
|
39
40
|
weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
|
|
40
41
|
'_'
|
|
41
42
|
),
|
|
@@ -33,14 +33,16 @@ export default moment.defineLocale('bo', {
|
|
|
33
33
|
months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
|
|
34
34
|
'_'
|
|
35
35
|
),
|
|
36
|
-
monthsShort:
|
|
37
|
-
'
|
|
38
|
-
|
|
36
|
+
monthsShort:
|
|
37
|
+
'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
|
|
38
|
+
'_'
|
|
39
|
+
),
|
|
39
40
|
monthsShortRegex: /^(ཟླ་\d{1,2})/,
|
|
40
41
|
monthsParseExact: true,
|
|
41
|
-
weekdays:
|
|
42
|
-
'_'
|
|
43
|
-
|
|
42
|
+
weekdays:
|
|
43
|
+
'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
|
|
44
|
+
'_'
|
|
45
|
+
),
|
|
44
46
|
weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
|
|
45
47
|
'_'
|
|
46
48
|
),
|
|
@@ -62,9 +62,12 @@ var monthsParse = [
|
|
|
62
62
|
/^du/i,
|
|
63
63
|
/^ker/i,
|
|
64
64
|
],
|
|
65
|
-
monthsRegex =
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
monthsRegex =
|
|
66
|
+
/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
|
|
67
|
+
monthsStrictRegex =
|
|
68
|
+
/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
|
|
69
|
+
monthsShortStrictRegex =
|
|
70
|
+
/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
|
|
68
71
|
fullWeekdaysParse = [
|
|
69
72
|
/^sul/i,
|
|
70
73
|
/^lun/i,
|