@contrast/assess 1.20.0 → 1.20.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.
@@ -74,7 +74,7 @@ module.exports = function(core) {
74
74
  const event = createPropagationEvent({
75
75
  name,
76
76
  moduleName: 'String',
77
- methodName: 'prototype.slice',
77
+ methodName: 'prototype.split',
78
78
  context: `'${objInfo.value}'.split(${join(args.map(a => a.value), ', ')})`,
79
79
  history: [objInfo],
80
80
  object: {
@@ -42,28 +42,28 @@ module.exports = function (core) {
42
42
  } = data;
43
43
 
44
44
  if (!result.value) {
45
- logger.debug({ data }, SOURCE_EVENT_MSG, 'invalid result');
45
+ logger.debug({ name }, SOURCE_EVENT_MSG, 'invalid result');
46
46
  return null;
47
47
  }
48
48
 
49
49
  if (!name) {
50
- logger.debug({ data }, SOURCE_EVENT_MSG, 'invalid name');
50
+ logger.debug({ name }, SOURCE_EVENT_MSG, 'invalid name');
51
51
  return null;
52
52
  }
53
53
 
54
54
  if (!(inputType in InputType)) {
55
- logger.debug({ data }, SOURCE_EVENT_MSG, 'invalid inputType');
55
+ logger.debug({ name }, SOURCE_EVENT_MSG, 'invalid inputType');
56
56
  return null;
57
57
  }
58
58
 
59
59
  if (!tags) {
60
- logger.debug({ data }, SOURCE_EVENT_MSG, 'event has no tags');
60
+ logger.debug({ name }, SOURCE_EVENT_MSG, 'event has no tags');
61
61
  return null;
62
62
  }
63
63
 
64
64
 
65
65
  if (!stack || !Array.isArray(stack)) {
66
- logger.debug({ data }, SOURCE_EVENT_MSG, 'invalid stack');
66
+ logger.debug({ name }, SOURCE_EVENT_MSG, 'invalid stack');
67
67
  return null;
68
68
  }
69
69
 
@@ -94,32 +94,32 @@ module.exports = function (core) {
94
94
  const sourceContext = sources.getStore()?.assess;
95
95
 
96
96
  if (!sourceContext) {
97
- logger.debug({ data }, 'No sourceContext found during Propagation event creation');
97
+ logger.debug({ name }, 'No sourceContext found during Propagation event creation');
98
98
  return null;
99
99
  }
100
100
 
101
101
  if (sourceContext.propagationEventsCount >= config.assess.max_propagation_events) {
102
- logger.debug({ data }, 'Maximum number of Propagation events reached. Event not created');
102
+ logger.debug({ name }, 'Maximum number of Propagation events reached. Event not created');
103
103
  return null;
104
104
  }
105
105
 
106
106
  if (!name) {
107
- logger.debug({ data }, PROPAGATION_EVENT_MSG, 'invalid name');
107
+ logger.debug({ name }, PROPAGATION_EVENT_MSG, 'invalid name');
108
108
  return null;
109
109
  }
110
110
 
111
111
  if (!history.length) {
112
- logger.debug({ data }, PROPAGATION_EVENT_MSG, 'invalid history');
112
+ logger.debug({ name }, PROPAGATION_EVENT_MSG, 'invalid history');
113
113
  return null;
114
114
  }
115
115
 
116
116
  if (!source || !match(source, ANNOTATION_REGEX)) {
117
- logger.debug({ data }, PROPAGATION_EVENT_MSG, 'invalid source');
117
+ logger.debug({ name }, PROPAGATION_EVENT_MSG, 'invalid source');
118
118
  return null;
119
119
  }
120
120
 
121
121
  if (!target || !match(target, ANNOTATION_REGEX)) {
122
- logger.debug({ data }, PROPAGATION_EVENT_MSG, 'invalid target');
122
+ logger.debug({ name }, PROPAGATION_EVENT_MSG, 'invalid target');
123
123
  return null;
124
124
  }
125
125
 
@@ -171,21 +171,21 @@ module.exports = function (core) {
171
171
 
172
172
  const sourceContext = sources.getStore()?.assess;
173
173
  if (!sourceContext) {
174
- logger.debug({ data }, 'no sourceContext found during sink event creation');
174
+ logger.debug({ name }, 'no sourceContext found during sink event creation');
175
175
  return null;
176
176
  }
177
177
  if (!name) {
178
- logger.debug({ data }, 'no sink event name');
178
+ logger.debug({ name }, 'no sink event name');
179
179
  return null;
180
180
  }
181
181
  if (!history.length) {
182
- logger.debug({ data }, 'empty history for sink event');
182
+ logger.debug({ name }, 'empty history for sink event');
183
183
  return null;
184
184
  }
185
185
  if (
186
186
  (!source || !source.match(ANNOTATION_REGEX))
187
187
  ) {
188
- logger.debug({ data }, 'malformed or missing sink event source field');
188
+ logger.debug({ name }, 'malformed or missing sink event source field');
189
189
  return null;
190
190
  }
191
191
 
@@ -232,14 +232,14 @@ module.exports = function (core) {
232
232
  } = data;
233
233
 
234
234
  if (!name) {
235
- logger.debug({ data }, 'no sink event name');
235
+ logger.debug({ name }, 'no sink event name');
236
236
  return null;
237
237
  }
238
238
 
239
239
  if (
240
240
  (!source || !source.match(ANNOTATION_REGEX))
241
241
  ) {
242
- logger.debug({ data }, 'malformed or missing sink event source field');
242
+ logger.debug({ name }, 'malformed or missing sink event source field');
243
243
  return null;
244
244
  }
245
245
 
@@ -295,12 +295,12 @@ module.exports = function (core) {
295
295
  } = data;
296
296
 
297
297
  if (!name) {
298
- logger.debug({ data }, 'no sink event name');
298
+ logger.debug({ name }, 'no sink event name');
299
299
  return null;
300
300
  }
301
301
 
302
302
  if (!source || !source.match(ANNOTATION_REGEX)) {
303
- logger.debug({ data }, 'malformed or missing sink event source field');
303
+ logger.debug({ name }, 'malformed or missing sink event source field');
304
304
  return null;
305
305
  }
306
306
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/assess",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
4
4
  "description": "Contrast service providing framework-agnostic Assess support",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",