@js-recon/js-recon 1.4.2 → 1.4.4

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 (103) hide show
  1. package/.github/workflows/build-and-prettify.yaml +6 -6
  2. package/.github/workflows/rules-smoke-test.yaml +2 -2
  3. package/CHANGELOG.md +30 -0
  4. package/Dockerfile +13 -2
  5. package/Dockerfile.release +12 -2
  6. package/Dockerfile.w-rules +0 -1
  7. package/README.md +52 -0
  8. package/build/analyze/helpers/initRules.js +34 -16
  9. package/build/analyze/helpers/initRules.js.map +1 -1
  10. package/build/completion/index.js +44 -3
  11. package/build/completion/index.js.map +1 -1
  12. package/build/config/applicationConfig.js +493 -0
  13. package/build/config/applicationConfig.js.map +1 -0
  14. package/build/fingerprint/index.js +8 -19
  15. package/build/fingerprint/index.js.map +1 -1
  16. package/build/globalConfig.js +1 -1
  17. package/build/index.js +62 -9
  18. package/build/index.js.map +1 -1
  19. package/build/lazyLoad/downloadFilesUtil.js +40 -32
  20. package/build/lazyLoad/downloadFilesUtil.js.map +1 -1
  21. package/build/lazyLoad/downloadQueue.js +150 -50
  22. package/build/lazyLoad/downloadQueue.js.map +1 -1
  23. package/build/lazyLoad/downloadResponse.js +112 -0
  24. package/build/lazyLoad/downloadResponse.js.map +1 -0
  25. package/build/lazyLoad/globals.js +4 -0
  26. package/build/lazyLoad/globals.js.map +1 -1
  27. package/build/lazyLoad/index.js +188 -115
  28. package/build/lazyLoad/index.js.map +1 -1
  29. package/build/lazyLoad/next_js/NextJsCrawler.js +3 -2
  30. package/build/lazyLoad/next_js/NextJsCrawler.js.map +1 -1
  31. package/build/lazyLoad/next_js/next_GetLazyResourcesWebpackJs.js +8 -9
  32. package/build/lazyLoad/next_js/next_GetLazyResourcesWebpackJs.js.map +1 -1
  33. package/build/lazyLoad/next_js/next_SubsequentRequests.js +93 -93
  34. package/build/lazyLoad/next_js/next_SubsequentRequests.js.map +1 -1
  35. package/build/lazyLoad/outputPath.js +92 -0
  36. package/build/lazyLoad/outputPath.js.map +1 -0
  37. package/build/lazyLoad/react/react_followImports.js +15 -5
  38. package/build/lazyLoad/react/react_followImports.js.map +1 -1
  39. package/build/lazyLoad/react/react_getScriptTags.js +11 -6
  40. package/build/lazyLoad/react/react_getScriptTags.js.map +1 -1
  41. package/build/lazyLoad/react/react_sourcemapUrls.js +3 -2
  42. package/build/lazyLoad/react/react_sourcemapUrls.js.map +1 -1
  43. package/build/lazyLoad/react/react_webpackChunkPaths.js +2 -1
  44. package/build/lazyLoad/react/react_webpackChunkPaths.js.map +1 -1
  45. package/build/lazyLoad/techDetect/index.js +93 -59
  46. package/build/lazyLoad/techDetect/index.js.map +1 -1
  47. package/build/lazyLoad/vue/vue_RuntimeJs.js +20 -15
  48. package/build/lazyLoad/vue/vue_RuntimeJs.js.map +1 -1
  49. package/build/lazyLoad/vue/vue_SingleJsFileOnHome.js +8 -3
  50. package/build/lazyLoad/vue/vue_SingleJsFileOnHome.js.map +1 -1
  51. package/build/lazyLoad/vue/vue_discoverJsFiles.js +10 -9
  52. package/build/lazyLoad/vue/vue_discoverJsFiles.js.map +1 -1
  53. package/build/lazyLoad/vue/vue_getClientSidePaths.js +69 -45
  54. package/build/lazyLoad/vue/vue_getClientSidePaths.js.map +1 -1
  55. package/build/lazyLoad/vue/vue_jsImports.js +3 -2
  56. package/build/lazyLoad/vue/vue_jsImports.js.map +1 -1
  57. package/build/lazyLoad/vue/vue_pageSrc.js +2 -1
  58. package/build/lazyLoad/vue/vue_pageSrc.js.map +1 -1
  59. package/build/lazyLoad/vue/vue_reconstructSourceMaps.js +4 -3
  60. package/build/lazyLoad/vue/vue_reconstructSourceMaps.js.map +1 -1
  61. package/build/lazyLoad/vue/vue_recursiveClientSidePathDownload.js +9 -20
  62. package/build/lazyLoad/vue/vue_recursiveClientSidePathDownload.js.map +1 -1
  63. package/build/lazyLoad/vue/vue_severalJsFilesHome.js +2 -1
  64. package/build/lazyLoad/vue/vue_severalJsFilesHome.js.map +1 -1
  65. package/build/lazyLoad/vue/vue_stringJsFiles.js +28 -25
  66. package/build/lazyLoad/vue/vue_stringJsFiles.js.map +1 -1
  67. package/build/lazyLoad/vue/vue_viteMapDeps.js +8 -2
  68. package/build/lazyLoad/vue/vue_viteMapDeps.js.map +1 -1
  69. package/build/proxy/checkFeasibility.js +8 -4
  70. package/build/proxy/checkFeasibility.js.map +1 -1
  71. package/build/proxy/checkFireWallBlocking.js +23 -13
  72. package/build/proxy/checkFireWallBlocking.js.map +1 -1
  73. package/build/proxy/detectBlockedResponse.js +203 -0
  74. package/build/proxy/detectBlockedResponse.js.map +1 -0
  75. package/build/proxy/genReq.js +434 -127
  76. package/build/proxy/genReq.js.map +1 -1
  77. package/build/proxy/oxylabsFallback.js +110 -0
  78. package/build/proxy/oxylabsFallback.js.map +1 -0
  79. package/build/proxy/proxyFeasibilityRequest.js +11 -9
  80. package/build/proxy/proxyFeasibilityRequest.js.map +1 -1
  81. package/build/run/cancellableStep.js +27 -0
  82. package/build/run/cancellableStep.js.map +1 -0
  83. package/build/run/index.js +80 -85
  84. package/build/run/index.js.map +1 -1
  85. package/build/run/outputDirectory.js +377 -0
  86. package/build/run/outputDirectory.js.map +1 -0
  87. package/build/sourcemaps/index.js +109 -23
  88. package/build/sourcemaps/index.js.map +1 -1
  89. package/build/strings/index.js +12 -5
  90. package/build/strings/index.js.map +1 -1
  91. package/build/utility/downloadProgress.js +99 -0
  92. package/build/utility/downloadProgress.js.map +1 -0
  93. package/build/utility/makeReq.js +490 -257
  94. package/build/utility/makeReq.js.map +1 -1
  95. package/build/utility/progressLog.js +64 -4
  96. package/build/utility/progressLog.js.map +1 -1
  97. package/build/utility/targetInputs.js +177 -0
  98. package/build/utility/targetInputs.js.map +1 -0
  99. package/build/utility/urlUtils.js +37 -1
  100. package/build/utility/urlUtils.js.map +1 -1
  101. package/config.dist.yaml +251 -0
  102. package/docker-entrypoint.sh +16 -0
  103. package/package.json +2 -2
