slnodejs 6.1.461 → 6.1.466

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 (27) hide show
  1. package/browser-agent/dist/browser-agent-all.js +34 -38
  2. package/browser-agent/dist/browser-agent-all.min.js +2 -2
  3. package/browser-agent/package.json +1 -1
  4. package/package.json +1 -1
  5. package/tsOutputs/build-scanner/build-diff-process.js +3 -1
  6. package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
  7. package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +2 -1
  8. package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
  9. package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js +4 -0
  10. package/tsOutputs/build-scanner/mappings/ensure-files-handler.service.js.map +1 -1
  11. package/tsOutputs/build-scanner/mappings/file-enricher.js.map +1 -1
  12. package/tsOutputs/cli-parse/contracts.d.ts +1 -0
  13. package/tsOutputs/cli-parse/contracts.js.map +1 -1
  14. package/tsOutputs/cli-parse/executors/base-executor.js +16 -9
  15. package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
  16. package/tsOutputs/cli-parse/executors/build-executor.js +1 -0
  17. package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
  18. package/tsOutputs/common/agent-events/agent-events-controller.js +3 -1
  19. package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
  20. package/tsOutputs/common/agent-events/agent-start-info-builder.js +1 -2
  21. package/tsOutputs/common/agent-events/agent-start-info-builder.js.map +1 -1
  22. package/tsOutputs/common/constants/sl-env-vars.d.ts +0 -2
  23. package/tsOutputs/common/constants/sl-env-vars.js +0 -4
  24. package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
  25. package/tsOutputs/common/utils/data-cleansing-utils.d.ts +1 -3
  26. package/tsOutputs/common/utils/data-cleansing-utils.js +26 -26
  27. package/tsOutputs/common/utils/data-cleansing-utils.js.map +1 -1
@@ -28029,7 +28029,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
28029
28029
  "use strict";
28030
28030
  Object.defineProperty(exports, "__esModule", { value: true });
28031
28031
  exports.SL_AGENT_TYPE = exports.SL_AGENT_VERSION = void 0;
28032
- exports.SL_AGENT_VERSION = '6.1.461';
28032
+ exports.SL_AGENT_VERSION = '6.1.466';
28033
28033
  exports.SL_AGENT_TYPE = 'browser';
28034
28034
  });
28035
28035
 
@@ -30763,7 +30763,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
30763
30763
  if (v !== undefined) module.exports = v;
30764
30764
  }
30765
30765
  else if (typeof define === "function" && define.amd) {
30766
- define(["require", "exports", "./agent-events-contracts", "./agent-instance-info-builder", "./machine-info-builder", "./nodejs-env-info-builder", "./agent-start-info-builder", "./ci-info-builder", "../http/backend-proxy", "../utils/validation-utils", "../watchdog", "../system-date", "./browser-info-builder"], factory);
30766
+ define(["require", "exports", "./agent-events-contracts", "./agent-instance-info-builder", "./machine-info-builder", "./nodejs-env-info-builder", "./agent-start-info-builder", "./ci-info-builder", "../http/backend-proxy", "../utils/validation-utils", "../watchdog", "../system-date", "./browser-info-builder", "../utils/data-cleansing-utils"], factory);
30767
30767
  }
30768
30768
  })(function (require, exports) {
30769
30769
  "use strict";
@@ -30780,6 +30780,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
30780
30780
  const watchdog_1 = require("../watchdog");
30781
30781
  const system_date_1 = require("../system-date");
30782
30782
  const browser_info_builder_1 = require("./browser-info-builder");
30783
+ const data_cleansing_utils_1 = require("../utils/data-cleansing-utils");
30783
30784
  class AgentEventsController {
30784
30785
  constructor(agentConfig, agentInstanceData, logger, backendProxy, tool, tags) {
30785
30786
  this.active = false;
@@ -30959,10 +30960,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
30959
30960
  }
30960
30961
  }
30961
30962
  buildEvent(type, data) {
30963
+ const cleanData = (this._agentConfig.removeSensitiveData ? data_cleansing_utils_1.DataCleansingUtils.removeSensitiveData(data) : data);
30962
30964
  return {
30963
30965
  type: type,
30964
30966
  utcTimestamp_ms: (0, system_date_1.getSystemDateValueOf)(),
30965
- data: data
30967
+ data: cleanData
30966
30968
  };
30967
30969
  }
30968
30970
  get agentInstanceData() {
@@ -30980,7 +30982,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
30980
30982
  })(StartRequestStatus || (StartRequestStatus = {}));
30981
30983
  });
30982
30984
 
