@contrast/agent 3.10.1 → 3.11.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/bin/VERSION CHANGED
@@ -1 +1 @@
1
- 2.19.0
1
+ 2.20.2
Binary file
Binary file
Binary file
package/bootstrap.js CHANGED
@@ -26,17 +26,20 @@ const orig = Module.runMain;
26
26
  * script from cli
27
27
  */
28
28
  Module.runMain = async function(...args) {
29
- const { enabled } = await loader.init(process.argv);
30
-
31
- if (enabled) {
32
- await loader.bootstrap(process.argv);
29
+ try {
30
+ const { enabled } = await loader.init(process.argv);
31
+ if (enabled) {
32
+ await loader.bootstrap(process.argv);
33
+ }
34
+ await loader.resetArgs(process.argv[0], process.argv[1]);
35
+ loader.logTime(startTime, 'agent');
36
+ const appStartTime = process.hrtime();
37
+ orig.apply(this, args);
38
+ loader.logTime(appStartTime, 'application');
39
+ loader.logTime(startTime, 'agent & application');
40
+
41
+ } catch(err) {
42
+ console.error(err);
43
+ process.exit(-1);
33
44
  }
34
- await loader.resetArgs(process.argv[0], process.argv[1]);
35
-
36
- loader.logTime(startTime, 'agent');
37
-
38
- const appStartTime = process.hrtime();
39
- orig.apply(this, args);
40
- loader.logTime(appStartTime, 'application');
41
- loader.logTime(startTime, 'agent & application');
42
45
  };
package/esm.mjs CHANGED
@@ -57,7 +57,7 @@ export async function getSource(url, context, defaultGetSource) {
57
57
  loadedFromCache.add(filename);
58
58
  return { source: cached };
59
59
  } catch (err) {
60
- logger.error(
60
+ logger.warn(
61
61
  'Failed to locate cached rewrite for %s, err: %o',
62
62
  filename,
63
63
  err
package/lib.asar CHANGED
Binary file
@@ -309,7 +309,7 @@ endif
309
309
 
310
310
  quiet_cmd_regen_makefile = ACTION Regenerating $@
311
311
  cmd_regen_makefile = cd $(srcdir); /opt/hostedtoolcache/node/12.22.1/x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/runner/.cache/node-gyp/12.22.1" "-Dnode_gyp_dir=/opt/hostedtoolcache/node/12.22.1/x64/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/home/runner/.cache/node-gyp/12.22.1/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/runner/work/node-agent/node-agent/target/node_modules/unix-dgram" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/runner/work/node-agent/node-agent/target/node_modules/unix-dgram/build/config.gypi -I/opt/hostedtoolcache/node/12.22.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/runner/.cache/node-gyp/12.22.1/include/node/common.gypi "--toplevel-dir=." binding.gyp
312
- Makefile: $(srcdir)/build/config.gypi $(srcdir)/../../../../../../.cache/node-gyp/12.22.1/include/node/common.gypi $(srcdir)/../../../../../../../../opt/hostedtoolcache/node/12.22.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/binding.gyp
312
+ Makefile: $(srcdir)/../../../../../../../../opt/hostedtoolcache/node/12.22.1/x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/../../../../../../.cache/node-gyp/12.22.1/include/node/common.gypi $(srcdir)/binding.gyp
313
313
  $(call do_cmd,regen_makefile)
314
314
 
315
315
  # "all" is a concatenation of the "all" targets from all the included
@@ -126,7 +126,7 @@
126
126
  "progress": "",
127
127
  "https_proxy": "",
128
128
  "save_prod": "",
129
- "npm_session": "b887839b098f9a26",
129
+ "npm_session": "6e09f226531784f1",
130
130
  "audit": "true",
131
131
  "cidr": "",
132
132
  "onload_script": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agent",
3
- "version": "3.10.1",
3
+ "version": "3.11.1",
4
4
  "description": "Node.js security instrumentation by Contrast Security",
5
5
  "keywords": [
6
6
  "security",
@@ -37,21 +37,12 @@
37
37
  "docker-pkg": "docker build -t node-agent .",
38
38
  "extract-licenses": "node scripts/extract-licenses",
39
39
  "fix": "eslint . --fix",
40
+ "prepare": "husky install || true",
40
41
  "preversion": "npm run test:gh-ci"
41
42
  },
42
- "husky": {
43
- "hooks": {
44
- "pre-commit": "lint-staged && npx ls-lint"
45
- }
46
- },
47
43
  "lint-staged": {
48
- "**/*.js": [
49
- "eslint --fix",
50
- "git add"
51
- ],
52
- "**/*.sh": [
53
- "shellcheck -x"
54
- ]
44
+ "*.js": "eslint --fix",
45
+ "*.sh": "shellcheck -x"
55
46
  },
56
47
  "bin": {
57
48
  "node-contrast": "cli.js",
@@ -77,15 +68,15 @@
77
68
  "@babel/template": "^7.10.4",
78
69
  "@babel/traverse": "^7.12.1",
79
70
  "@babel/types": "^7.12.1",
80
- "@contrast/distringuish-prebuilt": "^2.0.0",
71
+ "@contrast/distringuish-prebuilt": "^2.0.2",
81
72
  "@contrast/escodegen": "^1.16.0",
82
- "@contrast/esprima": "^4.1.1",
73
+ "@contrast/esprima": "^4.1.2",
83
74
  "@contrast/estraverse": "^5.1.0",
84
75
  "@contrast/flat": "^4.1.1",
85
- "@contrast/fn-inspect": "^2.3.0",
76
+ "@contrast/fn-inspect": "^2.3.2",
86
77
  "@contrast/heapdump": "^1.0.0",
87
- "@contrast/protobuf-api": "^3.1.0",
88
- "@contrast/require-hook": "^2.0.0",
78
+ "@contrast/protobuf-api": "^3.2.0",
79
+ "@contrast/require-hook": "^2.0.3",
89
80
  "@contrast/synchronous-source-maps": "^1.1.0",
90
81
  "amqp-connection-manager": "^3.2.2",
91
82
  "amqplib": "^0.7.1",
@@ -100,7 +91,6 @@
100
91
  "crc-32": "^1.0.0",
101
92
  "find-cache-dir": "^3.3.1",
102
93
  "ipaddr.js": "^1.8.1",
103
- "joi": "^17.4.0",
104
94
  "json-stable-stringify": "^1.0.1",
105
95
  "jspack": "0.0.4",
106
96
  "lodash": "^4.17.21",
@@ -110,7 +100,6 @@
110
100
  "on-finished": "^2.3.0",
111
101
  "parseurl": "^1.3.3",
112
102
  "prom-client": "^12.0.0",
113
- "read-installed": "^4.0.0",
114
103
  "recursive-readdir": "^2.2.2",
115
104
  "request": "^2.88.0",
116
105
  "semver": "^7.3.2",
@@ -150,12 +139,13 @@
150
139
  "fetch-cookie": "^0.11.0",
151
140
  "form-data": "^3.0.0",
152
141
  "glob": "^7.1.4",
153
- "husky": "^1.3.1",
142
+ "handlebars": "^4.7.7",
143
+ "husky": "^6.0.0",
154
144
  "joi": "^17.4.0",
155
145
  "jsdoc": "^3.6.3",
156
146
  "libxmljs": "file:test/mock/libxmljs",
157
147
  "libxmljs2": "file:test/mock/libxmljs2",
158
- "lint-staged": "^8.1.6",
148
+ "lint-staged": "^11.0.0",
159
149
  "madge": "^4.0.1",
160
150
  "marsdb": "file:test/mock/marsdb",
161
151
  "mocha": "^8.2.0",
@@ -166,7 +156,7 @@
166
156
  "mysql": "file:test/mock/mysql",
167
157
  "nock": "^12.0.3",
168
158
  "node-fetch": "^2.6.1",
169
- "npm-license-crawler": "^0.2.0",
159
+ "npm-license-crawler": "^0.2.1",
170
160
  "nyc": "^15.0.0",
171
161
  "pg": "file:test/mock/pg",
172
162
  "pino": "^6.7.0",
@@ -175,7 +165,7 @@
175
165
  "qs": "^6.9.4",
176
166
  "rethinkdb": "file:test/mock/rethinkdb",
177
167
  "sequelize": "^6.3.3",
178
- "shellcheck": "^0.4.2",
168
+ "shellcheck": "^1.0.0",
179
169
  "sinon": "^7.2.2",
180
170
  "sinon-chai": "^3.3.0",
181
171
  "sqlite3": "file:test/mock/sqlite3",