@@ -0,0 +1,251 @@
1
+ # js-recon application configuration
2
+ #
3
+ # The CLI creates ~/.config/js-recon/config.yaml on first use. Copy this file
4
+ # elsewhere when you want to use: js-recon --config /path/to/config.yaml <command>
5
+ #
6
+ # Precedence (highest first): environment, command-line flag, this YAML file,
7
+ # built-in default. Every command option also has a canonical environment name:
8
+ # JS_RECON_<COMMAND>_<OPTION>, for example JS_RECON_RUN_THREADS.
9
+ #
10
+ # null means "not configured". Keep credential-bearing files mode 0600.
11
+ version: 1
12
+
13
+ oxylabs:
14
+ # Required in an explicitly selected config when oxylabsWafFallback is true.
15
+ # JS_RECON_OXYLABS_USERNAME/PASSWORD/COUNTRY may override these values.
16
+ username: null
17
+ password: null
18
+ country: null
19
+
20
+ commands:
21
+ lazyload:
22
+ # May also be a YAML list of HTTP(S) URLs:
23
+ # url:
24
+ # - https://one.example.com
25
+ # - https://two.example.com
26
+ url: null
27
+ output: output
28
+ strictScope: false
29
+ scope: "*"
30
+ threads: "1"
31
+ subsequentRequests: false
32
+ urlsFile: extracted_urls.json
33
+ proxyConfig: .proxy_config.json
34
+ ignoreProxyEnv: false
35
+ oxylabsWafFallback: false
36
+ oxylabsFallbackMaxRequests: "10"
37
+ oxylabsFallbackMaxTotal: "100"
38
+ oxylabsFallbackMaxOrigins: "25"
39
+ cacheFile: .resp_cache.json
40
+ disableCache: false
41
+ cacheOnly: false
42
+ yes: false
43
+ timeout: "30000"
44
+ insecure: false
45
+ sandbox: true
46
+ buildId: false
47
+ sourcemapDir: extracted
48
+ research: false
49
+ researchOutput: research.json
50
+ maxIterations: "10"
51
+ maxJsSize: "2"
52
+ lazyloadTimeout: "30"
53
+ detectionTimeout: "30"
54
+ maxPages: "200"
55
+ includeMethods: null
56
+ excludeMethods: null
57
+ listMethods: null
58
+
59
+ endpoints:
60
+ url: null
61
+ directory: null
62
+ output: endpoints
63
+ outputFormat: json
64
+ tech: null
65
+ list: false
66
+ mappedJson: null
67
+
68
+ strings:
69
+ directory: null
70
+ output: strings.json
71
+ extractUrls: false
72
+ extractedUrlPath: extracted_urls
73
+ permutate: false
74
+ openapi: false
75
+ scanSecrets: false
76
+ trufflehog: false
77
+
78
+ proxy:
79
+ init: false
80
+ destroy: null
81
+ destroyAll: false
82
+ region: null
83
+ awsAccessKey: null
84
+ awsSecretKey: null
85
+ config: .proxy_config.json
86
+ list: false
87
+ feasibility: false
88
+ feasibilityUrl: null
89
+ proxyMethod: null
90
+ proxy: null
91
+ oxylabsUsername: null
92
+ oxylabsPassword: null
93
+ oxylabsCountry: null
94
+ oxylabsCity: null
95
+ oxylabsSessionId: null
96
+
97
+ map:
98
+ directory: null
99
+ tech: null
100
+ list: false
101
+ output: mapped
102
+ format: json
103
+ interactive: false
104
+ command: []
105
+ ai: null
106
+ aiThreads: "5"
107
+ aiProvider: openai
108
+ aiEndpoint: null
109
+ openaiApiKey: null
110
+ model: gpt-4o-mini
111
+ openapi: false
112
+ openapiOutput: mapped-openapi.json
113
+ openapiChunkTag: false
114
+ graphql: true
115
+ ngql: null
116
+ maxRecursionDepth: "3"
117
+ maxHeap: null
118
+
119
+ refactor:
120
+ mappedJson: mapped.json
121
+ output: output_refactored
122
+ tech: null
123
+ list: false
124
+ collisions: null
125
+ signatureQuality: "100"
126
+ refreshCache: false
127
+ skipCacheChecks: false
128
+ remote: true
129
+ remoteCollisions: null
130
+ scat: null
131
+ detectVersion: false
132
+ detectVersionConfig: null
133
+ detectVersionDynamicThreshold: "3"
134
+ detectVersionDynamicConfPurge: false
135
+
136
+ analyze:
137
+ rules: null
138
+ mappedJson: mapped.json
139
+ tech: null
140
+ openapi: null
141
+ list: false
142
+ validate: false
143
+ output: analyze.json
144
+ disableRulesVersionCheck: false
145
+
146
+ report:
147
+ sqliteDb: js-recon.db
148
+ mappedJson: null
149
+ analyzeJson: null
150
+ endpointsJson: null
151
+ mappedOpenapiJson: null
152
+ output: report
153
+
154
+ run:
155
+ # May also be a YAML list. Repeated -u flags and comma-separated URLs
156
+ # are supported on the command line; a target-file path is also valid.
157
+ # url:
158
+ # - https://one.example.com
159
+ # - https://two.example.com
160
+ url: null
161
+ rules: null
162
+ disableRulesVersionCheck: false
163
+ command: []
164
+ output: output
165
+ outputOverwrite: false
166
+ strictScope: false
167
+ scope: "*"
168
+ threads: "1"
169
+ proxyConfig: .proxy_config.json
170
+ ignoreProxyEnv: false
171
+ proxyWafFallback: false
172
+ oxylabsWafFallback: false
173
+ oxylabsFallbackMaxRequests: "10"
174
+ oxylabsFallbackMaxTotal: "100"
175
+ oxylabsFallbackMaxOrigins: "25"
176
+ cacheFile: .resp_cache.json
177
+ disableCache: false
178
+ cacheOnly: false
179
+ yes: false
180
+ secrets: false
181
+ trufflehog: false
182
+ ai: null
183
+ aiThreads: "5"
184
+ aiProvider: openai
185
+ aiEndpoint: null
186
+ openaiApiKey: null
187
+ model: gpt-4o-mini
188
+ mapOpenapiChunkTag: false
189
+ graphql: true
190
+ ngql: null
191
+ timeout: "30000"
192
+ insecure: false
193
+ sandbox: true
194
+ sourcemapDir: extracted
195
+ research: false
196
+ researchOutput: research.json
197
+ maxIterations: "10"
198
+ maxJsSize: "2"
199
+ lazyloadTimeout: "30"
200
+ detectionTimeout: "30"
201
+ maxHeap: null
202
+ maxPages: "200"
203
+ includeMethods: null
204
+ excludeMethods: null
205
+ listMethods: null
206
+ csMastTechDetectThreshold: "50"
207
+ disableRefactor: false
208
+
209
+ load:
210
+ caido: null
211
+ url: null
212
+ cacheFile: .resp_cache.json
213
+
214
+ fingerprint:
215
+ # May also be a YAML list of HTTP(S) URLs.
216
+ url: null
217
+ output: null
218
+ format: text
219
+ threads: "5"
220
+ timeout: "30000"
221
+ insecure: false
222
+ sandbox: true
223
+
224
+ mcp:
225
+ cli: false
226
+ server: false
227
+ chat: []
228
+ config: null
229
+ apiKey: null
230
+ model: null
231
+ provider: null
232
+ refreshClaudeCreds: true
233
+ claudeClientId: null
234
+
235
+ cs-mast:
236
+ output: output
237
+ collisionTable: false
238
+ minCollisions: "2"
239
+ collisionOutput: null
240
+ collisionFormat: csv
241
+ scat: lit,decl,loop,cond
242
+ sinc: ""
243
+ allScatPermutations: false
244
+ permOutput: null
245
+ permConcurrency: "0"
246
+
247
+ sourcemaps:
248
+ input: null
249
+ output: extracted
250
+
251
+ completion: {}
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ # The container starts as root so a bind-mounted output directory (which inherits
5
+ # whatever ownership it had on the host, or the ownership Docker/Kubernetes assigns
6
+ # when creating it) can be made writable by pptruser regardless of who created it.
7
+ # If the container was forced to run as a non-root user already (e.g. a Kubernetes
8
+ # securityContext), this is a no-op and the mounted directory must already be
9
+ # writable by that user.
10
+ if [ "$(id -u)" = "0" ]; then
11
+ mkdir -p /home/pptruser/output
12
+ chown -R pptruser:pptruser /home/pptruser/output
13
+ exec gosu pptruser "$@"
14
+ fi
15
+
16
+ exec "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@js-recon/js-recon",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "JS Recon Tool",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
@@ -15,7 +15,7 @@
15
15
  "test:watch": "vitest",
16
16
  "test:build": "node build/index.js -h",
17
17
  "postinstall": "patch-package",
18
- "cleanup": "rm -rf build output output_refactored .resp_cache.json endpoints.json extracted_urls{.txt,.json,-openapi.json} strings.json mapped{-openapi.json,.json,-openapi.postman_collection.json} analyze.json test{.yaml,.js} js-recon-js-recon-*.tgz js-recon.db report.{html,md} js_recon_run_output *_test.js extracted/ research.json results* out.* && tsc"
18
+ "cleanup": "rm -rf build output output_refactored .resp_cache.json .resp_cache.json.entries endpoints.json extracted_urls{.txt,.json,-openapi.json} strings.json mapped{-openapi.json,.json,-openapi.postman_collection.json} analyze.json test{.yaml,.js} js-recon-js-recon-*.tgz js-recon.db report.{html,md} js_recon_run_output *_test.js extracted/ research.json results* out.* && tsc"
19
19
  },
20
20
  "keywords": [],
21
21
  "author": "Shriyans Sudhi",