30983
- },{"../http/backend-proxy":308,"../system-date":318,"../utils/validation-utils":323,"../watchdog":324,"./agent-events-contracts":267,"./agent-instance-info-builder":270,"./agent-start-info-builder":271,"./browser-info-builder":272,"./ci-info-builder":273,"./machine-info-builder":276,"./nodejs-env-info-builder":278}],269:[function(require,module,exports){
30985
+ },{"../http/backend-proxy":308,"../system-date":318,"../utils/data-cleansing-utils":319,"../utils/validation-utils":323,"../watchdog":324,"./agent-events-contracts":267,"./agent-instance-info-builder":270,"./agent-start-info-builder":271,"./browser-info-builder":272,"./ci-info-builder":273,"./machine-info-builder":276,"./nodejs-env-info-builder":278}],269:[function(require,module,exports){
30984
30986
  (function (factory) {
30985
30987
  if (typeof module === "object" && typeof module.exports === "object") {
30986
30988
  var v = factory(require, exports);
@@ -31233,14 +31235,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31233
31235
  if (v !== undefined) module.exports = v;
31234
31236
  }
31235
31237
  else if (typeof define === "function" && define.amd) {
31236
- define(["require", "exports", "../utils/data-cleansing-utils", "../constants/sl-env-vars"], factory);
31238
+ define(["require", "exports", "../utils/data-cleansing-utils"], factory);
31237
31239
  }
31238
31240
  })(function (require, exports) {
31239
31241
  "use strict";
31240
31242
  Object.defineProperty(exports, "__esModule", { value: true });
31241
31243
  exports.AgentStartInfoBuilder = void 0;
31242
31244
  const data_cleansing_utils_1 = require("../utils/data-cleansing-utils");
31243
- const sl_env_vars_1 = require("../constants/sl-env-vars");
31244
31245
  class AgentStartInfoBuilder {
31245
31246
  constructor(agentInstanceInfoBuilder, machineInfoBuilder, techSpecificInfoBuilder, ciInfoBuilder, agentConfig) {
31246
31247
  this.agentInstanceInfoBuilder = agentInstanceInfoBuilder;
@@ -31262,7 +31263,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31262
31263
  techSpecificInfo: this.techSpecificInfoBuilder.build(),
31263
31264
  ciInfo: this.ciInfoBuilder.build()
31264
31265
  };
31265
- if (this.agentConfig.removeSensitiveData.value || sl_env_vars_1.SlEnvVars.getMaskData())
31266
+ if (this.agentConfig.removeSensitiveData.value)
31266
31267
  return data_cleansing_utils_1.DataCleansingUtils.removeSensitiveData(response);
31267
31268
  return response;
31268
31269
  }
@@ -31270,7 +31271,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31270
31271
  exports.AgentStartInfoBuilder = AgentStartInfoBuilder;
31271
31272
  });
31272
31273
 
31273
- },{"../constants/sl-env-vars":287,"../utils/data-cleansing-utils":319}],272:[function(require,module,exports){
31274
+ },{"../utils/data-cleansing-utils":319}],272:[function(require,module,exports){
31274
31275
  (function (factory) {
31275
31276
  if (typeof module === "object" && typeof module.exports === "object") {
31276
31277
  var v = factory(require, exports);
@@ -32409,9 +32410,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32409
32410
  static getExecutionQueryIntervalSecs() {
32410
32411
  return env_var_parsing_1.EnvVarParsing.parseNumber(SlEnvVars.EXECUTION_QUERY_INTERVAL_SEC);
32411
32412
  }
32412
- static getMaskData() {
32413
- return env_var_parsing_1.EnvVarParsing.parseBoolean(SlEnvVars.MASK_DATA);
32414
- }
32415
32413
  static getFootprintsBufferThresholdMb() {
32416
32414
  return env_var_parsing_1.EnvVarParsing.parseNumber(SlEnvVars.FOOTPRINTS_BUFFER_THRESHOLD_MB);
32417
32415
  }
@@ -32457,7 +32455,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32457
32455
  SlEnvVars.USE_OTEL_AGENT = 'SL_useOtelAgent';
32458
32456
  SlEnvVars.USE_SL_MAPPING = 'SL_useSlMapping';
32459
32457
  SlEnvVars.SL_USE_SPAWN_WRAP = 'SL_useSpawnWrap';
32460
- SlEnvVars.MASK_DATA = 'SL_maskData';
32461
32458
  SlEnvVars.CIA = (_a = class {
32462
32459
  static getFileExtensions() {
32463
32460
  return process.env[SlEnvVars.CIA.FILE_EXTENSIONS];
@@ -35870,32 +35867,35 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
35870
35867
  exports.DataCleansingUtils = void 0;
35871
35868
  class DataCleansingUtils {
35872
35869
  static removeSensitiveData(request) {
35873
- const cloneRequest = Object.assign({}, request);
35874
- DataCleansingUtils.removeSensitiveDataForFieldsWithSideEffects(cloneRequest);
35875
- DataCleansingUtils.removeSensitiveDataForFieldsAccordingToPatternWithSideEffects(cloneRequest, 'techSpecificInfo.systemProps', DataCleansingUtils.propsFieldPattern);
35876
- DataCleansingUtils.removeSensitiveDataForFieldsAccordingToPatternWithSideEffects(cloneRequest, 'startDetails.agentInfo.argv', DataCleansingUtils.propsFieldPattern);
35877
- return cloneRequest;
35870
+ if (request && typeof request === 'object') {
35871
+ const cloneRequest = Object.assign({}, request);
35872
+ DataCleansingUtils.removeSensitiveDataForFieldsAccordingToPatternWithSideEffects(cloneRequest, DataCleansingUtils.sensitiveFieldPattern);
35873
+ return cloneRequest;
35874
+ }
35875
+ return request;
35878
35876
  }
35879
- static removeSensitiveDataForFieldsAccordingToPatternWithSideEffects(request, field, pattern) {
35880
- const fieldPath = field.split('.');
35881
- let requestField = request;
35882
- while (fieldPath.length && requestField) {
35883
- const fieldPart = fieldPath.shift();
35884
- if (!fieldPath.length && requestField[fieldPart]) {
35885
- Object.keys(requestField[fieldPart]).forEach(key => {
35877
+ static removeSensitiveDataForFieldsAccordingToPatternWithSideEffects(request, pattern) {
35878
+ Object.keys(request).forEach(fieldKey => {
35879
+ if (request[fieldKey]) {
35880
+ Object.keys(request[fieldKey]).forEach(key => {
35881
+ if (!request[fieldKey][key])
35882
+ return;
35886
35883
  if (pattern.test(key)) {
35887
- requestField[fieldPart][key] = DataCleansingUtils.REMOVED_VALUE_TEXT;
35884
+ if (typeof request[fieldKey][key] === 'object' && !Array.isArray(request[fieldKey][key])) {
35885
+ request[fieldKey][key] = {};
35886
+ }
35887
+ else if (Array.isArray(request[fieldKey][key])) {
35888
+ request[fieldKey][key] = [];
35889
+ }
35890
+ else {
35891
+ request[fieldKey][key] = DataCleansingUtils.REMOVED_VALUE_TEXT;
35892
+ }
35888
35893
  }
35889
35894
  });
35895
+ if (typeof request[fieldKey] === 'object') {
35896
+ DataCleansingUtils.removeSensitiveDataForFieldsAccordingToPatternWithSideEffects(request[fieldKey], pattern);
35897
+ }
35890
35898
  }
35891
- else {
35892
- requestField = requestField[fieldPart];
35893
- }
35894
- }
35895
- }
35896
- static removeSensitiveDataForFieldsWithSideEffects(request) {
35897
- DataCleansingUtils.SENSITIVE_DATE_FIELDS_ARRAY.forEach(field => {
35898
- DataCleansingUtils.removeSensitiveDataForFieldWithSideEffects(request, field);
35899
35899
  });
35900
35900
  }
35901
35901
  static removeSensitiveDataForFieldWithSideEffects(request, field) {
@@ -35913,12 +35913,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
35913
35913
  }
35914
35914
  }
35915
35915
  exports.DataCleansingUtils = DataCleansingUtils;
35916
- DataCleansingUtils.propsFieldPattern = /\b(token|proxy)\b/i;
35916
+ DataCleansingUtils.sensitiveFieldPattern = /\b(proxy|machineName|ipAddress|ci_dependency_proxy_server|ci_environment_url|ci_server_url|ci_server_host|ci_server_name|circle_repository_url|jenkins_url)\b/i;
35917
35917
  DataCleansingUtils.REMOVED_VALUE_TEXT = '<real value removed due to security configuration>';
35918
- DataCleansingUtils.SENSITIVE_DATE_FIELDS_ARRAY = ['agentInfo.machineInfo.machineName', 'agentInfo.machineInfo.ipAdresses',
35919
- 'agentInfo.envVars.ci_dependency_proxy_server', 'agentInfo.envVars.ci_environment_url',
35920
- 'agentInfo.envVars.ci_server_url', 'agentInfo.envVars.ci_server_host',
35921
- 'agentInfo.envVars.ci_server_name', 'agentInfo.envVars.circle_repository_url', 'agentInfo.envVars.jenkins_url'];
35922
35918
  });
35923
35919
 
35924
35920
  },{}],320:[function(require,module,exports){