Update to address axios security vulnerability (#13)

* Update to address axios security vulnerability

* Upgrade packages
This commit is contained in:
TheLegendTubaGuy
2025-09-13 16:58:14 -05:00
committed by GitHub
parent dc052832b4
commit 36275c9e8e
3 changed files with 88 additions and 71 deletions
+2 -2
View File
@@ -13,14 +13,14 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"axios": "^1.11.0",
"axios": "^1.12.1",
"cron": "^3.5.0",
"dotenv": "^16.6.1"
},
"devDependencies": {
"@eslint/js": "^9.35.0",
"@types/jest": "^29.5.14",
"@types/node": "^24.3.1",
"@types/node": "^24.3.3",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.43.0",
"eslint": "^9.35.0",
+75 -68
View File
@@ -9,8 +9,8 @@ importers:
.:
dependencies:
axios:
specifier: ^1.11.0
version: 1.11.0
specifier: ^1.12.1
version: 1.12.1
cron:
specifier: ^3.5.0
version: 3.5.0
@@ -25,8 +25,8 @@ importers:
specifier: ^29.5.14
version: 29.5.14
'@types/node':
specifier: ^24.3.1
version: 24.3.1
specifier: ^24.3.3
version: 24.3.3
'@typescript-eslint/eslint-plugin':
specifier: ^8.43.0
version: 8.43.0(@typescript-eslint/parser@8.43.0(eslint@9.35.0)(typescript@5.9.2))(eslint@9.35.0)(typescript@5.9.2)
@@ -38,10 +38,10 @@ importers:
version: 9.35.0
jest:
specifier: ^29.7.0
version: 29.7.0(@types/node@24.3.1)
version: 29.7.0(@types/node@24.3.3)
ts-jest:
specifier: ^29.4.1
version: 29.4.1(@babel/core@7.28.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.4))(jest-util@29.7.0)(jest@29.7.0(@types/node@24.3.1))(typescript@5.9.2)
version: 29.4.1(@babel/core@7.28.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.4))(jest-util@29.7.0)(jest@29.7.0(@types/node@24.3.3))(typescript@5.9.2)
tsx:
specifier: ^4.20.5
version: 4.20.5
@@ -576,8 +576,8 @@ packages:
'@types/luxon@3.4.2':
resolution: {integrity: sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==}
'@types/node@24.3.1':
resolution: {integrity: sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g==}
'@types/node@24.3.3':
resolution: {integrity: sha512-GKBNHjoNw3Kra1Qg5UXttsY5kiWMEfoHq2TmXb+b1rcm6N7B3wTrFYIf/oSZ1xNQ+hVVijgLkiDZh7jRRsh+Gw==}
'@types/stack-utils@2.0.3':
resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==}
@@ -689,8 +689,8 @@ packages:
asynckit@0.4.0:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
axios@1.11.0:
resolution: {integrity: sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==}
axios@1.12.1:
resolution: {integrity: sha512-Kn4kbSXpkFHCGE6rBFNwIv0GQs4AvDT80jlveJDKFxjbTYMUeB4QtsdPCv6H8Cm19Je7IU6VFtRl2zWZI0rudQ==}
babel-jest@29.7.0:
resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==}
@@ -720,6 +720,10 @@ packages:
balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
baseline-browser-mapping@2.8.3:
resolution: {integrity: sha512-mcE+Wr2CAhHNWxXN/DdTI+n4gsPc5QpXpWnyCQWiQYIYZX+ZMJ8juXZgjRa/0/YPJo/NSsgW15/YgmI4nbysYw==}
hasBin: true
brace-expansion@1.1.12:
resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==}
@@ -730,8 +734,8 @@ packages:
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
engines: {node: '>=8'}
browserslist@4.25.4:
resolution: {integrity: sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg==}
browserslist@4.26.0:
resolution: {integrity: sha512-P9go2WrP9FiPwLv3zqRD/Uoxo0RSHjzFCiQz7d4vbmwNqQFo9T9WCeP/Qn5EbcKQY6DBbkxEXNcpJOmncNrb7A==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
@@ -819,8 +823,8 @@ packages:
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
engines: {node: '>= 8'}
debug@4.4.1:
resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
debug@4.4.3:
resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
engines: {node: '>=6.0'}
peerDependencies:
supports-color: '*'
@@ -863,8 +867,8 @@ packages:
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
engines: {node: '>= 0.4'}
electron-to-chromium@1.5.217:
resolution: {integrity: sha512-Pludfu5iBxp9XzNl0qq2G87hdD17ZV7h5T4n6rQXDi3nCyloBV3jreE9+8GC6g4X/5yxqVgXEURpcLtM0WS4jA==}
electron-to-chromium@1.5.218:
resolution: {integrity: sha512-uwwdN0TUHs8u6iRgN8vKeWZMRll4gBkz+QMqdS7DDe49uiK68/UX92lFb61oiFPrpYZNeZIqa4bA7O6Aiasnzg==}
emittery@0.13.1:
resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==}
@@ -1461,8 +1465,8 @@ packages:
node-int64@0.4.0:
resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==}
node-releases@2.0.20:
resolution: {integrity: sha512-7gK6zSXEH6neM212JgfYFXe+GmZQM+fia5SsusuBIUgnPheLFBmIPhtFoAQRj8/7wASYQnbDlHPVwY0BefoFgA==}
node-releases@2.0.21:
resolution: {integrity: sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==}
normalize-path@3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
@@ -1847,7 +1851,7 @@ snapshots:
'@babel/types': 7.28.4
'@jridgewell/remapping': 2.3.5
convert-source-map: 2.0.0
debug: 4.4.1
debug: 4.4.3
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
@@ -1866,7 +1870,7 @@ snapshots:
dependencies:
'@babel/compat-data': 7.28.4
'@babel/helper-validator-option': 7.27.1
browserslist: 4.25.4
browserslist: 4.26.0
lru-cache: 5.1.1
semver: 6.3.1
@@ -2004,7 +2008,7 @@ snapshots:
'@babel/parser': 7.28.4
'@babel/template': 7.27.2
'@babel/types': 7.28.4
debug: 4.4.1
debug: 4.4.3
transitivePeerDependencies:
- supports-color
@@ -2103,7 +2107,7 @@ snapshots:
'@eslint/config-array@0.21.0':
dependencies:
'@eslint/object-schema': 2.1.6
debug: 4.4.1
debug: 4.4.3
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@@ -2117,7 +2121,7 @@ snapshots:
'@eslint/eslintrc@3.3.1':
dependencies:
ajv: 6.12.6
debug: 4.4.1
debug: 4.4.3
espree: 10.4.0
globals: 14.0.0
ignore: 5.3.2
@@ -2161,7 +2165,7 @@ snapshots:
'@jest/console@29.7.0':
dependencies:
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
chalk: 4.1.2
jest-message-util: 29.7.0
jest-util: 29.7.0
@@ -2174,14 +2178,14 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
ansi-escapes: 4.3.2
chalk: 4.1.2
ci-info: 3.9.0
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 29.7.0
jest-config: 29.7.0(@types/node@24.3.1)
jest-config: 29.7.0(@types/node@24.3.3)
jest-haste-map: 29.7.0
jest-message-util: 29.7.0
jest-regex-util: 29.6.3
@@ -2206,7 +2210,7 @@ snapshots:
dependencies:
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
jest-mock: 29.7.0
'@jest/expect-utils@29.7.0':
@@ -2224,7 +2228,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
'@sinonjs/fake-timers': 10.3.0
'@types/node': 24.3.1
'@types/node': 24.3.3
jest-message-util: 29.7.0
jest-mock: 29.7.0
jest-util: 29.7.0
@@ -2246,7 +2250,7 @@ snapshots:
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@jridgewell/trace-mapping': 0.3.31
'@types/node': 24.3.1
'@types/node': 24.3.3
chalk: 4.1.2
collect-v8-coverage: 1.0.2
exit: 0.1.2
@@ -2316,7 +2320,7 @@ snapshots:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@types/node': 24.3.1
'@types/node': 24.3.3
'@types/yargs': 17.0.33
chalk: 4.1.2
@@ -2386,7 +2390,7 @@ snapshots:
'@types/graceful-fs@4.1.9':
dependencies:
'@types/node': 24.3.1
'@types/node': 24.3.3
'@types/istanbul-lib-coverage@2.0.6': {}
@@ -2407,7 +2411,7 @@ snapshots:
'@types/luxon@3.4.2': {}
'@types/node@24.3.1':
'@types/node@24.3.3':
dependencies:
undici-types: 7.10.0
@@ -2442,7 +2446,7 @@ snapshots:
'@typescript-eslint/types': 8.43.0
'@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2)
'@typescript-eslint/visitor-keys': 8.43.0
debug: 4.4.1
debug: 4.4.3
eslint: 9.35.0
typescript: 5.9.2
transitivePeerDependencies:
@@ -2452,7 +2456,7 @@ snapshots:
dependencies:
'@typescript-eslint/tsconfig-utils': 8.43.0(typescript@5.9.2)
'@typescript-eslint/types': 8.43.0
debug: 4.4.1
debug: 4.4.3
typescript: 5.9.2
transitivePeerDependencies:
- supports-color
@@ -2471,7 +2475,7 @@ snapshots:
'@typescript-eslint/types': 8.43.0
'@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.2)
'@typescript-eslint/utils': 8.43.0(eslint@9.35.0)(typescript@5.9.2)
debug: 4.4.1
debug: 4.4.3
eslint: 9.35.0
ts-api-utils: 2.1.0(typescript@5.9.2)
typescript: 5.9.2
@@ -2486,7 +2490,7 @@ snapshots:
'@typescript-eslint/tsconfig-utils': 8.43.0(typescript@5.9.2)
'@typescript-eslint/types': 8.43.0
'@typescript-eslint/visitor-keys': 8.43.0
debug: 4.4.1
debug: 4.4.3
fast-glob: 3.3.3
is-glob: 4.0.3
minimatch: 9.0.5
@@ -2550,7 +2554,7 @@ snapshots:
asynckit@0.4.0: {}
axios@1.11.0:
axios@1.12.1:
dependencies:
follow-redirects: 1.15.11
form-data: 4.0.4
@@ -2615,6 +2619,8 @@ snapshots:
balanced-match@1.0.2: {}
baseline-browser-mapping@2.8.3: {}
brace-expansion@1.1.12:
dependencies:
balanced-match: 1.0.2
@@ -2628,12 +2634,13 @@ snapshots:
dependencies:
fill-range: 7.1.1
browserslist@4.25.4:
browserslist@4.26.0:
dependencies:
baseline-browser-mapping: 2.8.3
caniuse-lite: 1.0.30001741
electron-to-chromium: 1.5.217
node-releases: 2.0.20
update-browserslist-db: 1.1.3(browserslist@4.25.4)
electron-to-chromium: 1.5.218
node-releases: 2.0.21
update-browserslist-db: 1.1.3(browserslist@4.26.0)
bs-logger@0.2.6:
dependencies:
@@ -2693,13 +2700,13 @@ snapshots:
convert-source-map@2.0.0: {}
create-jest@29.7.0(@types/node@24.3.1):
create-jest@29.7.0(@types/node@24.3.3):
dependencies:
'@jest/types': 29.6.3
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.11
jest-config: 29.7.0(@types/node@24.3.1)
jest-config: 29.7.0(@types/node@24.3.3)
jest-util: 29.7.0
prompts: 2.4.2
transitivePeerDependencies:
@@ -2719,7 +2726,7 @@ snapshots:
shebang-command: 2.0.0
which: 2.0.2
debug@4.4.1:
debug@4.4.3:
dependencies:
ms: 2.1.3
@@ -2743,7 +2750,7 @@ snapshots:
es-errors: 1.3.0
gopd: 1.2.0
electron-to-chromium@1.5.217: {}
electron-to-chromium@1.5.218: {}
emittery@0.13.1: {}
@@ -2830,7 +2837,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.4.1
debug: 4.4.3
escape-string-regexp: 4.0.0
eslint-scope: 8.4.0
eslint-visitor-keys: 4.2.1
@@ -3113,7 +3120,7 @@ snapshots:
istanbul-lib-source-maps@4.0.1:
dependencies:
debug: 4.4.1
debug: 4.4.3
istanbul-lib-coverage: 3.2.2
source-map: 0.6.1
transitivePeerDependencies:
@@ -3136,7 +3143,7 @@ snapshots:
'@jest/expect': 29.7.0
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
chalk: 4.1.2
co: 4.6.0
dedent: 1.7.0
@@ -3156,16 +3163,16 @@ snapshots:
- babel-plugin-macros
- supports-color
jest-cli@29.7.0(@types/node@24.3.1):
jest-cli@29.7.0(@types/node@24.3.3):
dependencies:
'@jest/core': 29.7.0
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
chalk: 4.1.2
create-jest: 29.7.0(@types/node@24.3.1)
create-jest: 29.7.0(@types/node@24.3.3)
exit: 0.1.2
import-local: 3.2.0
jest-config: 29.7.0(@types/node@24.3.1)
jest-config: 29.7.0(@types/node@24.3.3)
jest-util: 29.7.0
jest-validate: 29.7.0
yargs: 17.7.2
@@ -3175,7 +3182,7 @@ snapshots:
- supports-color
- ts-node
jest-config@29.7.0(@types/node@24.3.1):
jest-config@29.7.0(@types/node@24.3.3):
dependencies:
'@babel/core': 7.28.4
'@jest/test-sequencer': 29.7.0
@@ -3200,7 +3207,7 @@ snapshots:
slash: 3.0.0
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 24.3.1
'@types/node': 24.3.3
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@@ -3229,7 +3236,7 @@ snapshots:
'@jest/environment': 29.7.0
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
jest-mock: 29.7.0
jest-util: 29.7.0
@@ -3239,7 +3246,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
'@types/graceful-fs': 4.1.9
'@types/node': 24.3.1
'@types/node': 24.3.3
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.11
@@ -3278,7 +3285,7 @@ snapshots:
jest-mock@29.7.0:
dependencies:
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
jest-util: 29.7.0
jest-pnp-resolver@1.2.3(jest-resolve@29.7.0):
@@ -3313,7 +3320,7 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
chalk: 4.1.2
emittery: 0.13.1
graceful-fs: 4.2.11
@@ -3341,7 +3348,7 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
chalk: 4.1.2
cjs-module-lexer: 1.4.3
collect-v8-coverage: 1.0.2
@@ -3387,7 +3394,7 @@ snapshots:
jest-util@29.7.0:
dependencies:
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@@ -3406,7 +3413,7 @@ snapshots:
dependencies:
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
'@types/node': 24.3.1
'@types/node': 24.3.3
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.13.1
@@ -3415,17 +3422,17 @@ snapshots:
jest-worker@29.7.0:
dependencies:
'@types/node': 24.3.1
'@types/node': 24.3.3
jest-util: 29.7.0
merge-stream: 2.0.0
supports-color: 8.1.1
jest@29.7.0(@types/node@24.3.1):
jest@29.7.0(@types/node@24.3.3):
dependencies:
'@jest/core': 29.7.0
'@jest/types': 29.6.3
import-local: 3.2.0
jest-cli: 29.7.0(@types/node@24.3.1)
jest-cli: 29.7.0(@types/node@24.3.3)
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
@@ -3535,7 +3542,7 @@ snapshots:
node-int64@0.4.0: {}
node-releases@2.0.20: {}
node-releases@2.0.21: {}
normalize-path@3.0.0: {}
@@ -3732,12 +3739,12 @@ snapshots:
dependencies:
typescript: 5.9.2
ts-jest@29.4.1(@babel/core@7.28.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.4))(jest-util@29.7.0)(jest@29.7.0(@types/node@24.3.1))(typescript@5.9.2):
ts-jest@29.4.1(@babel/core@7.28.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.4))(jest-util@29.7.0)(jest@29.7.0(@types/node@24.3.3))(typescript@5.9.2):
dependencies:
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
handlebars: 4.7.8
jest: 29.7.0(@types/node@24.3.1)
jest: 29.7.0(@types/node@24.3.3)
json5: 2.2.3
lodash.memoize: 4.1.2
make-error: 1.3.6
@@ -3787,9 +3794,9 @@ snapshots:
undici-types@7.10.0: {}
update-browserslist-db@1.1.3(browserslist@4.25.4):
update-browserslist-db@1.1.3(browserslist@4.26.0):
dependencies:
browserslist: 4.25.4
browserslist: 4.26.0
escalade: 3.2.0
picocolors: 1.1.1
+11 -1
View File
@@ -9,9 +9,19 @@ export class SonarrClient {
constructor(host: string, apiKey: string, logLevel = 'info') {
this.host = host;
this.logLevel = logLevel;
// Validate host URL to prevent data: URI attacks
const url = new URL(host);
if (!['http:', 'https:'].includes(url.protocol)) {
throw new Error(`Invalid protocol: ${url.protocol}. Only HTTP and HTTPS are allowed.`);
}
this.client = axios.create({
baseURL: `${host}/api/v3`,
headers: { 'X-Api-Key': apiKey }
headers: { 'X-Api-Key': apiKey },
maxContentLength: 50 * 1024 * 1024, // 50MB limit
maxBodyLength: 50 * 1024 * 1024, // 50MB limit
timeout: 30000 // 30 second timeout
});
}