Skip to content

Commit 0c35fb5

Browse files
committed
patches for axios cve
Signed-off-by: sumukhswamy <[email protected]>
1 parent a206fcc commit 0c35fb5

File tree

3 files changed

+474
-18
lines changed

3 files changed

+474
-18
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"author": "opensearch-project",
4040
"scripts": {
4141
"preinstall": "scripts/use_node ./preinstall_check",
42-
"postinstall": "scripts/use_node scripts/postinstall",
42+
"postinstall": "scripts/use_node scripts/postinstall && patch-package",
4343
"osd": "scripts/use_node scripts/osd",
4444
"opensearch": "scripts/use_node scripts/opensearch",
4545
"test": "grunt test",
@@ -138,6 +138,7 @@
138138
"**/yaml": "^2.2.2",
139139
"**/cipher-base": "^1.0.5",
140140
"**/pbkdf2": "^3.1.3",
141+
"**/axios": "^1.12.0",
141142
"**/sha.js": "^2.4.12"
142143
},
143144
"workspaces": {
@@ -176,6 +177,7 @@
176177
"@hapi/podium": "^4.1.3",
177178
"@hapi/vision": "^6.1.0",
178179
"@hapi/wreck": "^17.1.0",
180+
"@modelcontextprotocol/sdk": "^1.18.0",
179181
"@opensearch-dashboards-test/opensearch-dashboards-test-library": "https://github.com/opensearch-project/opensearch-dashboards-test-library/archive/refs/tags/1.0.6.tar.gz",
180182
"@opensearch-project/opensearch": "^1.1.0",
181183
"@opensearch-project/opensearch-next": "npm:@opensearch-project/opensearch@^2.13.0",
@@ -470,6 +472,7 @@
470472
"node-stream-zip": "^1.15.0",
471473
"normalize-path": "^3.0.0",
472474
"nyc": "^15.1.0",
475+
"patch-package": "^8.0.1",
473476
"pixelmatch": "^5.1.0",
474477
"pngjs": "^3.4.0",
475478
"postcss": "^8.4.5",

packages/osd-test/src/failed_tests_reporter/github_api.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,13 @@ export class GithubApi {
227227
}
228228

229229
try {
230-
return await this.x.request<T>(options);
230+
const response = await this.x.request<T>(options);
231+
return {
232+
status: response.status,
233+
statusText: response.statusText,
234+
headers: response.headers as Record<string, string | string[] | undefined>,
235+
data: response.data,
236+
};
231237
} catch (error) {
232238
const unableToReachGithub = isAxiosRequestError(error);
233239
const githubApiFailed = isAxiosResponseError(error) && error.response.status >= 500;

0 commit comments

Comments
 (0)