Skip to content

Commit

Permalink
fix: fixing vulnerability: server-side request forgery in axios (#135)
Browse files Browse the repository at this point in the history
* fix: minor tweak
Signed-off-by: jkalanda <[email protected]>
  • Loading branch information
jkalandaibm authored Aug 27, 2024
1 parent 9c1bc79 commit b31748f
Show file tree
Hide file tree
Showing 41 changed files with 3,921 additions and 5,860 deletions.
9,679 changes: 3,873 additions & 5,806 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,22 @@
},
"license": "Apache-2.0",
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"dependencies": {
"@types/extend": "^3.0.4",
"@types/node": "^20.11.28",
"extend": "^3.0.2",
"ibm-cloud-sdk-core": "^4.2.4"
"ibm-cloud-sdk-core": "^5.0.1"
},
"devDependencies": {
"@ibm-cloud/sdk-test-utilities": "^1.0.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"ansi-regex": "^6.0.1",
"axios": "^1.6.7",
"axios": "^1.7.4",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"eslint-config-google": "^0.14.0",
Expand Down
4 changes: 2 additions & 2 deletions test/unit/cis/alerts.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const core = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = core;

const AlertsV1 = require('../../../dist/cis/alertsv1/v1');
Expand All @@ -27,7 +26,8 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');


const alertsServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
3 changes: 1 addition & 2 deletions test/unit/cis/authenticated-origin-pull-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const core = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = core;

const AuthenticatedOriginPullApiV1 = require('../../../dist/cis/authenticated-origin-pull-apiv1/v1');
Expand All @@ -28,7 +27,7 @@ const {
expectToBePromise,
checkUserHeader,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const authenticatedOriginPullApiServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/caching-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/cis-ip-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/custom-pages.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/dns-record-bulk.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/dns-records.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/edge-functions-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const {
expectToBePromise,
checkUserHeader,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
3 changes: 1 addition & 2 deletions test/unit/cis/filters.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const core = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = core;

const FiltersV1 = require('../../../dist/cis/filtersv1/v1');
Expand All @@ -27,7 +26,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkUserHeader,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const filtersServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/firewall-access-rules.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/firewall-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/firewall-event-analytics-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
3 changes: 1 addition & 2 deletions test/unit/cis/firewall-rules.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const core = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = core;

const FirewallRulesV1 = require('../../../dist/cis/firewallrulesv1/v1');
Expand All @@ -27,7 +26,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkUserHeader,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const firewallRulesServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/global-load-balancer-events.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/global-load-balancer-monitor.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/global-load-balancer-pools.v0.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/global-load-balancer.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
3 changes: 1 addition & 2 deletions test/unit/cis/logpush-jobs-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const core = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = core;

const LogpushJobsApiV1 = require('../../../dist/cis/logpushjobsapiv1/v1');
Expand All @@ -27,7 +26,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const logpushJobsApiServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
3 changes: 1 addition & 2 deletions test/unit/cis/mtls.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const core = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = core;

const MtlsV1 = require('../../../dist/cis/mtlsv1/v1');
Expand All @@ -27,7 +26,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const mtlsServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/page-rule-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/range-applications.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/routing.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/security-events-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
4 changes: 2 additions & 2 deletions test/unit/cis/ssl-certificate-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const sdkCorePackage = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = sdkCorePackage;

const SslCertificateApiV1 = require('../../../dist/cis/ssl-certificate-api/v1');

const {
Expand All @@ -27,7 +27,7 @@ const {
expectToBePromise,
checkUserHeader,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const sslCertificateApiServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/user-agent-blocking-rules.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/waf-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/waf-rule-groups-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const { NoAuthAuthenticator, unitTestUtils } = core;

const WafRuleGroupsApiV1 = require('../../../dist/cis/wafrulegroupsapiv1/v1');

const { getOptions, checkUrlAndMethod, checkMediaHeaders, expectToBePromise } = unitTestUtils;
const { getOptions, checkUrlAndMethod, checkMediaHeaders, expectToBePromise } = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/waf-rule-packages-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/waf-rules-api.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const { NoAuthAuthenticator, unitTestUtils } = core;

const WafRulesApiV1 = require('../../../dist/cis/wafrulesapiv1/v1');

const { getOptions, checkUrlAndMethod, checkMediaHeaders, expectToBePromise } = unitTestUtils;
const { getOptions, checkUrlAndMethod, checkMediaHeaders, expectToBePromise } = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
3 changes: 1 addition & 2 deletions test/unit/cis/webhooks.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// need to import the whole package to mock getAuthenticatorFromEnvironment
const core = require('ibm-cloud-sdk-core');

const { NoAuthAuthenticator, unitTestUtils } = core;

const WebhooksV1 = require('../../../dist/cis/webhooksv1/v1');
Expand All @@ -27,7 +26,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const webhooksServiceOptions = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/zone-firewall-access-rules.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/zone-lockdown.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/zone-rate-limits.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cis/zones-settings.v1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
checkMediaHeaders,
expectToBePromise,
checkForSuccessfulExecution,
} = unitTestUtils;
} = require('@ibm-cloud/sdk-test-utilities');

const service = {
authenticator: new NoAuthAuthenticator(),
Expand Down
Loading

0 comments on commit b31748f

Please sign in to comment.