diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..e16622d6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,28 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" + - "frontend" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + groups: + non-major: + update-types: ["minor", "patch"] + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 3 + labels: + - "dependencies" + - "ci" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] diff --git a/OWNERS.md b/OWNERS.md new file mode 100644 index 00000000..50e8bd18 --- /dev/null +++ b/OWNERS.md @@ -0,0 +1,13 @@ +# Code Ownership + +## Owner +- **Name:** Elliot Taylor +- **GitHub:** [@ejntaylor](https://github.com/ejntaylor) + +## Category +Marketing / Content + +## Responsibilities +- Security posture and patching +- Answering questions about purpose, lifecycle, and dependencies +- Deciding on continued maintenance or deprecation diff --git a/README.md b/README.md index 89ff0776..6ab1d788 100644 --- a/README.md +++ b/README.md @@ -51,3 +51,11 @@ All commands are run from the root of the project, from a terminal: | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | `npm run astro -- --help` | Get help using the Astro CLI | + +## Deploying +There is no manual deploy step. Netlify watches this repository: + +- Every push to `main` (including merged pull requests) is built and published to [docs.patchstack.com](https://docs.patchstack.com) automatically. +- Every pull request gets a Netlify Deploy Preview; the link is posted as a comment and status check on the PR. + +This repository has no GitHub Actions workflows, so there is nothing to run or check on the Actions tab. Build settings live in the Netlify project; `netlify.toml` only holds redirect rules. diff --git a/astro.config.mjs b/astro.config.mjs index 0c5339fe..fd83287c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,11 +1,81 @@ +import { readFile, writeFile } from 'node:fs/promises'; +import { fileURLToPath } from 'node:url'; import { defineConfig, passthroughImageService } from 'astro/config'; import starlight from '@astrojs/starlight'; import starlightLlmsTxt from 'starlight-llms-txt' +import starlightOpenAPI, { createOpenAPISidebarGroup } from 'starlight-openapi' +import Converter from 'openapi-to-postmanv2' + +const threatIntelStandardSidebarGroup = createOpenAPISidebarGroup(); +const threatIntelExtendedSidebarGroup = createOpenAPISidebarGroup(); +const threatIntelNpmSidebarGroup = createOpenAPISidebarGroup(); const site_url = process.env.URL; const site = site_url || 'http://localhost:4321'; + +const postmanCollections = [ + { + openapi: './public/schemas/threat-intel-standard.yaml', + output: './public/schemas/threat-intel-standard.postman_collection.json', + }, + { + openapi: './public/schemas/threat-intel-extended.yaml', + output: './public/schemas/threat-intel-extended.postman_collection.json', + }, + { + openapi: './public/schemas/threat-intel-npm.yaml', + output: './public/schemas/threat-intel-npm.postman_collection.json', + }, +]; + +// Recursively drop `id` and `_postman_id` keys so the output is deterministic. +// openapi-to-postmanv2 inserts fresh UUIDs on every run, which would cause +// churn in git. Both fields are optional in Collection v2.1 — Postman assigns +// new ids on import. +function stripIds(value) { + if (Array.isArray(value)) return value.map(stripIds); + if (value && typeof value === 'object') { + const out = {}; + for (const [key, val] of Object.entries(value)) { + if (key === 'id' || key === '_postman_id') continue; + out[key] = stripIds(val); + } + return out; + } + return value; +} + +function postmanFromOpenAPI() { + return { + name: 'postman-from-openapi', + hooks: { + 'astro:config:setup': async ({ logger }) => { + for (const { openapi, output } of postmanCollections) { + const spec = await readFile(fileURLToPath(new URL(openapi, import.meta.url)), 'utf8'); + await new Promise((resolve, reject) => { + Converter.convert( + { type: 'string', data: spec }, + { requestParametersResolution: 'Example' }, + async (err, result) => { + if (err || !result.result) { + return reject(err ?? new Error(result.reason ?? 'Postman conversion failed')); + } + await writeFile( + fileURLToPath(new URL(output, import.meta.url)), + JSON.stringify(stripIds(result.output[0].data), null, 2), + ); + logger.info(`generated ${output}`); + resolve(); + }, + ); + }); + } + }, + }, + }; +} // https://astro.build/config export default defineConfig({ site: site, @@ -15,20 +85,30 @@ export default defineConfig({ banner: { enabled: false, content: 'Black Friday Deal - 50% off dev plan for 6 months', - + }, integrations: [ + postmanFromOpenAPI(), starlight({ plugins: [ - starlightLlmsTxt() - // Generate the OpenAPI documentation pages. - // starlightOpenAPI([ - // { - // base: 'developer-api', - // label: 'My API', - // schema: './schemas/test.yaml', - // }, - // ]) + starlightLlmsTxt(), + starlightOpenAPI([ + { + base: 'api-reference/threat-intelligence-standard', + schema: './public/schemas/threat-intel-standard.yaml', + sidebar: { label: 'Reference', group: threatIntelStandardSidebarGroup }, + }, + { + base: 'api-reference/threat-intelligence-extended', + schema: './public/schemas/threat-intel-extended.yaml', + sidebar: { label: 'Reference', group: threatIntelExtendedSidebarGroup }, + }, + { + base: 'api-reference/threat-intelligence-npm', + schema: './public/schemas/threat-intel-npm.yaml', + sidebar: { label: 'NPM features', group: threatIntelNpmSidebarGroup, collapsed: true }, + }, + ]), ], title: 'Patchstack Docs', favicon: '/images/psfavicon.svg', @@ -73,7 +153,33 @@ export default defineConfig({ { label: 'API solutions', collapsed: true, - autogenerate: { directory: 'API solutions', collapsed: true }, + items: [ + { slug: 'api-solutions' }, + { + label: 'App API', + collapsed: true, + autogenerate: { directory: 'API solutions/App API', collapsed: true }, + }, + { + label: 'Threat Intelligence API', + collapsed: true, + items: [ + { slug: 'api-solutions/threat-intelligence-api/overview' }, + { slug: 'api-solutions/threat-intelligence-api/extended' }, + threatIntelExtendedSidebarGroup, + { + label: 'NPM features', + collapsed: true, + items: [ + { slug: 'api-solutions/threat-intelligence-api/npm-features' }, + { label: 'GET /all (new)', link: '/api-reference/threat-intelligence-npm/operations/listallvulnerabilities/' }, + { label: 'Full reference', link: '/api-reference/threat-intelligence-npm/' }, + ], + }, + { slug: 'api-solutions/threat-intelligence-api/api-properties' }, + ], + }, + ], }, { label: 'Vulnerability Disclosure Program', diff --git a/netlify.toml b/netlify.toml index 7428d8bf..78ab7d75 100644 --- a/netlify.toml +++ b/netlify.toml @@ -454,7 +454,17 @@ [[redirects]] from = "/docs/automatic-updates" - to = "/patchstack-app/software/automatic-updates/" + to = "/patchstack-app/software/software-overview/" + +[[redirects]] + from = "/patchstack-app/software/automatic-updates/" + to = "/patchstack-app/software/software-overview/" + status = 301 + +[[redirects]] + from = "/patchstack-app/software/automatic-updates" + to = "/patchstack-app/software/software-overview/" + status = 301 [[redirects]] from = "/docs/protection-overview" @@ -666,7 +676,11 @@ [[redirects]] from = "/docs/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-127001-or-other-security-checks" - to = "/faq-troubleshooting/technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-127001-or-other-security-checks/" + to = "/faq-troubleshooting/technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-27001-or-other-security-checks/" + +[[redirects]] + from = "/faq-troubleshooting/technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-127001-or-other-security-checks" + to = "/faq-troubleshooting/technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-27001-or-other-security-checks/" [[redirects]] from = "/docs/updating-patchstack-from-2020" @@ -1024,7 +1038,36 @@ from = "/api-solutions/threat-intelligence-api/enterprise/" to = "/api-solutions/threat-intelligence-api/extended/" +[[redirects]] + from = "/api-solutions/threat-intelligence-api/beta/" + to = "/api-solutions/threat-intelligence-api/npm-features/" + status = 301 + +[[redirects]] + from = "/api-reference/threat-intelligence-beta/" + to = "/api-reference/threat-intelligence-npm/" + status = 301 + +[[redirects]] + from = "/api-reference/threat-intelligence-beta/*" + to = "/api-reference/threat-intelligence-npm/:splat" + status = 301 + [[redirects]] from = "/patchstack-app/account-settings/team/" - to = "/patchstack-app/account-settings/seats/" \ No newline at end of file + to = "/patchstack-app/account-settings/seats/" + +[[redirects]] + from = "/patchstack-plugin/patchstack-connector/how-to-install-on-joomla/" + to = "/patchstack-plugin/patchstack-connector/joomla-support-deprecated/" + status = 301 +[[redirects]] + from = "/patchstack-app/pulse/pulse-overview/" + to = "/patchstack-app/patchstack-for-javascript/overview/" + status = 301 + +[[redirects]] + from = "/patchstack-app/pulse/*" + to = "/patchstack-app/patchstack-for-javascript/:splat" + status = 301 diff --git a/package-lock.json b/package-lock.json index 8f9d49ae..3e7f090c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,27 @@ "astro-og-canvas": "^0.5.3", "js-cookie": "^3.0.5", "sharp": "^0.33.4", - "starlight-llms-txt": "^0.5.1" + "starlight-llms-txt": "^0.5.1", + "starlight-openapi": "^0.22.1" + }, + "devDependencies": { + "openapi-to-postmanv2": "^6.0.1" + } + }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-13.0.5.tgz", + "integrity": "sha512-xfh4xVJD62gG6spIc7lwxoWT+l16nZu1ELyU8FkjaP/oD2yP09EvLAU6KhtudN9aML2Khhs9pY6Slr7KGTES3w==", + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" } }, "node_modules/@astrojs/compiler": { @@ -156,6 +176,20 @@ "node": "18.20.8 || ^20.3.0 || >=22.0.0" } }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-string-parser": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", @@ -165,9 +199,10 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", - "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -623,6 +658,13 @@ "node": ">=18" } }, + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", + "dev": true, + "license": "MIT" + }, "node_modules/@expressive-code/core": { "version": "0.41.3", "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.41.3.tgz", @@ -664,6 +706,23 @@ "@expressive-code/core": "^0.41.3" } }, + "node_modules/@faker-js/faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==", + "deprecated": "Please update to a newer version.", + "dev": true, + "license": "MIT" + }, + "node_modules/@humanwhocodes/momoa": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", + "integrity": "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.10.0" + } + }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.33.5", "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", @@ -1116,6 +1175,55 @@ "win32" ] }, + "node_modules/@readme/better-ajv-errors": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@readme/better-ajv-errors/-/better-ajv-errors-2.4.0.tgz", + "integrity": "sha512-9WODaOAKSl/mU+MYNZ2aHCrkoRSvmQ+1YkLj589OEqqjOAhbn8j7Z+ilYoiTu/he6X63/clsxxAB4qny9/dDzg==", + "license": "Apache-2.0", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/runtime": "^7.22.5", + "@humanwhocodes/momoa": "^2.0.3", + "jsonpointer": "^5.0.0", + "leven": "^3.1.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "ajv": "4.11.8 - 8" + } + }, + "node_modules/@readme/openapi-parser": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@readme/openapi-parser/-/openapi-parser-4.1.2.tgz", + "integrity": "sha512-lAFH88r/CHs5VZDUocEda0OSMSQsr6801sziIjOKyVA+0hSFN+BPuelPF5XvkMROHecnPd+XEJN1iNQqCgER/g==", + "license": "MIT", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^13.0.5", + "@readme/better-ajv-errors": "^2.3.2", + "@readme/openapi-schemas": "^3.1.0", + "@types/json-schema": "^7.0.15", + "ajv": "^8.12.0", + "ajv-draft-04": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, + "node_modules/@readme/openapi-schemas": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@readme/openapi-schemas/-/openapi-schemas-3.1.0.tgz", + "integrity": "sha512-9FC/6ho8uFa8fV50+FPy/ngWN53jaUu4GRXlAjcxIRrzhltJnpKkBG2Tp0IDraFJeWrOpk84RJ9EMEEYzaI1Bw==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@rollup/pluginutils": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.2.0.tgz", @@ -1143,240 +1251,325 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.45.1.tgz", - "integrity": "sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz", + "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.45.1.tgz", - "integrity": "sha512-ujQ+sMXJkg4LRJaYreaVx7Z/VMgBBd89wGS4qMrdtfUFZ+TSY5Rs9asgjitLwzeIbhwdEhyj29zhst3L1lKsRQ==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz", + "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.45.1.tgz", - "integrity": "sha512-FSncqHvqTm3lC6Y13xncsdOYfxGSLnP+73k815EfNmpewPs+EyM49haPS105Rh4aF5mJKywk9X0ogzLXZzN9lA==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz", + "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.45.1.tgz", - "integrity": "sha512-2/vVn/husP5XI7Fsf/RlhDaQJ7x9zjvC81anIVbr4b/f0xtSmXQTFcGIQ/B1cXIYM6h2nAhJkdMHTnD7OtQ9Og==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz", + "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.45.1.tgz", - "integrity": "sha512-4g1kaDxQItZsrkVTdYQ0bxu4ZIQ32cotoQbmsAnW1jAE4XCMbcBPDirX5fyUzdhVCKgPcrwWuucI8yrVRBw2+g==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz", + "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.45.1.tgz", - "integrity": "sha512-L/6JsfiL74i3uK1Ti2ZFSNsp5NMiM4/kbbGEcOCps99aZx3g8SJMO1/9Y0n/qKlWZfn6sScf98lEOUe2mBvW9A==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz", + "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "freebsd" ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.45.1.tgz", - "integrity": "sha512-RkdOTu2jK7brlu+ZwjMIZfdV2sSYHK2qR08FUWcIoqJC2eywHbXr0L8T/pONFwkGukQqERDheaGTeedG+rra6Q==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz", + "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.45.1.tgz", - "integrity": "sha512-3kJ8pgfBt6CIIr1o+HQA7OZ9mp/zDk3ctekGl9qn/pRBgrRgfwiffaUmqioUGN9hv0OHv2gxmvdKOkARCtRb8Q==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz", + "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==", "cpu": [ "arm" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.45.1.tgz", - "integrity": "sha512-k3dOKCfIVixWjG7OXTCOmDfJj3vbdhN0QYEqB+OuGArOChek22hn7Uy5A/gTDNAcCy5v2YcXRJ/Qcnm4/ma1xw==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz", + "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.45.1.tgz", - "integrity": "sha512-PmI1vxQetnM58ZmDFl9/Uk2lpBBby6B6rF4muJc65uZbxCs0EA7hhKCk2PKlmZKuyVSHAyIw3+/SiuMLxKxWog==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz", + "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.45.1.tgz", - "integrity": "sha512-9UmI0VzGmNJ28ibHW2GpE2nF0PBQqsyiS4kcJ5vK+wuwGnV5RlqdczVocDSUfGX/Na7/XINRVoUgJyFIgipoRg==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz", + "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==", "cpu": [ "loong64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.45.1.tgz", - "integrity": "sha512-7nR2KY8oEOUTD3pBAxIBBbZr0U7U+R9HDTPNy+5nVVHDXI4ikYniH1oxQz9VoB5PbBU1CZuDGHkLJkd3zLMWsg==", + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz", + "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz", + "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==", "cpu": [ "ppc64" ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz", + "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==", + "cpu": [ + "ppc64" + ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.45.1.tgz", - "integrity": "sha512-nlcl3jgUultKROfZijKjRQLUu9Ma0PeNv/VFHkZiKbXTBQXhpytS8CIj5/NfBeECZtY2FJQubm6ltIxm/ftxpw==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz", + "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.45.1.tgz", - "integrity": "sha512-HJV65KLS51rW0VY6rvZkiieiBnurSzpzore1bMKAhunQiECPuxsROvyeaot/tcK3A3aGnI+qTHqisrpSgQrpgA==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz", + "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==", "cpu": [ "riscv64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.45.1.tgz", - "integrity": "sha512-NITBOCv3Qqc6hhwFt7jLV78VEO/il4YcBzoMGGNxznLgRQf43VQDae0aAzKiBeEPIxnDrACiMgbqjuihx08OOw==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz", + "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==", "cpu": [ "s390x" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.45.1.tgz", - "integrity": "sha512-+E/lYl6qu1zqgPEnTrs4WysQtvc/Sh4fC2nByfFExqgYrqkKWp1tWIbe+ELhixnenSpBbLXNi6vbEEJ8M7fiHw==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz", + "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.45.1.tgz", - "integrity": "sha512-a6WIAp89p3kpNoYStITT9RbTbTnqarU7D8N8F2CV+4Cl9fwCOZraLVuVFvlpsW0SbIiYtEnhCZBPLoNdRkjQFw==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz", + "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" ] }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz", + "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz", + "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.45.1.tgz", - "integrity": "sha512-T5Bi/NS3fQiJeYdGvRpTAP5P02kqSOpqiopwhj0uaXB6nzs5JVi2XMJb18JUSKhCOX8+UE1UKQufyD6Or48dJg==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz", + "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==", "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.45.1.tgz", - "integrity": "sha512-lxV2Pako3ujjuUe9jiU3/s7KSrDfH6IgTSQOnDWr9aJ92YsFd7EurmClK0ly/t8dzMkDtd04g60WX6yl0sGfdw==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz", + "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==", "cpu": [ "ia32" ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz", + "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==", + "cpu": [ + "x64" + ], + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.45.1.tgz", - "integrity": "sha512-M/fKi4sasCdM8i0aWJjCSFm2qEnYRR8AMLG2kxp6wD13+tMGA4Z1tVAuHkNRjud5SW2EM3naLuK35w9twvf6aA==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz", + "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==", "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -1497,6 +1690,12 @@ "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, "node_modules/@types/mdast": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", @@ -1581,6 +1780,54 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "license": "MIT", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ansi-align": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", @@ -1661,9 +1908,10 @@ } }, "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -1816,6 +2064,13 @@ "astro": "^3.0.0 || ^4.0.0 || ^5.0.0" } }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/axobject-query": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", @@ -1944,6 +2199,13 @@ "base64-js": "^1.1.2" } }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true, + "license": "MIT" + }, "node_modules/camelcase": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", @@ -2019,6 +2281,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/charset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", + "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -2058,6 +2330,100 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -2129,11 +2495,41 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, "node_modules/common-ancestor-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==" }, + "node_modules/compute-gcd": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", + "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "node_modules/compute-lcm": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", + "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", + "dev": true, + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, "node_modules/cookie": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", @@ -2143,9 +2539,10 @@ } }, "node_modules/cookie-es": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.2.tgz", - "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.3.tgz", + "integrity": "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==", + "license": "MIT" }, "node_modules/cross-fetch": { "version": "3.2.0", @@ -2230,9 +2627,10 @@ } }, "node_modules/defu": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", - "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", + "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", + "license": "MIT" }, "node_modules/dequal": { "version": "2.0.3", @@ -2267,9 +2665,10 @@ } }, "node_modules/devalue": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz", - "integrity": "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.7.1.tgz", + "integrity": "sha512-MUbZ586EgQqdRnC4yDrlod3BEdyvE4TapGYHMW2CiaW+KkkFmWEFqBUaLltEZCGi0iFXCEjRF0OjF0DV2QHjOA==", + "license": "MIT" }, "node_modules/devlop": { "version": "1.1.0", @@ -2289,9 +2688,10 @@ "integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==" }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.2.tgz", + "integrity": "sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -2342,6 +2742,13 @@ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==" }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", + "dev": true, + "license": "MIT" + }, "node_modules/esast-util-from-estree": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz", @@ -2412,6 +2819,16 @@ "@esbuild/win32-x64": "0.25.6" } }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", @@ -2533,6 +2950,29 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fdir": { "version": "6.4.6", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", @@ -2546,6 +2986,16 @@ } } }, + "node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -2590,6 +3040,13 @@ "unicode-trie": "^2.0.0" } }, + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "dev": true, + "license": "MIT" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2603,6 +3060,16 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-east-asian-width": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", @@ -2619,19 +3086,30 @@ "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==" }, - "node_modules/h3": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.3.tgz", - "integrity": "sha512-z6GknHqyX0h9aQaTx22VZDf6QyZn+0Nh+Ym8O/u0SGSkyF5cuTJYKlc8MkzW3Nzf9LE1ivcpmYC3FUGpywhuUQ==", + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "dev": true, + "license": "MIT", "dependencies": { - "cookie-es": "^1.2.2", - "crossws": "^0.3.4", - "defu": "^6.1.4", + "lodash": "^4.17.15" + } + }, + "node_modules/h3": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.11.tgz", + "integrity": "sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==", + "license": "MIT", + "dependencies": { + "cookie-es": "^1.2.3", + "crossws": "^0.3.5", + "defu": "^6.1.6", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", - "node-mock-http": "^1.0.0", + "node-mock-http": "^1.0.4", "radix3": "^1.1.2", - "ufo": "^1.6.1", + "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, @@ -3042,6 +3520,20 @@ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==" }, + "node_modules/http-reasons": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/http-reasons/-/http-reasons-0.1.0.tgz", + "integrity": "sha512-P6kYh0lKZ+y29T2Gqz+RlC9WBLhKe8kDmcJ+A+611jFfxdPsbMRQ5aNmFRM3lENqFkK+HTTL+tlQviAiv0AbLQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/http2-client": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==", + "dev": true, + "license": "MIT" + }, "node_modules/i18next": { "version": "23.16.8", "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.8.tgz", @@ -3064,6 +3556,19 @@ "@babel/runtime": "^7.23.2" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/import-meta-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", @@ -3211,6 +3716,12 @@ "node": ">=14" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3222,6 +3733,56 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "foreach": "^2.0.4" + } + }, + "node_modules/json-schema-compare": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", + "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.4" + } + }, + "node_modules/json-schema-merge-allof": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.8.1.tgz", + "integrity": "sha512-CTUKmIlPJbsWfzRRnOXz+0MjIqvnleIXwFTzz+t9T86HnYX/Rozria6ZVGLktAU9e+NygNljveP+yxqtQp/Q4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "compute-lcm": "^1.1.2", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.20" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -3238,6 +3799,32 @@ "node": ">= 8" } }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/liquid-json": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/liquid-json/-/liquid-json-0.3.1.tgz", + "integrity": "sha512-wUayTU8MS827Dam6MxgD72Ui+KOSF+u/eIqpatOtjnvgJ0+mnDq33uC2M7J0tPK+upe/DpUAuK4JUU89iBoNKQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, "node_modules/longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -3544,9 +4131,10 @@ } }, "node_modules/mdast-util-to-hast": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", - "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", + "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", + "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", @@ -4313,9 +4901,10 @@ } }, "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -4323,6 +4912,29 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/mime-format": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.2.tgz", + "integrity": "sha512-Y5ERWVcyh3sby9Fx2U5F1yatiTFjNsqF5NltihTWI9QgNtr5o3dbCZdcKa1l2wyfhnwwoP9HGNxga7LqZLA6gw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, "node_modules/mrmime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", @@ -4392,15 +5004,39 @@ } } }, + "node_modules/node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "http2-client": "^1.2.5" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, "node_modules/node-fetch-native": { "version": "1.6.6", "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.6.tgz", "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==" }, "node_modules/node-mock-http": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.1.tgz", - "integrity": "sha512-0gJJgENizp4ghds/Ywu2FCmcRsgBTmRQzYPZm61wy+Em2sBarSka0OhQS5huLBg6od1zkNpnWMCZloQDFVvOMQ==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.4.tgz", + "integrity": "sha512-8DY+kFsDkNXy1sJglUfuODx1/opAGJGyrTuFqEoN90oRc2Vk0ZbD4K2qmKXBBEhZQzdKHIVfEJpDU8Ak2NJEvQ==", + "license": "MIT" + }, + "node_modules/node-readfiles": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es6-promise": "^3.2.1" + } }, "node_modules/normalize-path": { "version": "3.0.0", @@ -4421,6 +5057,152 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "fast-safe-stringify": "^2.0.7" + } + }, + "node_modules/oas-linter": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", + "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@exodus/schemasafe": "^1.0.0-rc.2", + "should": "^13.2.1", + "yaml": "^1.10.0" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-linter/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/oas-resolver": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", + "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "resolve": "resolve.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-resolver-browser": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver-browser/-/oas-resolver-browser-2.5.6.tgz", + "integrity": "sha512-Jw5elT/kwUJrnGaVuRWe1D7hmnYWB8rfDDjBnpQ+RYY/dzAewGXeTexXzt4fGEo6PUE4eqKqPWF79MZxxvMppA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "path-browserify": "^1.0.1", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "resolve": "resolve.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-resolver-browser/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/oas-resolver/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/oas-schema-walker": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", + "dev": true, + "license": "BSD-3-Clause", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", + "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "call-me-maybe": "^1.0.1", + "oas-kit-common": "^1.0.8", + "oas-linter": "^3.2.2", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "reftools": "^1.1.9", + "should": "^13.2.1", + "yaml": "^1.10.0" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/ofetch": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.4.1.tgz", @@ -4451,6 +5233,65 @@ "regex-recursion": "^6.0.2" } }, + "node_modules/openapi-to-postmanv2": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/openapi-to-postmanv2/-/openapi-to-postmanv2-6.0.1.tgz", + "integrity": "sha512-zAjaTwXo07az6jjvZTw4d26QMQsFxZBxTqjj3LQQMDCCuO6+peATQc9bSmAq3QbzvikP+h2WEjTphMcIrcSurg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "ajv": "^8.11.0", + "ajv-draft-04": "1.0.0", + "ajv-formats": "2.1.1", + "async": "3.2.6", + "commander": "2.20.3", + "graphlib": "2.1.8", + "js-yaml": "4.1.0", + "json-pointer": "0.6.2", + "json-schema-merge-allof": "0.8.1", + "lodash": "4.17.21", + "neotraverse": "0.6.15", + "oas-resolver-browser": "2.5.6", + "object-hash": "3.0.0", + "openapi-types": "^12.1.3", + "path-browserify": "1.0.1", + "postman-collection": "^5.0.0", + "swagger2openapi": "7.0.8", + "yaml": "1.10.2" + }, + "bin": { + "openapi2postmanv2": "bin/openapi2postmanv2.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/openapi-to-postmanv2/node_modules/neotraverse": { + "version": "0.6.15", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.15.tgz", + "integrity": "sha512-HZpdkco+JeXq0G+WWpMJ4NsX3pqb5O7eR9uGz3FfoFt+LYzU8iRWp49nJtud6hsDoywM8tIrDo3gjgmOqJA8LA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/openapi-to-postmanv2/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "license": "MIT" + }, "node_modules/p-limit": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", @@ -4578,15 +5419,23 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "license": "MIT", "engines": { "node": ">=12" }, @@ -4657,6 +5506,62 @@ "node": ">=4" } }, + "node_modules/postman-collection": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-5.3.0.tgz", + "integrity": "sha512-PMa5vRheqDFfS1bkRg8WBidWxunRA80sT5YNLP27YC5+ycyfiLMCwPnqQd1zfvxkGk04Pr9UronWmmgsbpsVyQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.23", + "mime": "3.0.0", + "mime-format": "2.0.2", + "postman-url-encoder": "3.0.8", + "semver": "7.7.1", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/postman-collection/node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/postman-collection/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-url-encoder": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.8.tgz", + "integrity": "sha512-EOgUMBazo7JNP4TDrd64TsooCiWzzo4143Ws8E8WYGEpn2PKpq+S4XRTDhuRTYHm3VKOpUZs7ZYZq7zSDuesqA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prismjs": { "version": "1.30.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", @@ -4694,6 +5599,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/radix3": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz", @@ -4771,6 +5686,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/reftools": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", + "dev": true, + "license": "BSD-3-Clause", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, "node_modules/regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/regex/-/regex-6.0.1.tgz", @@ -5017,6 +5942,25 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/restructure": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/restructure/-/restructure-3.0.2.tgz", @@ -5080,9 +6024,10 @@ } }, "node_modules/rollup": { - "version": "4.45.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.45.1.tgz", - "integrity": "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", + "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==", + "license": "MIT", "dependencies": { "@types/estree": "1.0.8" }, @@ -5094,29 +6039,41 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.45.1", - "@rollup/rollup-android-arm64": "4.45.1", - "@rollup/rollup-darwin-arm64": "4.45.1", - "@rollup/rollup-darwin-x64": "4.45.1", - "@rollup/rollup-freebsd-arm64": "4.45.1", - "@rollup/rollup-freebsd-x64": "4.45.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.45.1", - "@rollup/rollup-linux-arm-musleabihf": "4.45.1", - "@rollup/rollup-linux-arm64-gnu": "4.45.1", - "@rollup/rollup-linux-arm64-musl": "4.45.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.45.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.45.1", - "@rollup/rollup-linux-riscv64-gnu": "4.45.1", - "@rollup/rollup-linux-riscv64-musl": "4.45.1", - "@rollup/rollup-linux-s390x-gnu": "4.45.1", - "@rollup/rollup-linux-x64-gnu": "4.45.1", - "@rollup/rollup-linux-x64-musl": "4.45.1", - "@rollup/rollup-win32-arm64-msvc": "4.45.1", - "@rollup/rollup-win32-ia32-msvc": "4.45.1", - "@rollup/rollup-win32-x64-msvc": "4.45.1", + "@rollup/rollup-android-arm-eabi": "4.60.2", + "@rollup/rollup-android-arm64": "4.60.2", + "@rollup/rollup-darwin-arm64": "4.60.2", + "@rollup/rollup-darwin-x64": "4.60.2", + "@rollup/rollup-freebsd-arm64": "4.60.2", + "@rollup/rollup-freebsd-x64": "4.60.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.2", + "@rollup/rollup-linux-arm-musleabihf": "4.60.2", + "@rollup/rollup-linux-arm64-gnu": "4.60.2", + "@rollup/rollup-linux-arm64-musl": "4.60.2", + "@rollup/rollup-linux-loong64-gnu": "4.60.2", + "@rollup/rollup-linux-loong64-musl": "4.60.2", + "@rollup/rollup-linux-ppc64-gnu": "4.60.2", + "@rollup/rollup-linux-ppc64-musl": "4.60.2", + "@rollup/rollup-linux-riscv64-gnu": "4.60.2", + "@rollup/rollup-linux-riscv64-musl": "4.60.2", + "@rollup/rollup-linux-s390x-gnu": "4.60.2", + "@rollup/rollup-linux-x64-gnu": "4.60.2", + "@rollup/rollup-linux-x64-musl": "4.60.2", + "@rollup/rollup-openbsd-x64": "4.60.2", + "@rollup/rollup-openharmony-arm64": "4.60.2", + "@rollup/rollup-win32-arm64-msvc": "4.60.2", + "@rollup/rollup-win32-ia32-msvc": "4.60.2", + "@rollup/rollup-win32-x64-gnu": "4.60.2", + "@rollup/rollup-win32-x64-msvc": "4.60.2", "fsevents": "~2.3.2" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, "node_modules/sax": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", @@ -5186,6 +6143,66 @@ "@types/hast": "^3.0.4" } }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", + "dev": true, + "license": "MIT" + }, "node_modules/simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -5223,9 +6240,10 @@ "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==" }, "node_modules/smol-toml": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.4.1.tgz", - "integrity": "sha512-CxdwHXyYTONGHThDbq5XdwbFsuY4wlClRGejfE2NtwUtiHYsP1QtNsHb/hnj31jKYSchztJsaA8pSQoVzkfCFg==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz", + "integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==", + "license": "BSD-3-Clause", "engines": { "node": ">= 18" }, @@ -5284,6 +6302,25 @@ "astro": "^5.1.6" } }, + "node_modules/starlight-openapi": { + "version": "0.22.1", + "resolved": "https://registry.npmjs.org/starlight-openapi/-/starlight-openapi-0.22.1.tgz", + "integrity": "sha512-hpYYpomwqb7f1wgpV+aV7O7sQu2QuG1VYFN+PZiqYj5RjbiCK0FKSF5YNnCZSfqiZRW3tCahu2JrxVVSqPUI+A==", + "license": "MIT", + "dependencies": { + "@readme/openapi-parser": "^4.1.2", + "github-slugger": "^2.0.0", + "url-template": "^3.1.1" + }, + "engines": { + "node": ">=18.17.1" + }, + "peerDependencies": { + "@astrojs/markdown-remark": ">=6.0.1", + "@astrojs/starlight": ">=0.34.0", + "astro": ">=5.5.0" + } + }, "node_modules/stream-replace-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz", @@ -5348,6 +6385,44 @@ "inline-style-parser": "0.2.4" } }, + "node_modules/swagger2openapi": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", + "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "call-me-maybe": "^1.0.1", + "node-fetch": "^2.6.1", + "node-fetch-h2": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-kit-common": "^1.0.8", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "oas-validator": "^5.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "boast": "boast.js", + "oas-validate": "oas-validate.js", + "swagger2openapi": "swagger2openapi.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/swagger2openapi/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/tiny-inflate": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", @@ -5465,9 +6540,10 @@ } }, "node_modules/ufo": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", - "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==" + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", + "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==", + "license": "MIT" }, "node_modules/ultrahtml": { "version": "1.6.0", @@ -5761,11 +6837,68 @@ } } }, + "node_modules/url-template": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-3.1.1.tgz", + "integrity": "sha512-4oszoaEKE/mQOtAmdMWqIRHmkxWkUZMnXFnjQ5i01CuRSK3uluxcH1MRVVVWmhlnzT1SCDfKxxficm2G37qzCA==", + "license": "BSD-3-Clause", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate.io-array": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate.io-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==", + "dev": true + }, + "node_modules/validate.io-integer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", + "integrity": "sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ==", + "dev": true, + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "node_modules/validate.io-integer-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", + "integrity": "sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "node_modules/validate.io-number": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", + "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==", + "dev": true + }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", @@ -5806,9 +6939,10 @@ } }, "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", + "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", + "license": "MIT", "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -5962,6 +7096,35 @@ "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.1.0.tgz", "integrity": "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==" }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -5970,6 +7133,51 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", diff --git a/package.json b/package.json index 0b92ff4a..606f7ea7 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,10 @@ "astro-og-canvas": "^0.5.3", "js-cookie": "^3.0.5", "sharp": "^0.33.4", - "starlight-llms-txt": "^0.5.1" + "starlight-llms-txt": "^0.5.1", + "starlight-openapi": "^0.22.1" + }, + "devDependencies": { + "openapi-to-postmanv2": "^6.0.1" } } diff --git a/public/schemas/threat-intel-extended.postman_collection.json b/public/schemas/threat-intel-extended.postman_collection.json new file mode 100644 index 00000000..43d7c8bf --- /dev/null +++ b/public/schemas/threat-intel-extended.postman_collection.json @@ -0,0 +1,1494 @@ +{ + "item": [ + { + "name": "Latest vulnerabilities", + "request": { + "name": "Latest vulnerabilities", + "description": { + "content": "Return the 20 most recently added vulnerabilities, ordered by\ndescending `created_at` (insertion time, not `disclosure_date`).\n", + "type": "text/plain" + }, + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "The 20 most recent vulnerabilities.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerabilities\": [\n {\n \"id\": 7976,\n \"product_id\": 2175,\n \"title\": \"WordPress File Upload plugin <= 4.16.2 - Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE)\",\n \"description\": \"Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE) discovered by apple502j in WordPress File Upload plugin (versions <= 4.16.2).\",\n \"disclosed_at\": \"2022-03-01T00:00:00+00:00\",\n \"created_at\": \"2022-03-07T11:17:05+00:00\",\n \"url\": \"wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"product_slug\": \"wp-file-upload\",\n \"product_name\": \"WordPress File Upload\",\n \"product_type\": \"Plugin\",\n \"vuln_type\": \"Directory Traversal\",\n \"cve\": [\n \"2021-24962\"\n ],\n \"affected_in\": \"<= 4.16.2\",\n \"fixed_in\": \"4.16.3\",\n \"direct_url\": \"https://patchstack.com/database/vulnerability/wp-file-upload/wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"disclosure_date\": \"2022-03-01 00:00:00\",\n \"product_name_premium\": null,\n \"cvss_score\": 8.8,\n \"is_exploited\": false,\n \"patch_priority\": 3,\n \"patched_in_ranges\": [\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n },\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n }\n ]\n },\n {\n \"id\": 7976,\n \"product_id\": 2175,\n \"title\": \"WordPress File Upload plugin <= 4.16.2 - Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE)\",\n \"description\": \"Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE) discovered by apple502j in WordPress File Upload plugin (versions <= 4.16.2).\",\n \"disclosed_at\": \"2022-03-01T00:00:00+00:00\",\n \"created_at\": \"2022-03-07T11:17:05+00:00\",\n \"url\": \"wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"product_slug\": \"wp-file-upload\",\n \"product_name\": \"WordPress File Upload\",\n \"product_type\": \"Plugin\",\n \"vuln_type\": \"Directory Traversal\",\n \"cve\": [\n \"2021-24962\"\n ],\n \"affected_in\": \"<= 4.16.2\",\n \"fixed_in\": \"4.16.3\",\n \"direct_url\": \"https://patchstack.com/database/vulnerability/wp-file-upload/wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"disclosure_date\": \"2022-03-01 00:00:00\",\n \"product_name_premium\": null,\n \"cvss_score\": 8.8,\n \"is_exploited\": false,\n \"patch_priority\": 3,\n \"patched_in_ranges\": [\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n },\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n }\n ]\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "product/{type}/{name}/{version}", + "item": [ + { + "name": "Find vulnerabilities for a product", + "request": { + "name": "Find vulnerabilities for a product", + "description": { + "content": "Match a specific WordPress plugin, theme or core version and return\nevery applicable advisory with the full Extended payload.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Matched advisories (possibly empty).", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerabilities\": [\n {\n \"id\": 7976,\n \"product_id\": 2175,\n \"title\": \"WordPress File Upload plugin <= 4.16.2 - Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE)\",\n \"description\": \"Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE) discovered by apple502j in WordPress File Upload plugin (versions <= 4.16.2).\",\n \"disclosed_at\": \"2022-03-01T00:00:00+00:00\",\n \"created_at\": \"2022-03-07T11:17:05+00:00\",\n \"url\": \"wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"product_slug\": \"wp-file-upload\",\n \"product_name\": \"WordPress File Upload\",\n \"product_type\": \"Plugin\",\n \"vuln_type\": \"Directory Traversal\",\n \"cve\": [\n \"2021-24962\"\n ],\n \"affected_in\": \"<= 4.16.2\",\n \"fixed_in\": \"4.16.3\",\n \"direct_url\": \"https://patchstack.com/database/vulnerability/wp-file-upload/wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"disclosure_date\": \"2022-03-01 00:00:00\",\n \"product_name_premium\": null,\n \"cvss_score\": 8.8,\n \"is_exploited\": false,\n \"patch_priority\": 3,\n \"patched_in_ranges\": [\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n },\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n }\n ]\n },\n {\n \"id\": 7976,\n \"product_id\": 2175,\n \"title\": \"WordPress File Upload plugin <= 4.16.2 - Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE)\",\n \"description\": \"Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE) discovered by apple502j in WordPress File Upload plugin (versions <= 4.16.2).\",\n \"disclosed_at\": \"2022-03-01T00:00:00+00:00\",\n \"created_at\": \"2022-03-07T11:17:05+00:00\",\n \"url\": \"wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"product_slug\": \"wp-file-upload\",\n \"product_name\": \"WordPress File Upload\",\n \"product_type\": \"Plugin\",\n \"vuln_type\": \"Directory Traversal\",\n \"cve\": [\n \"2021-24962\"\n ],\n \"affected_in\": \"<= 4.16.2\",\n \"fixed_in\": \"4.16.3\",\n \"direct_url\": \"https://patchstack.com/database/vulnerability/wp-file-upload/wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce\",\n \"disclosure_date\": \"2022-03-01 00:00:00\",\n \"product_name_premium\": null,\n \"cvss_score\": 8.8,\n \"is_exploited\": false,\n \"patch_priority\": 3,\n \"patched_in_ranges\": [\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n },\n {\n \"from_version\": \"3.0\",\n \"to_version\": \"3.0.34.1\",\n \"fixed_in\": \"3.0.34.2\"\n }\n ]\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Unknown product/version/vulnerability id.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Boolean exists check for a product", + "request": { + "name": "Boolean exists check for a product", + "description": { + "content": "Boolean-only variant of the product lookup. Returns\n`{ \"vulnerable\": true }` or `{ \"vulnerable\": false }` — cheap when you\nonly need to know whether an installed version is affected.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Boolean result.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerable\": true\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "name": "Bulk product check", + "request": { + "name": "Bulk product check", + "description": { + "content": "Check up to 50 products in a single request. Items with `exists: true`\nreturn a boolean per slug; items with `exists: false` return the full\nadvisory list per slug.\n\nThe response is keyed by `product_slug`, **not** by array index —\nduplicate slugs in the request collapse.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "[\n {\n \"name\": \"easy-digital-downloads1\",\n \"version\": \"1.0.0\",\n \"type\": \"plugin\",\n \"exists\": true\n },\n {\n \"name\": \"wordpress\",\n \"version\": \"3.0.0\",\n \"type\": \"wordpress\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Per-slug results.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"name\": \"easy-digital-downloads1\",\n \"version\": \"1.0.0\",\n \"type\": \"plugin\",\n \"exists\": true\n },\n {\n \"name\": \"wordpress\",\n \"version\": \"3.0.0\",\n \"type\": \"wordpress\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerabilities\": {\n \"easy-digital-downloads1\": true,\n \"wordpress\": true\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"name\": \"easy-digital-downloads1\",\n \"version\": \"1.0.0\",\n \"type\": \"plugin\",\n \"exists\": true\n },\n {\n \"name\": \"wordpress\",\n \"version\": \"3.0.0\",\n \"type\": \"wordpress\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"name\": \"easy-digital-downloads1\",\n \"version\": \"1.0.0\",\n \"type\": \"plugin\",\n \"exists\": true\n },\n {\n \"name\": \"wordpress\",\n \"version\": \"3.0.0\",\n \"type\": \"wordpress\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Invalid request payload (e.g. batch with more than 50 items).", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"name\": \"easy-digital-downloads1\",\n \"version\": \"1.0.0\",\n \"type\": \"plugin\",\n \"exists\": true\n },\n {\n \"name\": \"wordpress\",\n \"version\": \"3.0.0\",\n \"type\": \"wordpress\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"name\": \"easy-digital-downloads1\",\n \"version\": \"1.0.0\",\n \"type\": \"plugin\",\n \"exists\": true\n },\n {\n \"name\": \"wordpress\",\n \"version\": \"3.0.0\",\n \"type\": \"wordpress\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Find a vulnerability by id", + "request": { + "name": "Find a vulnerability by id", + "description": { + "content": "Look up a single advisory by its numeric id or PSID. Returns a richer\nshape than the list endpoints — includes CVSS vector, OWASP category,\nexternal references, credits, and submitter info.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "vulnerability", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "4760", + "key": "id", + "description": "(Required) Numeric Patchstack id or PSID." + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Detailed advisory payload.", + "originalRequest": { + "url": { + "path": [ + "vulnerability", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "4760", + "key": "id", + "description": "(Required) Numeric Patchstack id or PSID." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerability\": {\n \"title\": \"WordPress Spam protection, AntiSpam, FireWall by CleanTalk plugin <= 5.153.3 - Unauthenticated Time-Based Blind SQL Injection (SQLi) vulnerability\",\n \"description\": \"Unauthenticated Time-Based Blind SQL Injection (SQLi) vulnerability discovered by WordFence in WordPress Spam protection, AntiSpam, FireWall by CleanTalk plugin (versions <= 5.153.3).\",\n \"disclosed_at\": \"2021-05-03T00:00:00+00:00\",\n \"created_at\": \"2021-09-28T14:17:02+00:00\",\n \"is_exploited\": true,\n \"url\": \"wordpress-spam-protection-antispam-firewall-by-cleantalk-plugin-5-153-3-unauthenticated-time-based-blind-sql-injection-sqli-vulnerability\",\n \"direct_url\": \"https://patchstack.com/database/vulnerability/cleantalk-spam-protect/wordpress-spam-protection-antispam-firewall-by-cleantalk-plugin-5-153-3-unauthenticated-time-based-blind-sql-injection-sqli-vulnerability\",\n \"disclosure_date\": \"2021-05-03 00:00:00\"\n },\n \"product\": {\n \"name\": \"Spam protection, AntiSpam, FireWall by CleanTalk\",\n \"slug\": \"cleantalk-spam-protect\",\n \"type\": \"Plugin\"\n },\n \"type\": \"SQL Injection\",\n \"cve\": [\n \"2021-24295\"\n ],\n \"versions\": {\n \"affected_in\": \"<= 5.153.3\",\n \"fixed_in\": \"5.153.4\"\n },\n \"cvss\": {\n \"score\": 7.5,\n \"vector\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N\",\n \"description\": \"\"\n },\n \"owasp\": \"A1: Injection\",\n \"references_url\": [\n {\n \"url\": \"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-24295\",\n \"title\": \"CVE\"\n },\n {\n \"url\": \"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-24295\",\n \"title\": \"CVE\"\n }\n ],\n \"versions_list\": null,\n \"credit\": {\n \"name\": \"WordFence\",\n \"url\": \"https://twitter.com/wordfence\"\n },\n \"submitter\": {\n \"name\": \"h00die\",\n \"url\": \"https://packetstormsecurity.com/files/author/7166/\"\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "vulnerability", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "4760", + "key": "id", + "description": "(Required) Numeric Patchstack id or PSID." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "vulnerability", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "4760", + "key": "id", + "description": "(Required) Numeric Patchstack id or PSID." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Unknown product/version/vulnerability id.", + "originalRequest": { + "url": { + "path": [ + "vulnerability", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "4760", + "key": "id", + "description": "(Required) Numeric Patchstack id or PSID." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "vulnerability", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "4760", + "key": "id", + "description": "(Required) Numeric Patchstack id or PSID." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [], + "variable": [ + { + "type": "string", + "value": "https://patchstack.com/database/api/v2", + "key": "baseUrl" + } + ], + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "key", + "value": "PSKey" + }, + { + "key": "value", + "value": "{{apiKey}}" + }, + { + "key": "in", + "value": "header" + } + ] + }, + "info": { + "name": "Patchstack Threat Intelligence API — Extended", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "description": { + "content": "The Extended Threat Intelligence API is a superset of the\n[Standard tier](/api-solutions/threat-intelligence-api/standard/). It adds\nbulk product checks, the `/latest` rolling feed, advisory-by-id lookups,\nand a richer per-item payload (`description`, `cvss_score`, `cve`,\n`patch_priority`, `patched_in_ranges`, …).\n\nExtended has **custom pricing and is activated on request** — contact us\nat .\n\n## Authentication\n\nEvery request must include your API key in the `PSKey` HTTP request header.\n\n## Rate limiting\n\nCustom, set per contract. Contact if\nyou need a quota change.\n\n## Caching\n\nResponses are JSON and cached until the Patchstack database updates, at\nwhich point the appropriate caches are cleared.\n\n## Errors\n\n| Status | Meaning |\n|---|---|\n| `401` | Missing or invalid `PSKey` header. |\n| `403` | API key not authorised for the requested endpoint. |\n| `404` | Unknown product/version/vulnerability id. |\n| `422` | Invalid request payload (e.g. batch with more than 50 items). |\n| `429` | Rate limit exceeded. |\n| `500` | Server error — include the request id in any bug report. |\n\n## Related pages\n\n- Narrative guide with code samples: [Extended tier API](/api-solutions/threat-intelligence-api/extended/)\n- Field glossary: [API properties](/api-solutions/threat-intelligence-api/api-properties/)\n- OpenAPI spec (import into Postman / Insomnia / Bruno / Hoppscotch): \n- Postman collection (pre-imported): \n\nIntegration questions: .\n\n\nContact Support:\n Name: Patchstack\n Email: dave.jong@patchstack.com", + "type": "text/plain" + } + } +} \ No newline at end of file diff --git a/public/schemas/threat-intel-extended.yaml b/public/schemas/threat-intel-extended.yaml new file mode 100644 index 00000000..86214346 --- /dev/null +++ b/public/schemas/threat-intel-extended.yaml @@ -0,0 +1,643 @@ +openapi: 3.1.0 +info: + title: Patchstack Threat Intelligence API — Extended + version: v2 + summary: WordPress vulnerability intelligence with bulk lookups, latest-24h feed, and advisory-by-id details. + description: | + The Extended Threat Intelligence API is a superset of the + [Standard tier](/api-solutions/threat-intelligence-api/standard/). It adds + bulk product checks, the `/latest` rolling feed, advisory-by-id lookups, + and a richer per-item payload (`description`, `cvss_score`, `cve`, + `patch_priority`, `patched_in_ranges`, …). + + Extended has **custom pricing and is activated on request** — contact us + at . + + ## Authentication + + Every request must include your API key in the `PSKey` HTTP request header. + + ## Rate limiting + + Custom, set per contract. Contact if + you need a quota change. + + ## Caching + + Responses are JSON and cached until the Patchstack database updates, at + which point the appropriate caches are cleared. + + ## Errors + + | Status | Meaning | + |---|---| + | `401` | Missing or invalid `PSKey` header. | + | `403` | API key not authorised for the requested endpoint. | + | `404` | Unknown product/version/vulnerability id. | + | `422` | Invalid request payload (e.g. batch with more than 50 items). | + | `429` | Rate limit exceeded. | + | `500` | Server error — include the request id in any bug report. | + + ## Related pages + + - Narrative guide with code samples: [Extended tier API](/api-solutions/threat-intelligence-api/extended/) + - Field glossary: [API properties](/api-solutions/threat-intelligence-api/api-properties/) + - OpenAPI spec (import into Postman / Insomnia / Bruno / Hoppscotch): + - Postman collection (pre-imported): + + Integration questions: . + contact: + name: Patchstack + url: https://patchstack.com/for-hosts/ + email: dave.jong@patchstack.com + +servers: + - url: https://patchstack.com/database/api/v2 + description: Production + +security: + - PSKey: [] + +tags: + - name: Vulnerabilities + description: | + Feed and advisory-by-id lookups. + + - [`GET /latest`](/api-reference/threat-intelligence-extended/operations/listlatestvulnerabilities/) + — the 20 most recently added vulnerabilities. + - [`GET /vulnerability/{id}`](/api-reference/threat-intelligence-extended/operations/getvulnerabilitybyid/) + — detailed advisory payload for a single Patchstack id or PSID. + - name: Products + description: | + Match a single WordPress plugin, theme or core version against the + vulnerability database. + + - [`GET /product/{type}/{name}/{version}`](/api-reference/threat-intelligence-extended/operations/findproductvulnerabilities/) + — full advisory list for the product. + - [`GET /product/{type}/{name}/{version}/exists`](/api-reference/threat-intelligence-extended/operations/productvulnerabilityexists/) + — boolean-only variant for fast "is this vulnerable?" checks. + - name: Batch + description: | + Bulk endpoint for checking up to 50 products in a single request. Use + this when walking a list of installed plugins/themes — it's significantly + cheaper than issuing one request per product. + + - [`POST /batch`](/api-reference/threat-intelligence-extended/operations/batchproductcheck/) + — payload is a JSON array of up to 50 `{type, name, version, exists?}` + objects. Results are keyed by slug. + +paths: + /latest: + get: + tags: [Vulnerabilities] + summary: Latest vulnerabilities + description: | + Return the 20 most recently added vulnerabilities, ordered by + descending `created_at` (insertion time, not `disclosure_date`). + operationId: listLatestVulnerabilities + responses: + '200': + description: The 20 most recent vulnerabilities. + content: + application/json: + schema: + type: object + required: [vulnerabilities] + properties: + vulnerabilities: + type: array + items: + $ref: '#/components/schemas/ExtendedVulnerability' + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /product/{type}/{name}/{version}: + get: + tags: [Products] + summary: Find vulnerabilities for a product + description: | + Match a specific WordPress plugin, theme or core version and return + every applicable advisory with the full Extended payload. + operationId: findProductVulnerabilities + parameters: + - $ref: '#/components/parameters/ProductType' + - $ref: '#/components/parameters/ProductName' + - $ref: '#/components/parameters/ProductVersion' + responses: + '200': + description: Matched advisories (possibly empty). + content: + application/json: + schema: + type: object + required: [vulnerabilities] + properties: + vulnerabilities: + type: array + items: + $ref: '#/components/schemas/ExtendedVulnerability' + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '404': { $ref: '#/components/responses/NotFound' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /product/{type}/{name}/{version}/exists: + get: + tags: [Products] + summary: Boolean exists check for a product + description: | + Boolean-only variant of the product lookup. Returns + `{ "vulnerable": true }` or `{ "vulnerable": false }` — cheap when you + only need to know whether an installed version is affected. + operationId: productVulnerabilityExists + parameters: + - $ref: '#/components/parameters/ProductType' + - $ref: '#/components/parameters/ProductName' + - $ref: '#/components/parameters/ProductVersion' + responses: + '200': + description: Boolean result. + content: + application/json: + schema: + type: object + required: [vulnerable] + properties: + vulnerable: + type: boolean + example: + vulnerable: true + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /batch: + post: + tags: [Batch] + summary: Bulk product check + description: | + Check up to 50 products in a single request. Items with `exists: true` + return a boolean per slug; items with `exists: false` return the full + advisory list per slug. + + The response is keyed by `product_slug`, **not** by array index — + duplicate slugs in the request collapse. + operationId: batchProductCheck + requestBody: + required: true + content: + application/json: + schema: + type: array + maxItems: 50 + items: + $ref: '#/components/schemas/BatchItem' + examples: + existsOnly: + summary: Boolean-only across all items + value: + - { name: easy-digital-downloads1, version: "1.0.0", type: plugin, exists: true } + - { name: wordpress, version: "3.0.0", type: wordpress, exists: true } + mixed: + summary: Mix of full advisory list and boolean + value: + - { name: easy-digital-downloads1, version: "1.0.0", type: plugin, exists: false } + - { name: wordpress, version: "3.0.0", type: wordpress, exists: true } + responses: + '200': + description: Per-slug results. + content: + application/json: + schema: + type: object + required: [vulnerabilities] + properties: + vulnerabilities: + type: object + additionalProperties: + oneOf: + - type: boolean + - type: array + items: + $ref: '#/components/schemas/ExtendedVulnerability' + examples: + existsOnly: + summary: Boolean-only response + value: + vulnerabilities: + easy-digital-downloads1: true + wordpress: true + mixed: + summary: Mixed response + value: + vulnerabilities: + easy-digital-downloads1: + - id: 4532 + product_id: 1572 + title: "WordPress Easy Digital Downloads plugin <= 2.10.2 - Cross-Site Request Forgery (CSRF) vulnerability" + description: "Cross-Site Request Forgery (CSRF) vulnerability discovered by WPScan team in WordPress Easy Digital Downloads plugin (versions <= 2.10.2)." + disclosure_date: "2021-04-16 00:00:00" + disclosed_at: "2021-04-16T00:00:00+00:00" + created_at: "2021-04-19T04:43:04+00:00" + url: wordpress-easy-digital-downloads-plugin-2-10-2-cross-site-request-forgery-csrf-vulnerability + product_slug: easy-digital-downloads1 + product_name: "Easy Digital Downloads" + product_name_premium: null + product_type: Plugin + vuln_type: "Cross Site Request Forgery (CSRF)" + cvss_score: 6.5 + cve: [] + is_exploited: false + affected_in: "<= 2.10.2" + fixed_in: "2.10.3" + direct_url: "https://patchstack.com/database/vulnerability/easy-digital-downloads1/wordpress-easy-digital-downloads-plugin-2-10-2-cross-site-request-forgery-csrf-vulnerability" + wordpress: true + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '422': { $ref: '#/components/responses/UnprocessableEntity' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /vulnerability/{id}: + get: + tags: [Vulnerabilities] + summary: Find a vulnerability by id + description: | + Look up a single advisory by its numeric id or PSID. Returns a richer + shape than the list endpoints — includes CVSS vector, OWASP category, + external references, credits, and submitter info. + operationId: getVulnerabilityById + parameters: + - name: id + in: path + required: true + description: Numeric Patchstack id or PSID. + schema: + type: string + example: "4760" + responses: + '200': + description: Detailed advisory payload. + content: + application/json: + schema: + $ref: '#/components/schemas/VulnerabilityDetail' + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '404': { $ref: '#/components/responses/NotFound' } + '429': { $ref: '#/components/responses/TooManyRequests' } + +components: + securitySchemes: + PSKey: + type: apiKey + in: header + name: PSKey + description: | + API key issued by Patchstack. Extended access is activated on request + — contact . + + parameters: + ProductType: + name: type + in: path + required: true + description: Product ecosystem. + schema: + type: string + enum: [plugin, theme, wordpress] + example: plugin + ProductName: + name: name + in: path + required: true + description: | + WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`. + Slugs are lowercase — normalize your own data before comparison. + schema: + type: string + example: tutor + ProductVersion: + name: version + in: path + required: true + description: Concrete version (e.g. `1.5.2`). + schema: + type: string + example: "1.5.2" + + responses: + Unauthorized: + description: Missing or invalid `PSKey` header. + Forbidden: + description: API key not authorised for the requested endpoint. + NotFound: + description: Unknown product/version/vulnerability id. + UnprocessableEntity: + description: Invalid request payload (e.g. batch with more than 50 items). + TooManyRequests: + description: Rate limit exceeded. + + schemas: + ExtendedVulnerability: + type: object + description: | + Flat per-item shape returned by the Extended tier. Superset of the + Standard shape — adds `description`, `vuln_type`, `cvss_score`, `cve`, + `is_exploited`, `patch_priority`, `affected_in`, and + `patched_in_ranges`. + required: + - id + - product_id + - title + - description + - disclosed_at + - created_at + - url + - product_slug + - product_name + - product_type + - vuln_type + - cve + - affected_in + - fixed_in + - direct_url + properties: + id: + type: integer + description: Stable Patchstack vulnerability id. + example: 7976 + product_id: + type: integer + description: Stable Patchstack product id. + example: 2175 + title: + type: string + description: Human-readable title including product name, affected version, and vulnerability type. + example: "WordPress File Upload plugin <= 4.16.2 - Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE)" + description: + type: string + description: Short narrative summary of the advisory. + example: "Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE) discovered by apple502j in WordPress File Upload plugin (versions <= 4.16.2)." + disclosure_date: + type: string + description: Disclosure date in `YYYY-MM-DD HH:MM:SS` form (legacy). + example: "2022-03-01 00:00:00" + disclosed_at: + type: string + format: date-time + description: Disclosure date in ISO 8601. + example: "2022-03-01T00:00:00+00:00" + created_at: + type: string + format: date-time + description: When the row was inserted into the Patchstack database (ISO 8601). Drives `/latest` windowing. + example: "2022-03-07T11:17:05+00:00" + url: + type: string + description: URL slug for the advisory. + example: wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce + product_slug: + type: string + description: Lowercase slug of the product. + example: wp-file-upload + product_name: + type: string + description: Display name of the product. + example: "WordPress File Upload" + product_name_premium: + type: string + nullable: true + description: Premium variant name when the author ships two plugins under the same slug. `null` in the common case. + example: null + product_type: + type: string + enum: [Plugin, Theme, WordPress] + description: Product ecosystem. + example: Plugin + vuln_type: + type: string + description: High-level vulnerability category (e.g. `SQL Injection`, `Cross Site Scripting (XSS)`). + example: Directory Traversal + cvss_score: + type: number + format: float + nullable: true + description: CVSS base score, 1.0–10.0. `null` for unclassified advisories. + example: 8.8 + cve: + type: array + description: CVE identifiers. An advisory can have zero, one, or multiple. + items: + type: string + example: ["2021-24962"] + is_exploited: + type: boolean + description: Whether exploitation has been observed in the wild. + example: false + patch_priority: + type: integer + nullable: true + minimum: 1 + description: | + Recommended patch urgency. + + - `1` — Low → patch within 30 days + - `2` — Medium → patch within 7 days + - `3+` — High → patch immediately + - `null` — unknown + example: 3 + affected_in: + type: string + description: | + Affected version range. Formats include `<= x.x.x`, `< x.x.x`, + `x.x.x-x.x.x`, `x.x.x,x.x.x`, or a single `x.x.x`. + example: "<= 4.16.2" + fixed_in: + type: string + description: First fixed version. Empty string when Patchstack has not yet recorded one. + example: "4.16.3" + patched_in_ranges: + type: array + description: | + For products that ship patches across multiple minor lines + (WordPress core, WooCommerce, Ninja Forms, …), each entry + describes a `from_version`–`to_version` range and its fix. + items: + type: object + required: [from_version, to_version, fixed_in] + properties: + from_version: + type: string + description: Starting version, inclusive. + example: "3.0" + to_version: + type: string + description: Ending version, inclusive. + example: "3.0.34.1" + fixed_in: + type: string + description: Version that contains the patch for this range. + example: "3.0.34.2" + direct_url: + type: string + format: uri + description: Public Patchstack vulnerability page. + example: "https://patchstack.com/database/vulnerability/wp-file-upload/wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce" + + BatchItem: + type: object + required: [name, version, type] + properties: + name: + type: string + description: Product slug (plugin/theme slug, or `wordpress`). + example: easy-digital-downloads1 + version: + type: string + description: Concrete version. + example: "1.0.0" + type: + type: string + enum: [plugin, theme, wordpress] + example: plugin + exists: + type: boolean + description: When `true`, return a boolean-only result for this item. + example: true + + VulnerabilityDetail: + type: object + description: Response shape for `GET /vulnerability/{id}`. + required: [vulnerability, product, type, cve, versions] + properties: + vulnerability: + type: object + required: [title, description, disclosed_at, created_at, is_exploited, url, direct_url] + properties: + title: + type: string + example: "WordPress Spam protection, AntiSpam, FireWall by CleanTalk plugin <= 5.153.3 - Unauthenticated Time-Based Blind SQL Injection (SQLi) vulnerability" + description: + type: string + example: "Unauthenticated Time-Based Blind SQL Injection (SQLi) vulnerability discovered by WordFence in WordPress Spam protection, AntiSpam, FireWall by CleanTalk plugin (versions <= 5.153.3)." + disclosure_date: + type: string + description: Disclosure date in `YYYY-MM-DD HH:MM:SS` form (legacy). + example: "2021-05-03 00:00:00" + disclosed_at: + type: string + format: date-time + example: "2021-05-03T00:00:00+00:00" + created_at: + type: string + format: date-time + example: "2021-09-28T14:17:02+00:00" + is_exploited: + type: boolean + example: true + url: + type: string + description: URL slug for the advisory. + example: wordpress-spam-protection-antispam-firewall-by-cleantalk-plugin-5-153-3-unauthenticated-time-based-blind-sql-injection-sqli-vulnerability + direct_url: + type: string + format: uri + example: "https://patchstack.com/database/vulnerability/cleantalk-spam-protect/wordpress-spam-protection-antispam-firewall-by-cleantalk-plugin-5-153-3-unauthenticated-time-based-blind-sql-injection-sqli-vulnerability" + product: + type: object + required: [name, slug, type] + properties: + name: + type: string + example: "Spam protection, AntiSpam, FireWall by CleanTalk" + slug: + type: string + example: cleantalk-spam-protect + type: + type: string + enum: [Plugin, Theme, WordPress] + example: Plugin + type: + type: string + description: Vulnerability category (e.g. `SQL Injection`). + example: SQL Injection + cvss: + type: object + nullable: true + properties: + score: + type: number + format: float + nullable: true + example: 7.5 + vector: + type: string + nullable: true + example: "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" + description: + type: string + nullable: true + example: "" + owasp: + type: string + description: "OWASP category (e.g. `A1: Injection`)." + example: "A1: Injection" + references_url: + type: array + description: External reference URLs with display titles. + items: + type: object + required: [url, title] + properties: + url: + type: string + format: uri + example: "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-24295" + title: + type: string + example: CVE + cve: + type: array + items: + type: string + example: ["2021-24295"] + versions: + type: object + required: [affected_in, fixed_in] + properties: + affected_in: + type: string + example: "<= 5.153.3" + fixed_in: + type: string + example: "5.153.4" + versions_list: + type: string + nullable: true + description: Comma-separated list of specific affected versions, when applicable. + example: null + credit: + type: object + nullable: true + description: Discoverer of the vulnerability. + properties: + name: + type: string + example: WordFence + url: + type: string + format: uri + example: "https://twitter.com/wordfence" + submitter: + type: object + nullable: true + description: Submitter, when distinct from `credit`. + properties: + name: + type: string + example: h00die + url: + type: string + format: uri + example: "https://packetstormsecurity.com/files/author/7166/" diff --git a/public/schemas/threat-intel-npm.postman_collection.json b/public/schemas/threat-intel-npm.postman_collection.json new file mode 100644 index 00000000..d440956e --- /dev/null +++ b/public/schemas/threat-intel-npm.postman_collection.json @@ -0,0 +1,1808 @@ +{ + "item": [ + { + "name": "List all vulnerabilities", + "request": { + "name": "List all vulnerabilities", + "description": { + "content": "Paginated listing of every published vulnerability for the given\nplatform, ordered by descending `id`.\n\nSupports **two independent pagination strategies**:\n\n- **Offset** (`?page=&per_page=`) — returns a `pagination` block with\n totals. Easy to jump to a specific page; slower at depth and\n susceptible to row-shift when new vulnerabilities land while paging.\n- **Cursor** (`?cursor=`) — returns a `cursor` block with `next_cursor`,\n `has_more`, `per_page`. Stable under concurrent inserts and faster at\n any depth. No `total` count.\n\n`cursor` and `page` are mutually exclusive; passing both returns\n`422 Unprocessable Entity`.\n\n**Incremental sync.** Every `/all` response carries `watermark`, the\nunix time its rows were read. Send it back as `updated_since` (cursor\nmode only) to get just the entries changed since then, plus\n`removed_ids` on the first page for entries withdrawn since then.\nEntries deleted outright are not reported, so run a full listing now\nand then (daily is plenty).\n", + "type": "text/plain" + }, + "url": { + "path": [ + "all" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "platform", + "value": "wordpress", + "description": "Platform to query. Case-insensitive." + }, + { + "disabled": false, + "key": "page", + "value": "1", + "description": "Offset-pagination page (1-indexed). Mutually exclusive with `cursor`." + }, + { + "disabled": false, + "key": "per_page", + "value": "100", + "description": "Page size." + }, + { + "disabled": false, + "key": "cursor", + "value": "string", + "description": "Opaque cursor. Presence of the param switches to cursor mode (send an\nempty value to bootstrap). Mutually exclusive with `page`.\n" + }, + { + "disabled": false, + "key": "updated_since", + "value": "1793018157", + "description": "`/all` only, with `cursor`. Unix time in seconds, usually the\n`watermark` of your previous sync. Returns only entries changed at or\nafter it, and adds `removed_ids`. Without `cursor` it returns\n`422 Unprocessable Entity`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "details", + "description": "Pass `details` to include the full advisory body (`advisory_details`) per item." + } + ], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Paginated vulnerability listing.", + "originalRequest": { + "url": { + "path": [ + "all" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "updated_since", + "value": "1793018157" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerabilities\": [],\n \"pagination\": {\n \"current_page\": 1,\n \"per_page\": 25,\n \"total\": 6115,\n \"total_pages\": 245,\n \"has_next_page\": true,\n \"has_previous_page\": false,\n \"next_page\": 2,\n \"previous_page\": null,\n \"from\": 1,\n \"to\": 25\n }\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "all" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "updated_since", + "value": "1793018157" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "all" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "updated_since", + "value": "1793018157" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Invalid parameter combination (e.g. `cursor` + `page`), invalid `platform`, or `per_page > 500`.", + "originalRequest": { + "url": { + "path": [ + "all" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "updated_since", + "value": "1793018157" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "all" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "updated_since", + "value": "1793018157" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Latest vulnerabilities (last 24 hours)", + "request": { + "name": "Latest vulnerabilities (last 24 hours)", + "description": { + "content": "Returns vulnerabilities whose row was inserted into the Patchstack\ndatabase in the last 24 hours. The filter is on `created_at`\n(insertion time), **not** `disclosure_date`.\n\nAccepts the same query parameters as `/all`.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "platform", + "value": "wordpress", + "description": "Platform to query. Case-insensitive." + }, + { + "disabled": false, + "key": "page", + "value": "1", + "description": "Offset-pagination page (1-indexed). Mutually exclusive with `cursor`." + }, + { + "disabled": false, + "key": "per_page", + "value": "100", + "description": "Page size." + }, + { + "disabled": false, + "key": "cursor", + "value": "string", + "description": "Opaque cursor. Presence of the param switches to cursor mode (send an\nempty value to bootstrap). Mutually exclusive with `page`.\n" + }, + { + "disabled": false, + "key": "include", + "value": "details", + "description": "Pass `details` to include the full advisory body (`advisory_details`) per item." + } + ], + "variable": [] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Paginated 24h vulnerability listing.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerabilities\": [\n {\n \"id\": 46500,\n \"title\": \"NPM: OpenClaw: ...\",\n \"disclosed_at\": \"2026-04-03T03:15:56+00:00\",\n \"created_at\": \"2026-04-21T08:38:34+00:00\",\n \"url\": \"https://patchstack.com/database/npm/npm/openclaw/vulnerability/...\",\n \"vuln_type\": \"Other Vulnerability Type\",\n \"cve\": \"2026-41331\",\n \"is_exploited\": false,\n \"patch_priority\": 2,\n \"advisory_details\": \"## Summary\\n...\",\n \"product\": {\n \"id\": 23595,\n \"name\": \"openclaw\",\n \"slug\": \"openclaw\",\n \"type\": \"npm\"\n },\n \"cvss\": {\n \"score\": 6.9,\n \"vector\": \"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N\"\n },\n \"cwe\": {\n \"id\": 770,\n \"name\": \"Allocation of Resources Without Limits or Throttling\"\n },\n \"capec\": {\n \"id\": null,\n \"name\": null\n },\n \"references\": [\n \"https://github.com/openclaw/openclaw/security/advisories/GHSA-m6fx-m8hc-572m\",\n \"https://github.com/openclaw/openclaw/releases/tag/v2026.3.31\"\n ],\n \"ghsa\": \"GHSA-m6fx-m8hc-572m\",\n \"version_info\": {\n \"affected\": \"<= 2026.3.28\",\n \"fixed\": \"2026.3.31\"\n }\n },\n {\n \"id\": 46500,\n \"title\": \"NPM: OpenClaw: ...\",\n \"disclosed_at\": \"2026-04-03T03:15:56+00:00\",\n \"created_at\": \"2026-04-21T08:38:34+00:00\",\n \"url\": \"https://patchstack.com/database/npm/npm/openclaw/vulnerability/...\",\n \"vuln_type\": \"Other Vulnerability Type\",\n \"cve\": \"2026-41331\",\n \"is_exploited\": false,\n \"patch_priority\": 2,\n \"advisory_details\": \"## Summary\\n...\",\n \"product\": {\n \"id\": 23595,\n \"name\": \"openclaw\",\n \"slug\": \"openclaw\",\n \"type\": \"npm\"\n },\n \"cvss\": {\n \"score\": 6.9,\n \"vector\": \"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N\"\n },\n \"cwe\": {\n \"id\": 770,\n \"name\": \"Allocation of Resources Without Limits or Throttling\"\n },\n \"capec\": {\n \"id\": null,\n \"name\": null\n },\n \"references\": [\n \"https://github.com/openclaw/openclaw/security/advisories/GHSA-m6fx-m8hc-572m\",\n \"https://github.com/openclaw/openclaw/releases/tag/v2026.3.31\"\n ],\n \"ghsa\": \"GHSA-m6fx-m8hc-572m\",\n \"version_info\": {\n \"affected\": \"<= 2026.3.28\",\n \"fixed\": \"2026.3.31\"\n }\n }\n ],\n \"pagination\": {\n \"current_page\": 1,\n \"per_page\": 25,\n \"total\": 6115,\n \"total_pages\": 245,\n \"has_next_page\": true,\n \"has_previous_page\": false,\n \"from\": 1,\n \"to\": 25,\n \"next_page\": 2,\n \"previous_page\": null\n },\n \"watermark\": 3103,\n \"removed_ids\": [\n 6659,\n 6314\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Invalid parameter combination (e.g. `cursor` + `page`), invalid `platform`, or `per_page > 500`.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "latest" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "platform", + "value": "wordpress" + }, + { + "key": "page", + "value": "1" + }, + { + "key": "per_page", + "value": "100" + }, + { + "key": "cursor", + "value": "string" + }, + { + "key": "include", + "value": "details" + } + ], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "product/{type}/{name}/{version}", + "item": [ + { + "name": "Find vulnerabilities for a product", + "request": { + "name": "Find vulnerabilities for a product", + "description": { + "content": "Match a specific product + version against the vulnerability database\nand return every applicable advisory. For npm advisories with multiple\naffected spans, every span is considered (not only the lowest). Each\nmatched advisory includes `matched_range` with the span that matched\nthe installed version and that span's own `fixed_in` — prefer this over\nthe collapsed top-level `fixed_in` when advising an upgrade.\n\nnpm package slugs that include a `/` (e.g. `@scope/pkg`) conflict with\nthe route separator. URL-encode the `/` as `%2F`.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "key": "include", + "value": "details", + "description": "Pass `details` to include the full advisory body (`advisory_details`) per item." + } + ], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Matched advisories (possibly empty).", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "include", + "value": "details" + } + ], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerabilities\": [\n {\n \"id\": 46500,\n \"title\": \"NPM: OpenClaw: ...\",\n \"disclosed_at\": \"2026-04-03T03:15:56+00:00\",\n \"created_at\": \"2026-04-21T08:38:34+00:00\",\n \"url\": \"https://patchstack.com/database/npm/npm/openclaw/vulnerability/...\",\n \"vuln_type\": \"Other Vulnerability Type\",\n \"cve\": \"2026-41331\",\n \"is_exploited\": false,\n \"patch_priority\": 2,\n \"advisory_details\": \"## Summary\\n...\",\n \"product\": {\n \"id\": 23595,\n \"name\": \"openclaw\",\n \"slug\": \"openclaw\",\n \"type\": \"npm\"\n },\n \"cvss\": {\n \"score\": 6.9,\n \"vector\": \"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N\"\n },\n \"cwe\": {\n \"id\": 770,\n \"name\": \"Allocation of Resources Without Limits or Throttling\"\n },\n \"capec\": {\n \"id\": null,\n \"name\": null\n },\n \"references\": [\n \"https://github.com/openclaw/openclaw/security/advisories/GHSA-m6fx-m8hc-572m\",\n \"https://github.com/openclaw/openclaw/releases/tag/v2026.3.31\"\n ],\n \"ghsa\": \"GHSA-m6fx-m8hc-572m\",\n \"version_info\": {\n \"affected\": \"<= 2026.3.28\",\n \"fixed\": \"2026.3.31\"\n }\n },\n {\n \"id\": 46500,\n \"title\": \"NPM: OpenClaw: ...\",\n \"disclosed_at\": \"2026-04-03T03:15:56+00:00\",\n \"created_at\": \"2026-04-21T08:38:34+00:00\",\n \"url\": \"https://patchstack.com/database/npm/npm/openclaw/vulnerability/...\",\n \"vuln_type\": \"Other Vulnerability Type\",\n \"cve\": \"2026-41331\",\n \"is_exploited\": false,\n \"patch_priority\": 2,\n \"advisory_details\": \"## Summary\\n...\",\n \"product\": {\n \"id\": 23595,\n \"name\": \"openclaw\",\n \"slug\": \"openclaw\",\n \"type\": \"npm\"\n },\n \"cvss\": {\n \"score\": 6.9,\n \"vector\": \"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N\"\n },\n \"cwe\": {\n \"id\": 770,\n \"name\": \"Allocation of Resources Without Limits or Throttling\"\n },\n \"capec\": {\n \"id\": null,\n \"name\": null\n },\n \"references\": [\n \"https://github.com/openclaw/openclaw/security/advisories/GHSA-m6fx-m8hc-572m\",\n \"https://github.com/openclaw/openclaw/releases/tag/v2026.3.31\"\n ],\n \"ghsa\": \"GHSA-m6fx-m8hc-572m\",\n \"version_info\": {\n \"affected\": \"<= 2026.3.28\",\n \"fixed\": \"2026.3.31\"\n }\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "include", + "value": "details" + } + ], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "include", + "value": "details" + } + ], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Invalid parameter combination (e.g. `cursor` + `page`), invalid `platform`, or `per_page > 500`.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "include", + "value": "details" + } + ], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "key": "include", + "value": "details" + } + ], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Boolean exists check for a product", + "request": { + "name": "Boolean exists check for a product", + "description": { + "content": "Boolean-only variant of the product lookup. Returns `{ \"vulnerable\": true }`\nor `{ \"vulnerable\": false }` without the advisory payload — useful for\nlightweight health checks and dashboard tiles where the advisory body\nisn't needed.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Boolean result.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerable\": true\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "npm", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "axios", + "key": "name", + "description": "(Required) npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`." + }, + { + "disabled": false, + "type": "any", + "value": "0.21.4", + "key": "version", + "description": "(Required) Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "name": "Bulk product check", + "request": { + "name": "Bulk product check", + "description": { + "content": "Check up to 50 products in a single request. Mirrors the format\ndocumented for the Extended tier's `/batch` endpoint.\n\nThe payload is a raw JSON array (not wrapped in an object). Each item\nis `{ \"type\", \"name\", \"version\", \"exists\"? }` — when `exists: true`\nthe result for that item is boolean-only; otherwise it's the full\nadvisory list for the product.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "[\n {\n \"type\": \"npm\",\n \"name\": \"axios\",\n \"version\": \"0.21.4\",\n \"exists\": false\n },\n {\n \"type\": \"plugin\",\n \"name\": \"tutor\",\n \"version\": \"1.5.2\",\n \"exists\": true\n },\n {\n \"type\": \"wordpress\",\n \"name\": \"wordpress\",\n \"version\": \"6.0.0\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Per-item results, in request order.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"type\": \"npm\",\n \"name\": \"axios\",\n \"version\": \"0.21.4\",\n \"exists\": false\n },\n {\n \"type\": \"plugin\",\n \"name\": \"tutor\",\n \"version\": \"1.5.2\",\n \"exists\": true\n },\n {\n \"type\": \"wordpress\",\n \"name\": \"wordpress\",\n \"version\": \"6.0.0\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "[]", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"type\": \"npm\",\n \"name\": \"axios\",\n \"version\": \"0.21.4\",\n \"exists\": false\n },\n {\n \"type\": \"plugin\",\n \"name\": \"tutor\",\n \"version\": \"1.5.2\",\n \"exists\": true\n },\n {\n \"type\": \"wordpress\",\n \"name\": \"wordpress\",\n \"version\": \"6.0.0\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"type\": \"npm\",\n \"name\": \"axios\",\n \"version\": \"0.21.4\",\n \"exists\": false\n },\n {\n \"type\": \"plugin\",\n \"name\": \"tutor\",\n \"version\": \"1.5.2\",\n \"exists\": true\n },\n {\n \"type\": \"wordpress\",\n \"name\": \"wordpress\",\n \"version\": \"6.0.0\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Invalid parameter combination (e.g. `cursor` + `page`), invalid `platform`, or `per_page > 500`.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"type\": \"npm\",\n \"name\": \"axios\",\n \"version\": \"0.21.4\",\n \"exists\": false\n },\n {\n \"type\": \"plugin\",\n \"name\": \"tutor\",\n \"version\": \"1.5.2\",\n \"exists\": true\n },\n {\n \"type\": \"wordpress\",\n \"name\": \"wordpress\",\n \"version\": \"6.0.0\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded.", + "originalRequest": { + "url": { + "path": [ + "batch" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "[\n {\n \"type\": \"npm\",\n \"name\": \"axios\",\n \"version\": \"0.21.4\",\n \"exists\": false\n },\n {\n \"type\": \"plugin\",\n \"name\": \"tutor\",\n \"version\": \"1.5.2\",\n \"exists\": true\n },\n {\n \"type\": \"wordpress\",\n \"name\": \"wordpress\",\n \"version\": \"6.0.0\",\n \"exists\": true\n }\n]", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [], + "variable": [ + { + "type": "string", + "value": "https://vdp-api.patchstack.com/database/api/npm", + "key": "baseUrl" + } + ], + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "key", + "value": "PSKey" + }, + { + "key": "value", + "value": "{{apiKey}}" + }, + { + "key": "in", + "value": "header" + } + ] + }, + "info": { + "name": "Patchstack Threat Intelligence API — NPM features", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "description": { + "content": "The npm endpoints live alongside the v2 API and add npm coverage, an optional\nfull advisory body, a consistent nested response shape, and cursor pagination.\nThey are the recommended endpoints for new integrations; v2 remains available\nfor backwards compatibility.\n\n## Authentication\n\nEvery request must include your API key in the `PSKey` HTTP request header.\nRequest a key via .\n\n## Platforms\n\nPass `?platform=npm` (or `?platform=wordpress` — the default) on list\nendpoints. Platform names are case-insensitive.\n\n## Pagination\n\n`/all` and `/latest` support two independent strategies, selected by which\nquery parameter you pass:\n\n- **Offset** (`?page=&per_page=`) — returns totals; easy to jump to a\n specific page; susceptible to row-shift when new rows land while paging.\n- **Cursor** (`?cursor=`) — stable under concurrent inserts, faster at\n depth, no `total` count. Bootstrap with an empty value: `?cursor=`.\n\n`cursor` and `page` are mutually exclusive; passing both returns `422`.\n\n## Including full advisory bodies\n\nPass `?include=details` on any list endpoint to add an `advisory_details`\nmarkdown field to each item.\n\n## Scoped npm packages\n\nnpm package slugs that include a `/` (e.g. `@scope/pkg`) conflict with the\nroute separator. URL-encode the `/` as `%2F`.\n\n## Rate limiting\n\nSame policy as the Extended Threat Intelligence API. Contact\n if you need an elevated quota.\n\n## Errors\n\n| Status | Meaning |\n|---|---|\n| `401` | Missing or invalid `PSKey` header. |\n| `403` | API key not authorised for the requested endpoint. |\n| `422` | Invalid parameter combination or value (e.g. `cursor` + `page`, invalid `platform`, `per_page > 500`). |\n| `429` | Rate limit exceeded. |\n| `500` | Server error — include the request id in any bug report. |\n\nA malformed cursor returns `200` with an empty page rather than an error:\n\n```json\n{ \"vulnerabilities\": [], \"cursor\": { \"next_cursor\": null, \"has_more\": false, \"per_page\": 100 } }\n```\n\n## Related pages\n\n- Narrative guide with code samples: [NPM features](/api-solutions/threat-intelligence-api/npm-features/)\n- OpenAPI spec (import into Postman / Insomnia / Bruno / Hoppscotch): \n- Postman collection (pre-imported): \n\nIntegration questions: .\n\n\nContact Support:\n Name: Patchstack\n Email: dave.jong@patchstack.com", + "type": "text/plain" + } + } +} \ No newline at end of file diff --git a/public/schemas/threat-intel-npm.yaml b/public/schemas/threat-intel-npm.yaml new file mode 100644 index 00000000..23e464f9 --- /dev/null +++ b/public/schemas/threat-intel-npm.yaml @@ -0,0 +1,730 @@ +openapi: 3.1.0 +info: + title: Patchstack Threat Intelligence API — NPM features + version: '1.0' + summary: npm + WordPress vulnerability intelligence with nested response shape and cursor pagination. + description: | + The npm endpoints live alongside the v2 API and add npm coverage, an optional + full advisory body, a consistent nested response shape, and cursor pagination. + They are the recommended endpoints for new integrations; v2 remains available + for backwards compatibility. + + ## Authentication + + Every request must include your API key in the `PSKey` HTTP request header. + Request a key via . + + ## Platforms + + Pass `?platform=npm` (or `?platform=wordpress` — the default) on list + endpoints. Platform names are case-insensitive. + + ## Pagination + + `/all` and `/latest` support two independent strategies, selected by which + query parameter you pass: + + - **Offset** (`?page=&per_page=`) — returns totals; easy to jump to a + specific page; susceptible to row-shift when new rows land while paging. + - **Cursor** (`?cursor=`) — stable under concurrent inserts, faster at + depth, no `total` count. Bootstrap with an empty value: `?cursor=`. + + `cursor` and `page` are mutually exclusive; passing both returns `422`. + + ## Including full advisory bodies + + Pass `?include=details` on any list endpoint to add an `advisory_details` + markdown field to each item. + + ## Scoped npm packages + + npm package slugs that include a `/` (e.g. `@scope/pkg`) conflict with the + route separator. URL-encode the `/` as `%2F`. + + ## Rate limiting + + Same policy as the Extended Threat Intelligence API. Contact + if you need an elevated quota. + + ## Errors + + | Status | Meaning | + |---|---| + | `401` | Missing or invalid `PSKey` header. | + | `403` | API key not authorised for the requested endpoint. | + | `422` | Invalid parameter combination or value (e.g. `cursor` + `page`, invalid `platform`, `per_page > 500`). | + | `429` | Rate limit exceeded. | + | `500` | Server error — include the request id in any bug report. | + + A malformed cursor returns `200` with an empty page rather than an error: + + ```json + { "vulnerabilities": [], "cursor": { "next_cursor": null, "has_more": false, "per_page": 100 } } + ``` + + ## Related pages + + - Narrative guide with code samples: [NPM features](/api-solutions/threat-intelligence-api/npm-features/) + - OpenAPI spec (import into Postman / Insomnia / Bruno / Hoppscotch): + - Postman collection (pre-imported): + + Integration questions: . + contact: + name: Patchstack + url: https://patchstack.com/for-hosts/ + email: dave.jong@patchstack.com + +servers: + - url: https://vdp-api.patchstack.com/database/api/npm + description: NPM features. The previous base URL https://vdp-api.patchstack.com/database/api/beta continues to work as a permanent legacy alias and returns identical responses. + +security: + - PSKey: [] + +tags: + - name: Vulnerabilities + description: | + Listing endpoints that return published vulnerabilities for a platform, + ordered by descending `id`. + + - [`GET /all`](/api-reference/threat-intelligence-npm/operations/listallvulnerabilities/) + — every published vulnerability for the platform, paginated. + - [`GET /latest`](/api-reference/threat-intelligence-npm/operations/listlatestvulnerabilities/) + — vulnerabilities whose row was inserted in the last 24 hours (filter + is on `created_at`, not `disclosure_date`). + + Both endpoints share the same response shape and support offset and + cursor pagination — see the overview for details. + - name: Products + description: | + Match a specific product + version against the vulnerability database + and return every applicable advisory. + + - [`GET /product/{type}/{name}/{version}`](/api-reference/threat-intelligence-npm/operations/findproductvulnerabilities/) + — full advisory list for the product. Use `version=*` to return every + advisory for the product regardless of version. + - [`GET /product/{type}/{name}/{version}/exists`](/api-reference/threat-intelligence-npm/operations/productvulnerabilityexists/) + — boolean-only variant for fast "is this vulnerable?" checks. + + `type` accepts `npm`, `plugin`, `theme`, or `wordpress`. For scoped npm + packages, URL-encode the `/` as `%2F`. + - name: Batch + description: | + Bulk endpoint for checking up to 50 products in a single request. Use + this when walking a dependency manifest (e.g. `package.json` or a list + of installed WordPress plugins) — it's significantly cheaper than + issuing one request per product. + + - [`POST /batch`](/api-reference/threat-intelligence-npm/operations/batchproductcheck/) + — payload is a JSON array of up to 50 `{type, name, version, exists?}` + objects. Per-item results are returned in request order. + +paths: + /all: + get: + tags: [Vulnerabilities] + summary: List all vulnerabilities + description: | + Paginated listing of every published vulnerability for the given + platform, ordered by descending `id`. + + Supports **two independent pagination strategies**: + + - **Offset** (`?page=&per_page=`) — returns a `pagination` block with + totals. Easy to jump to a specific page; slower at depth and + susceptible to row-shift when new vulnerabilities land while paging. + - **Cursor** (`?cursor=`) — returns a `cursor` block with `next_cursor`, + `has_more`, `per_page`. Stable under concurrent inserts and faster at + any depth. No `total` count. + + `cursor` and `page` are mutually exclusive; passing both returns + `422 Unprocessable Entity`. + + **Incremental sync.** Every `/all` response carries `watermark`, the + unix time its rows were read. Send it back as `updated_since` (cursor + mode only) to get just the entries changed since then, plus + `removed_ids` on the first page for entries withdrawn since then. + Entries deleted outright are not reported, so run a full listing now + and then (daily is plenty). + operationId: listAllVulnerabilities + parameters: + - $ref: '#/components/parameters/Platform' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PerPage' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/UpdatedSince' + - $ref: '#/components/parameters/Include' + responses: + '200': + description: Paginated vulnerability listing. + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/OffsetVulnerabilityList' + - $ref: '#/components/schemas/CursorVulnerabilityList' + examples: + offset: + summary: Offset mode + value: + vulnerabilities: [] + pagination: + current_page: 1 + per_page: 25 + total: 6115 + total_pages: 245 + has_next_page: true + has_previous_page: false + next_page: 2 + previous_page: null + from: 1 + to: 25 + cursor: + summary: Cursor mode + value: + vulnerabilities: [] + cursor: + next_cursor: djE6NDYzMzk + has_more: true + per_page: 25 + watermark: 1793018217 + delta: + summary: Incremental sync (`?cursor=&updated_since=1793018157`) + value: + vulnerabilities: [] + cursor: + next_cursor: null + has_more: false + per_page: 100 + watermark: 1793018399 + removed_ids: [46412] + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '422': { $ref: '#/components/responses/UnprocessableEntity' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /latest: + get: + tags: [Vulnerabilities] + summary: Latest vulnerabilities (last 24 hours) + description: | + Returns vulnerabilities whose row was inserted into the Patchstack + database in the last 24 hours. The filter is on `created_at` + (insertion time), **not** `disclosure_date`. + + Accepts the same query parameters as `/all`. + operationId: listLatestVulnerabilities + parameters: + - $ref: '#/components/parameters/Platform' + - $ref: '#/components/parameters/Page' + - $ref: '#/components/parameters/PerPage' + - $ref: '#/components/parameters/Cursor' + - $ref: '#/components/parameters/Include' + responses: + '200': + description: Paginated 24h vulnerability listing. + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/OffsetVulnerabilityList' + - $ref: '#/components/schemas/CursorVulnerabilityList' + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '422': { $ref: '#/components/responses/UnprocessableEntity' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /product/{type}/{name}/{version}: + get: + tags: [Products] + summary: Find vulnerabilities for a product + description: | + Match a specific product + version against the vulnerability database + and return every applicable advisory. For npm advisories with multiple + affected spans, every span is considered (not only the lowest). Each + matched advisory includes `matched_range` with the span that matched + the installed version and that span's own `fixed_in` — prefer this over + the collapsed top-level `fixed_in` when advising an upgrade. + + npm package slugs that include a `/` (e.g. `@scope/pkg`) conflict with + the route separator. URL-encode the `/` as `%2F`. + operationId: findProductVulnerabilities + parameters: + - $ref: '#/components/parameters/ProductType' + - $ref: '#/components/parameters/ProductName' + - $ref: '#/components/parameters/ProductVersion' + - $ref: '#/components/parameters/Include' + responses: + '200': + description: Matched advisories (possibly empty). + content: + application/json: + schema: + type: object + properties: + vulnerabilities: + type: array + items: + $ref: '#/components/schemas/Vulnerability' + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '422': { $ref: '#/components/responses/UnprocessableEntity' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /product/{type}/{name}/{version}/exists: + get: + tags: [Products] + summary: Boolean exists check for a product + description: | + Boolean-only variant of the product lookup. Returns `{ "vulnerable": true }` + or `{ "vulnerable": false }` without the advisory payload — useful for + lightweight health checks and dashboard tiles where the advisory body + isn't needed. + operationId: productVulnerabilityExists + parameters: + - $ref: '#/components/parameters/ProductType' + - $ref: '#/components/parameters/ProductName' + - $ref: '#/components/parameters/ProductVersion' + responses: + '200': + description: Boolean result. + content: + application/json: + schema: + type: object + required: [vulnerable] + properties: + vulnerable: + type: boolean + example: + vulnerable: true + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /batch: + post: + tags: [Batch] + summary: Bulk product check + description: | + Check up to 50 products in a single request. Mirrors the format + documented for the Extended tier's `/batch` endpoint. + + The payload is a raw JSON array (not wrapped in an object). Each item + is `{ "type", "name", "version", "exists"? }` — when `exists: true` + the result for that item is boolean-only; otherwise it's the full + advisory list for the product. + operationId: batchProductCheck + requestBody: + required: true + content: + application/json: + schema: + type: array + maxItems: 50 + items: + $ref: '#/components/schemas/BatchItem' + example: + - { type: npm, name: axios, version: 0.21.4, exists: false } + - { type: plugin, name: tutor, version: 1.5.2, exists: true } + - { type: wordpress, name: wordpress, version: 6.0.0, exists: true } + responses: + '200': + description: Per-item results, in request order. + content: + application/json: + schema: + type: array + items: + type: object + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '422': { $ref: '#/components/responses/UnprocessableEntity' } + '429': { $ref: '#/components/responses/TooManyRequests' } + +components: + securitySchemes: + PSKey: + type: apiKey + in: header + name: PSKey + description: API key issued by Patchstack. Request one via . + + parameters: + Platform: + name: platform + in: query + description: Platform to query. Case-insensitive. + required: false + schema: + type: string + enum: [wordpress, npm] + default: wordpress + Page: + name: page + in: query + description: Offset-pagination page (1-indexed). Mutually exclusive with `cursor`. + required: false + schema: + type: integer + minimum: 1 + default: 1 + PerPage: + name: per_page + in: query + description: Page size. + required: false + schema: + type: integer + minimum: 1 + maximum: 500 + default: 100 + Cursor: + name: cursor + in: query + description: | + Opaque cursor. Presence of the param switches to cursor mode (send an + empty value to bootstrap). Mutually exclusive with `page`. + required: false + schema: + type: string + UpdatedSince: + name: updated_since + in: query + description: | + `/all` only, with `cursor`. Unix time in seconds, usually the + `watermark` of your previous sync. Returns only entries changed at or + after it, and adds `removed_ids`. Without `cursor` it returns + `422 Unprocessable Entity`. + required: false + schema: + type: integer + minimum: 0 + example: 1793018157 + Include: + name: include + in: query + description: Pass `details` to include the full advisory body (`advisory_details`) per item. + required: false + schema: + type: string + enum: [details] + ProductType: + name: type + in: path + required: true + description: Product ecosystem. + schema: + type: string + enum: [npm, plugin, theme, wordpress] + example: npm + ProductName: + name: name + in: path + required: true + description: npm package slug or WordPress plugin/theme slug. Use `wordpress` when `type=wordpress`. + schema: + type: string + example: axios + ProductVersion: + name: version + in: path + required: true + description: Concrete version (e.g. `0.21.4`) or `*` to return every advisory for the product. + schema: + type: string + example: 0.21.4 + + responses: + Unauthorized: + description: Missing or invalid `PSKey` header. + Forbidden: + description: API key not authorised for the requested endpoint. + UnprocessableEntity: + description: Invalid parameter combination (e.g. `cursor` + `page`), invalid `platform`, or `per_page > 500`. + TooManyRequests: + description: Rate limit exceeded. + + schemas: + Vulnerability: + type: object + description: Per-item shape shared across list endpoints when `platform=npm`. + required: + - id + - title + - disclosed_at + - created_at + - url + - vuln_type + - cve + - is_exploited + - patch_priority + - product + - cvss + - cwe + - capec + - references + - ghsa + - version_info + properties: + id: + type: integer + description: Stable Patchstack vulnerability id. + example: 46500 + title: + type: string + description: Human-readable title (prefixed with `NPM:` for npm advisories). + example: "NPM: OpenClaw: ..." + disclosed_at: + type: string + format: date-time + description: When the vulnerability was publicly disclosed. + created_at: + type: string + format: date-time + description: When the row was inserted into the Patchstack DB. Drives `/latest` windowing. + url: + type: string + format: uri + description: Public Patchstack vulnerability page (token-tagged). + vuln_type: + type: string + description: High-level vulnerability category. + example: Other Vulnerability Type + cve: + type: string + description: First CVE identifier, or empty string when none is assigned. + example: "2026-41331" + is_exploited: + type: boolean + description: Whether exploitation has been observed in the wild. + patch_priority: + type: integer + minimum: 1 + maximum: 3 + description: 1 (low) to 3 (high). + advisory_details: + type: string + description: Full advisory body (markdown). Only present when `?include=details` was passed. + product: + type: object + required: [id, name, slug] + properties: + id: { type: integer } + name: { type: string } + slug: { type: string } + type: + type: string + nullable: true + description: Kind of product, lower case, e.g. `plugin`, `theme`, `wordpress` (core) or `npm`. + cvss: + type: object + nullable: true + properties: + score: + type: number + format: float + nullable: true + vector: + type: string + nullable: true + cwe: + type: object + nullable: true + properties: + id: + type: integer + nullable: true + name: + type: string + nullable: true + capec: + type: object + nullable: true + properties: + id: + type: integer + nullable: true + name: + type: string + nullable: true + references: + type: array + description: External reference URLs (advisories, commits, tags). + items: + type: string + format: uri + ghsa: + type: string + description: GHSA identifier when the advisory came from the GitHub Advisory Database. + version_info: + type: object + required: [affected, fixed, patched_ranges] + properties: + affected: + type: string + description: Affected version range (e.g. `<= 2026.3.28`). + fixed: + type: string + description: Highest fixed version across every affected span (compatibility field — prefer `matched_range.fixed_in` on product lookups). + patched_ranges: + type: array + description: Structured list of patch ranges for advisories with multiple patch ranges. + items: + type: object + properties: + from_version: { type: string } + to_version: { type: string } + fixed_in: { type: string } + matched_range: + type: object + description: | + Present on product/`batch` lookups when the installed version matched an affected span. + Prefer `matched_range.fixed_in` for user-facing upgrade advice; top-level `fixed_in` is the highest fix across all spans. + properties: + from_version: + type: string + nullable: true + description: Lower bound of the matched span. + to_version: + type: string + nullable: true + description: Upper bound of the matched span. + to_bound: + type: string + nullable: true + description: How to read `to_version` — `exclusive`, `inclusive`, `last-affected`, or null when unrecorded. + enum: [exclusive, inclusive, last-affected] + fixed_in: + type: string + nullable: true + description: Fix for this span only. Null when the advisory never fixed this line. + example: + id: 46500 + title: "NPM: OpenClaw: ..." + disclosed_at: "2026-04-03T03:15:56+00:00" + created_at: "2026-04-21T08:38:34+00:00" + url: "https://patchstack.com/database/npm/npm/openclaw/vulnerability/..." + vuln_type: Other Vulnerability Type + cve: "2026-41331" + is_exploited: false + patch_priority: 2 + advisory_details: "## Summary\n..." + product: + id: 23595 + name: openclaw + slug: openclaw + type: npm + cvss: + score: 6.9 + vector: "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N" + cwe: + id: 770 + name: Allocation of Resources Without Limits or Throttling + capec: + id: null + name: null + references: + - "https://github.com/openclaw/openclaw/security/advisories/GHSA-m6fx-m8hc-572m" + - "https://github.com/openclaw/openclaw/releases/tag/v2026.3.31" + ghsa: GHSA-m6fx-m8hc-572m + version_info: + affected: "<= 2026.3.28" + fixed: "2026.3.31" + patched_ranges: [] + + OffsetPagination: + type: object + required: + - current_page + - per_page + - total + - total_pages + - has_next_page + - has_previous_page + - from + - to + properties: + current_page: { type: integer, example: 1 } + per_page: { type: integer, example: 25 } + total: { type: integer, example: 6115 } + total_pages: { type: integer, example: 245 } + has_next_page: { type: boolean, example: true } + has_previous_page: { type: boolean, example: false } + next_page: + type: integer + nullable: true + example: 2 + previous_page: + type: integer + nullable: true + example: null + from: { type: integer, example: 1 } + to: { type: integer, example: 25 } + + CursorPagination: + type: object + required: [next_cursor, has_more, per_page] + properties: + next_cursor: + type: string + nullable: true + description: Opaque cursor for the next page. `null` when there are no more pages. + example: djE6NDYzMzk + has_more: + type: boolean + example: true + per_page: + type: integer + example: 25 + + OffsetVulnerabilityList: + type: object + required: [vulnerabilities, pagination] + properties: + vulnerabilities: + type: array + items: + $ref: '#/components/schemas/Vulnerability' + pagination: + $ref: '#/components/schemas/OffsetPagination' + watermark: + type: integer + description: "`/all` only. Unix time the rows were read; pass it as `updated_since` next time." + removed_ids: + type: array + items: { type: integer } + description: "`/all` with `updated_since` only. Entries withdrawn since then; listed on the first page." + + CursorVulnerabilityList: + type: object + required: [vulnerabilities, cursor] + properties: + vulnerabilities: + type: array + items: + $ref: '#/components/schemas/Vulnerability' + cursor: + $ref: '#/components/schemas/CursorPagination' + watermark: + type: integer + description: "`/all` only. Unix time the rows were read; pass it as `updated_since` next time." + removed_ids: + type: array + items: { type: integer } + description: "`/all` with `updated_since` only. Entries withdrawn since then; listed on the first page." + + BatchItem: + type: object + required: [type, name, version] + properties: + type: + type: string + enum: [npm, plugin, theme, wordpress] + name: + type: string + version: + type: string + exists: + type: boolean + description: When `true`, return a boolean-only result for this item. diff --git a/public/schemas/threat-intel-standard.postman_collection.json b/public/schemas/threat-intel-standard.postman_collection.json new file mode 100644 index 00000000..9c90647f --- /dev/null +++ b/public/schemas/threat-intel-standard.postman_collection.json @@ -0,0 +1,741 @@ +{ + "item": [ + { + "name": "product/{type}/{name}/{version}", + "item": [ + { + "name": "Find vulnerabilities for a product", + "request": { + "name": "Find vulnerabilities for a product", + "description": { + "content": "Return every advisory that applies to a specific WordPress plugin,\ntheme or core version.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Matched advisories (possibly empty).", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerabilities\": [\n {\n \"id\": 4253,\n \"title\": \"WordPress Tutor LMS plugin <= 1.5.2 - Cross-Site Request Forgery (CSRF) vulnerability\",\n \"disclosed_at\": \"2020-02-04T00:00:00+00:00\",\n \"created_at\": \"2022-05-27T10:23:01+00:00\",\n \"product_slug\": \"tutor\",\n \"product_name\": \"Tutor LMS\",\n \"product_name_premium\": null,\n \"product_type\": \"Plugin\",\n \"fixed_in\": \"1.5.3\",\n \"direct_url\": \"https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-5-2-cross-site-request-forgery-csrf-vulnerability\"\n }\n ]\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Unknown product/version combination.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Not Found", + "code": 404, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded (5,000 requests / 24 hours).", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "name": "Boolean exists check for a product", + "request": { + "name": "Boolean exists check for a product", + "description": { + "content": "Boolean-only variant of the product lookup. Returns\n`{ \"vulnerable\": true }` or `{ \"vulnerable\": false }` without the\nadvisory payload — useful for lightweight checks and dashboard tiles\nwhere the advisory body isn't needed.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "auth": null + }, + "response": [ + { + "name": "Boolean result.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"vulnerable\": true\n}", + "cookie": [], + "_postman_previewlanguage": "json" + }, + { + "name": "Missing or invalid `PSKey` header.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Unauthorized", + "code": 401, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "API key not authorised for the requested endpoint.", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Forbidden", + "code": 403, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + }, + { + "name": "Rate limit exceeded (5,000 requests / 24 hours).", + "originalRequest": { + "url": { + "path": [ + "product", + ":type", + ":name", + ":version", + "exists" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "type": "any", + "value": "plugin", + "key": "type", + "description": "(Required) Product ecosystem." + }, + { + "disabled": false, + "type": "any", + "value": "tutor", + "key": "name", + "description": "(Required) WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`.\nSlugs are lowercase — normalize your own data before comparison.\n" + }, + { + "disabled": false, + "type": "any", + "value": "1.5.2", + "key": "version", + "description": "(Required) Concrete version (e.g. `1.5.2`)." + } + ] + }, + "header": [ + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "PSKey", + "value": "" + } + ], + "method": "GET", + "body": {} + }, + "status": "Too Many Requests", + "code": 429, + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "body": "", + "cookie": [], + "_postman_previewlanguage": "text" + } + ], + "event": [], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + } + ], + "event": [], + "variable": [ + { + "type": "string", + "value": "https://patchstack.com/database/api/v2", + "key": "baseUrl" + } + ], + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "key", + "value": "PSKey" + }, + { + "key": "value", + "value": "{{apiKey}}" + }, + { + "key": "in", + "value": "header" + } + ] + }, + "info": { + "name": "Patchstack Threat Intelligence API — Standard", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "description": { + "content": "The Standard Threat Intelligence API returns vulnerability information for\na single WordPress plugin, theme or core version. It's the entry-level tier\nof the v2 API — if you need bulk lookups, the latest-24h feed, or by-id\nadvisory lookup, use the [Extended tier](/api-solutions/threat-intelligence-api/extended/)\ninstead.\n\n## Authentication\n\nEvery request must include your API key in the `PSKey` HTTP request header.\nRequest a key via your [Patchstack App billing page](https://app.patchstack.com/billing/subscription).\n\n## Rate limiting\n\nStandard is limited to **5,000 requests per 24 hours**. Contact\n if you need an elevated quota or the\nExtended tier.\n\n## Caching\n\nResponses are JSON and cached until the Patchstack database updates, at\nwhich point the appropriate caches are cleared.\n\n## Errors\n\n| Status | Meaning |\n|---|---|\n| `401` | Missing or invalid `PSKey` header. |\n| `403` | API key not authorised for the requested endpoint. |\n| `404` | Unknown product/version combination. |\n| `429` | Rate limit exceeded. |\n| `500` | Server error — include the request id in any bug report. |\n\n## Related pages\n\n- Narrative guide with code samples: [Standard tier API](/api-solutions/threat-intelligence-api/standard/)\n- Field glossary: [API properties](/api-solutions/threat-intelligence-api/api-properties/)\n- OpenAPI spec (import into Postman / Insomnia / Bruno / Hoppscotch): \n- Postman collection (pre-imported): \n\nIntegration questions: .\n\n\nContact Support:\n Name: Patchstack\n Email: dave.jong@patchstack.com", + "type": "text/plain" + } + } +} \ No newline at end of file diff --git a/public/schemas/threat-intel-standard.yaml b/public/schemas/threat-intel-standard.yaml new file mode 100644 index 00000000..7465059f --- /dev/null +++ b/public/schemas/threat-intel-standard.yaml @@ -0,0 +1,261 @@ +openapi: 3.1.0 +info: + title: Patchstack Threat Intelligence API — Standard + version: v2 + summary: WordPress plugin, theme and core vulnerability lookups for a single product + version. + description: | + The Standard Threat Intelligence API returns vulnerability information for + a single WordPress plugin, theme or core version. It's the entry-level tier + of the v2 API — if you need bulk lookups, the latest-24h feed, or by-id + advisory lookup, use the [Extended tier](/api-solutions/threat-intelligence-api/extended/) + instead. + + ## Authentication + + Every request must include your API key in the `PSKey` HTTP request header. + Request a key via your [Patchstack App billing page](https://app.patchstack.com/billing/subscription). + + ## Rate limiting + + Standard is limited to **5,000 requests per 24 hours**. Contact + if you need an elevated quota or the + Extended tier. + + ## Caching + + Responses are JSON and cached until the Patchstack database updates, at + which point the appropriate caches are cleared. + + ## Errors + + | Status | Meaning | + |---|---| + | `401` | Missing or invalid `PSKey` header. | + | `403` | API key not authorised for the requested endpoint. | + | `404` | Unknown product/version combination. | + | `429` | Rate limit exceeded. | + | `500` | Server error — include the request id in any bug report. | + + ## Related pages + + - Narrative guide with code samples: [Standard tier API](/api-solutions/threat-intelligence-api/standard/) + - Field glossary: [API properties](/api-solutions/threat-intelligence-api/api-properties/) + - OpenAPI spec (import into Postman / Insomnia / Bruno / Hoppscotch): + - Postman collection (pre-imported): + + Integration questions: . + contact: + name: Patchstack + url: https://patchstack.com/for-hosts/ + email: dave.jong@patchstack.com + +servers: + - url: https://patchstack.com/database/api/v2 + description: Production + +security: + - PSKey: [] + +tags: + - name: Products + description: | + Match a specific WordPress plugin, theme or core version against the + vulnerability database and return every applicable advisory. + + - [`GET /product/{type}/{name}/{version}`](/api-reference/threat-intelligence-standard/operations/findproductvulnerabilities/) + — full advisory list for the product. + - [`GET /product/{type}/{name}/{version}/exists`](/api-reference/threat-intelligence-standard/operations/productvulnerabilityexists/) + — boolean-only variant for fast "is this vulnerable?" checks. + + `type` accepts `plugin`, `theme`, or `wordpress`. When `type=wordpress` + pass `wordpress` as the `name`. + +paths: + /product/{type}/{name}/{version}: + get: + tags: [Products] + summary: Find vulnerabilities for a product + description: | + Return every advisory that applies to a specific WordPress plugin, + theme or core version. + operationId: findProductVulnerabilities + parameters: + - $ref: '#/components/parameters/ProductType' + - $ref: '#/components/parameters/ProductName' + - $ref: '#/components/parameters/ProductVersion' + responses: + '200': + description: Matched advisories (possibly empty). + content: + application/json: + schema: + type: object + required: [vulnerabilities] + properties: + vulnerabilities: + type: array + items: + $ref: '#/components/schemas/StandardVulnerability' + example: + vulnerabilities: + - id: 4253 + title: "WordPress Tutor LMS plugin <= 1.5.2 - Cross-Site Request Forgery (CSRF) vulnerability" + disclosed_at: "2020-02-04T00:00:00+00:00" + created_at: "2022-05-27T10:23:01+00:00" + product_slug: tutor + product_name: "Tutor LMS" + product_name_premium: null + product_type: Plugin + fixed_in: "1.5.3" + direct_url: "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-5-2-cross-site-request-forgery-csrf-vulnerability" + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '404': { $ref: '#/components/responses/NotFound' } + '429': { $ref: '#/components/responses/TooManyRequests' } + + /product/{type}/{name}/{version}/exists: + get: + tags: [Products] + summary: Boolean exists check for a product + description: | + Boolean-only variant of the product lookup. Returns + `{ "vulnerable": true }` or `{ "vulnerable": false }` without the + advisory payload — useful for lightweight checks and dashboard tiles + where the advisory body isn't needed. + operationId: productVulnerabilityExists + parameters: + - $ref: '#/components/parameters/ProductType' + - $ref: '#/components/parameters/ProductName' + - $ref: '#/components/parameters/ProductVersion' + responses: + '200': + description: Boolean result. + content: + application/json: + schema: + type: object + required: [vulnerable] + properties: + vulnerable: + type: boolean + example: + vulnerable: true + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '429': { $ref: '#/components/responses/TooManyRequests' } + +components: + securitySchemes: + PSKey: + type: apiKey + in: header + name: PSKey + description: | + API key issued by Patchstack. Request one from your + [Patchstack App billing page](https://app.patchstack.com/billing/subscription). + + parameters: + ProductType: + name: type + in: path + required: true + description: Product ecosystem. + schema: + type: string + enum: [plugin, theme, wordpress] + example: plugin + ProductName: + name: name + in: path + required: true + description: | + WordPress plugin or theme slug. Use `wordpress` when `type=wordpress`. + Slugs are lowercase — normalize your own data before comparison. + schema: + type: string + example: tutor + ProductVersion: + name: version + in: path + required: true + description: Concrete version (e.g. `1.5.2`). + schema: + type: string + example: "1.5.2" + + responses: + Unauthorized: + description: Missing or invalid `PSKey` header. + Forbidden: + description: API key not authorised for the requested endpoint. + NotFound: + description: Unknown product/version combination. + TooManyRequests: + description: Rate limit exceeded (5,000 requests / 24 hours). + + schemas: + StandardVulnerability: + type: object + description: | + Flat per-item shape returned by the Standard tier. For the richer shape + (with `description`, `cvss_score`, `cve`, `patched_in_ranges`, etc.), + see the [Extended tier](/api-reference/threat-intelligence-extended/). + required: + - id + - title + - disclosed_at + - created_at + - product_slug + - product_name + - product_type + - fixed_in + - direct_url + properties: + id: + type: integer + description: Stable Patchstack vulnerability id. + example: 4253 + title: + type: string + description: Human-readable title including product name, affected version, and vulnerability type. + example: "WordPress Tutor LMS plugin <= 1.5.2 - Cross-Site Request Forgery (CSRF) vulnerability" + disclosed_at: + type: string + format: date-time + description: When the vulnerability was publicly disclosed (ISO 8601). + example: "2020-02-04T00:00:00+00:00" + created_at: + type: string + format: date-time + description: When the row was inserted into the Patchstack database (ISO 8601). + example: "2022-05-27T10:23:01+00:00" + product_slug: + type: string + description: Lowercase slug of the product. + example: tutor + product_name: + type: string + description: Display name of the product. + example: "Tutor LMS" + product_name_premium: + type: string + nullable: true + description: | + Premium variant name when a plugin author ships two plugins under + the same slug. `null` in the common case. + product_type: + type: string + enum: [Plugin, Theme, WordPress] + description: Product ecosystem. + example: Plugin + fixed_in: + type: string + description: | + First version that contains the patch. Empty string when Patchstack + has not yet recorded a fixed version. + example: "1.5.3" + direct_url: + type: string + format: uri + description: Public Patchstack vulnerability page. + example: "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-5-2-cross-site-request-forgery-csrf-vulnerability" diff --git a/src/assets/images/patchstack-connector-joomla-installation-1.png b/src/assets/images/patchstack-connector-joomla-installation-1.png deleted file mode 100644 index 64a22df4..00000000 Binary files a/src/assets/images/patchstack-connector-joomla-installation-1.png and /dev/null differ diff --git a/src/assets/images/patchstack-connector-joomla-installation-2.png b/src/assets/images/patchstack-connector-joomla-installation-2.png deleted file mode 100644 index 82517d34..00000000 Binary files a/src/assets/images/patchstack-connector-joomla-installation-2.png and /dev/null differ diff --git a/src/assets/images/patchstack-upgrades-seats.png b/src/assets/images/patchstack-upgrades-seats.png index 04997b26..ae38dbee 100644 Binary files a/src/assets/images/patchstack-upgrades-seats.png and b/src/assets/images/patchstack-upgrades-seats.png differ diff --git a/src/components/Ips.astro b/src/components/Ips.astro deleted file mode 100644 index b69d63d5..00000000 --- a/src/components/Ips.astro +++ /dev/null @@ -1,13 +0,0 @@ ---- -const response = await fetch("https://patchstack.com/ips-v4/"); -const ips = await response.text(); -const ipList = ips.split("\n").map(ip => ip.trim()).filter(ip => ip.length > 0); ---- -
    -{ipList.map(ip => ( -
  • {ip}
  • -))} -
-

-You can find the list of IP addresses that Patchstack uses at patchstack.com/ips-v4. -

\ No newline at end of file diff --git a/src/content/docs/API solutions/App API/patchstack-app-api.md b/src/content/docs/API solutions/App API/patchstack-app-api.md index 834af31f..e138c15f 100644 --- a/src/content/docs/API solutions/App API/patchstack-app-api.md +++ b/src/content/docs/API solutions/App API/patchstack-app-api.md @@ -11,13 +11,17 @@ _Patchstack App API is available for the Developer and Enterprise plan users_ Patchstack App API enables users to run all the Patchstack App account actions remotely over an API. It allows you to access protection logs, generate security reports, manage site settings, add new sites, create custom rules, and much more. +:::note[What the App API does not manage] +The App API manages **sites and their security** on your Patchstack account — provisioning, plugin connection, protection, reporting and site settings. It does **not** manage trials, subscriptions, plan changes or billing for your own end customers. If you are reselling Patchstack (for example through WHMCS), run trials, subscriptions and invoicing in your own billing system and use the App API purely to provision and manage the underlying sites. Your Patchstack account's own subscription is handled separately in the Patchstack app UI. +::: + ### Documentation and endpoints Find all the Patchstack App API endpoints with examples from the documentation here: https://api.patchstack.com/app-api/documentation ### Example use cases Some example use cases for Patchstack App API are listed below: -- Integrate Patchstack to your email marketing software to send out monthly security reports to your customers. +- Integrate Patchstack to your email marketing software to send out monthly security reports to your customers. See [Generating and downloading reports](/api-solutions/app-api/patchstack-reports-api/). - Integrate Patchstack inside your own product and let your customers enable (and control) Patchstack directly from your platform without them leaving your service. - Pull IP addresses of attackers that try to exploit vulnerabilities into your DNS firewall to block them on the network layer. - Integrate with Enterprise SIEM/SOC tools and pull vulnerability data and logs directly into it. diff --git a/src/content/docs/API solutions/App API/patchstack-integration.md b/src/content/docs/API solutions/App API/patchstack-integration.md index bb190272..3011520b 100644 --- a/src/content/docs/API solutions/App API/patchstack-integration.md +++ b/src/content/docs/API solutions/App API/patchstack-integration.md @@ -44,6 +44,20 @@ To minimize API calls and reduce latency when displaying site information to you All Patchstack API endpoints return standard HTTP status codes. Your integration should handle these appropriately to ensure reliability and provide meaningful feedback to users. E.g. handle status codes 200, 401, 422, 500. +Failed rechecks and resyncs include a `reason`. See [Why did a recheck or resync fail?](#why-did-a-recheck-or-resync-fail) + +#### Rate limits & quotas +| Endpoint | Limit | +| --- | --- | +| POST /site/add
POST /site/exists | 100 URLs per call in `urls`. Split larger batches across several calls. | +| POST /sites/list | 20 sites per page by default. Page through with `page` and `per_page`. | +| POST /sites/list/basic | All sites in one response by default. Page through with `after_id` and `per_page` (default 100, max 1000). | +| POST /site/plugin/resync/{siteid} | For many sites, use POST /site/plugin/bulk-resync. | + +:::note[Rate limits] +Some App API endpoints are rate limited. If you receive `429 Too Many Requests`, wait a minute and retry. At scale, use the batch and paging options in the table above — for example, pass multiple URLs in the `urls` array on `/site/add` (and `/site/exists`) instead of looping a separate request per site. +::: + ## Flow of integration & plugin Patchstack works by assigning an API key to a site that has been added to the Patchstack App. This API key is then used in the WordPress plugin to activate the connection to Patchstack. @@ -73,6 +87,10 @@ It's also important to set the `Content-Type` HTTP header to `application/json` ### Step 2: Site provisioning When the site should be added to Patchstack depends on your use-case scenario. If they require protection immediately then you can execute this flow the moment the website environment (the WordPress site) has been created on the infrastructure. If you upsell Patchstack then this flow can be launched upon purchase or opt-in. +:::tip[Using WHMCS?] +If you provision Patchstack through WHMCS, the Patchstack WHMCS module handles this flow for you. See the [WHMCS setup guide](/partners/whmcs-setup/). +::: + ###### 1. Determine if the site already exists in Patchstack This step is essential as it's possible that a site may be protected already or added to Patchstack. For this, the `/site/exists` API endpoint can be utilized; it will check if a site with the given URL has already been added to Patchstack before you attempt to actually add the site to Patchstack. @@ -119,18 +137,110 @@ The response will look something like below. { "success": "Successfully added the site(s).", "count": 1, + "sites": { + "https://mywebsite.com": { + "siteid": 12345, + "oauth": { + "id": 12333, + "secret": "DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR", + "apikey": "DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR-12333" + } + } + }, "lastid": 12345, "oauth": { - "id": 12345, - "secret": "DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR" + "id": 12333, + "secret": "DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR", + "apikey": "DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR-12333" } } ``` +The top-level `lastid` and `oauth` fields refer to the **last** site in the batch and are kept for backwards compatibility. New integrations should read from the per-URL `sites` map. + +###### Bulk provisioning +The `urls` parameter is an **array**, so you can provision up to **100 sites in a single `/site/add` call** rather than looping one request per site. Pass every URL in the array and the response returns one entry per added URL under the `sites` map, keyed by the exact URL you sent (URLs already on the account are skipped, see below): + +```bash +curl -X 'POST' \ + 'https://api.patchstack.com/monitor/site/add' \ + -H 'UserToken: ' \ + -H 'Content-Type: application/json' \ + -d '{ + "urls": [ + "https://site1.com", + "https://site2.com" + ], + "cms_id": 1 +}' +``` + +```json +{ + "success": "Successfully added the site(s).", + "count": 2, + "sites": { + "https://site1.com": { + "siteid": 12345, + "oauth": { "id": 12333, "secret": "…", "apikey": "…-12333" } + }, + "https://site2.com": { + "siteid": 12346, + "oauth": { "id": 12334, "secret": "…", "apikey": "…-12334" } + } + }, + "lastid": 12346, + "oauth": { "id": 12334, "secret": "…", "apikey": "…-12334" } +} +``` + +Reconcile the results **by URL**: iterate the `sites` map and match each key back to the record on your side, rather than relying on array order or the top-level `lastid`. The `/site/exists` endpoint accepts the same `urls` array (up to 100) so you can pre-check a whole batch in one call before adding it. If you need to re-fetch the `{siteid, url}` mapping for every site on the account later, call [`POST /monitor/sites/list/basic`](https://api.patchstack.com/app-api/documentation) and match by URL. + +###### Sites that are already on the account +`/site/add` never adds a site twice. A URL that is already on your account (or your team's) is skipped: it is not created again and it is not charged for again. The same goes for a URL that appears twice in one request. This makes it safe to resend a batch, for example after a timeout. + +When matching, `http` and `https`, a `www.` prefix, upper and lower case, and a trailing slash are ignored. A different port or path counts as a different site, so `https://mywebsite.com/shop` can still be added next to `https://mywebsite.com`. + +Skipped URLs are listed in `skipped` and do not appear in `sites`: + +```json +{ + "success": "Successfully added the site(s).", + "count": 1, + "sites": { + "https://site2.com": { + "siteid": 12346, + "oauth": { "id": 12334, "secret": "…", "apikey": "…-12334" } + } + }, + "skipped": ["https://site1.com"], + "lastid": 12346, + "oauth": { "id": 12334, "secret": "…", "apikey": "…-12334" } +} +``` + +If every URL in the request is already on the account, nothing is added and the call returns HTTP `422`: + +```json +{ + "error": "The site(s) you entered are already on your account.", + "skipped": ["https://site1.com", "https://site2.com"] +} +``` + +To get the `siteid` of a skipped site, call [`POST /monitor/sites/list/basic`](https://api.patchstack.com/app-api/documentation) and match by URL. + ###### 3. Store in local datastore -It is now important to store the lastid and oauth properties into a datastore on your infrastructure. This allows you to know the site identifier of the website of the customer without having to query the Patchstack App API each time. This can then be used for most of our other API endpoints to fetch information for the site. +Store the `siteid` and `apikey` for each URL in a datastore on your infrastructure. This avoids having to query the Patchstack App API each time you need to identify a customer's site. + +- **`siteid`** is the canonical Patchstack site identifier. It is what the portal displays and what every per-site API endpoint expects in the URL (`/site/view/{siteid}`, `/site/delete/{siteid}`, `/download/wordpress/{siteid}`, etc.). Store this if you ever need to cross-reference your records against the Patchstack portal. +- **`apikey`** is the pre-formatted plugin license key (`-`). Pass it directly to the WordPress plugin during activation — you do not need to assemble it yourself. -The API key that is used in the plugin, contains the format `oauth.secret-oauth.id`, for example in above response it would be `DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR-12345`. +:::note[`siteid` and `oauth.id` are independent fields] +`siteid` identifies the site, `oauth.id` identifies the OAuth credential embedded in the plugin license key. They have always been independent fields with different purposes. Do not assume they are equal — for sites provisioned before 13 May 2026 the two values often coincided as a side-effect of how rows were inserted, but they may differ for any site provisioned since. + +If you previously stored `oauth.id` under the assumption it equalled the site identifier, call [`POST /monitor/sites/list/basic`](https://api.patchstack.com/app-api/documentation) to fetch `[{id, url}, …]` for every site on your account, match by URL, and update your stored values to the current `siteid`. +::: ### Step 3: Plugin deployment Now that you have the site identifier and plugin API key stored in your local datastore, you can start the flow of installing and activating the Patchstack plugin on the website. @@ -153,9 +263,9 @@ First we execute the command below to install and activate the Patchstack plugin `wp plugin install patchstack --activate` -Then we execute the command below to activate the connection to Patchstack. It is important to inject the plugin API key here we retrieved from step 2: +Then we execute the command below to activate the connection to Patchstack. It is important to inject the plugin API key (`apikey` from step 2) here: -`wp patchstack activate DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR-12345` +`wp patchstack activate DOOs9DIyv2FMcURFtkB0eXOHMRhH7I2EsaNUb4aR-12333` This command will return `The Patchstack plugin has been successfully connected.` if it succeeded. @@ -223,6 +333,37 @@ Simply plug it in your own environment and give customers deeper insights into t [Click here for integration and more information](/api-solutions/app-api/patchstack-iframe/) +## Site lifecycle: removing & re-adding sites + +###### Removing a site +To remove a site from the account — for example when a customer cancels or you clean up a never-activated site — call the delete endpoint with the `siteid` you stored in step 2. The path is `/site/delete/{siteid}` and it accepts both `DELETE` and `POST`. + +```bash +curl -X 'DELETE' \ + 'https://api.patchstack.com/monitor/site/delete/12345' \ + -H 'UserToken: ' \ + -H 'Content-Type: application/json' +``` + +```json +{ + "success": "Successfully deleted the site." +} +``` + +To also uninstall the Patchstack plugin from the remote WordPress site as part of the deletion, send `{"delete": true}` in the request body. To remove several sites at once, call `DELETE /site/delete` with a body of `{"sites": [12345, 12346]}`. + +:::caution[Plugin removal on site deletion] +Deleting a site with the `delete` flag also attempts to remove the Patchstack plugin from the connected WordPress site. This remote removal is best-effort and may not complete if the site connection is unstable, or if the plugin has already been deactivated or disconnected (but not deleted). For reliable removal, manage the plugin directly on the site with WP-CLI (for example `wp plugin delete patchstack`) rather than relying on the remote deletion. +::: + +:::caution[Deleting a site is destructive and permanent] +There is **no paused or suspended state** in Patchstack. Deleting a site removes it and its data, and it stops counting toward your plan. If you later re-add the same URL with `/site/add`, Patchstack provisions a **brand-new site** with **new `siteid` and new OAuth credentials** (a new plugin `apikey`) — the previous credentials are not restored. Any integration that "suspends" and "resumes" a site must therefore delete on suspend and re-provision + re-activate the plugin on resume, then overwrite the stored `siteid`/`apikey` with the new values. +::: + +###### Cleaning up never-activated sites +A site that was provisioned but whose plugin never connected will report `{"activated": false}` from [`GET /site/plugin/installed/{siteid}`](https://api.patchstack.com/app-api/documentation#/Sites/d932033c445ab06e5fd2dcb6ea8eead3). Combine that check with the delete endpoint above to periodically prune sites that were added but never came online. See the [FAQ](#how-to-determine-if-a-site-has-been-activated-and-is-connected) for the difference between the `plugin/installed` and `state` checks. + ## Noteworthy API endpoints The list below are noteworthy API endpoints that might be interesting to our partners. @@ -285,4 +426,85 @@ Which outputs the following: { "activated": true } -``` \ No newline at end of file +``` + +### Why did a recheck or resync fail? +On failure, [`POST /site/plugin/recheck/{siteid}`](https://api.patchstack.com/app-api/documentation) and [`POST /site/plugin/resync/{siteid}`](https://api.patchstack.com/app-api/documentation) return `422` with a `reason` code next to `error`. + +```json +{ + "error": "We could not force a resync of the site (ERR 1).", + "reason": "plugin_rejected_request" +} +``` + +###### plugin_rejected_request +- Plugin not active. Check with `wp plugin list`. +- Plugin holds another site's API key, e.g. after cloning. Run `wp patchstack activate `. +- `AUTH_KEY` salts changed, so the stored key can't be read. Run `wp patchstack activate `. +- Stale object cache. Run `wp cache flush`. +- Server clock more than 10 minutes off. Sync it. + +###### blocked_by_firewall +- A WAF, bot protection, CDN challenge, HTTP auth or maintenance page answered instead of WordPress. Allow `POST /wp-admin/admin-ajax.php` from our [IPv4](https://patchstack.com/ips-v4/) and [IPv6](https://patchstack.com/ips-v6/) ranges, or for the `User-Agent` ending in `Patchstack/1.0 (+https://patchstack.com)`. + +###### plugin_endpoint_not_found +- Site URL doesn't match the WordPress address, e.g. after a domain change or for a subdirectory install. +- A security plugin hides `admin-ajax.php`. + +###### site_error +- `5xx` from the site. Check its error log. + +###### site_unreachable +- Site down or timing out. +- Domain doesn't resolve. +- Invalid TLS certificate. + +###### unexpected_response +- Extra output on `admin-ajax.php`, e.g. from another plugin. +- Outdated plugin. Update it. +- Contact support if it persists. + +###### site_not_connected +- No API key on our side. [Remove and re-add the site](#site-lifecycle-removing--re-adding-sites), then activate with the new `apikey`. + +### What's the difference between `siteid` and `oauth.id`? Can I assume they're equal? +They are two independent fields with different purposes — do not assume they are equal. + +- **`siteid`** is the canonical Patchstack site identifier. It is what the portal displays and what every per-site API endpoint expects (e.g. `/site/view/{siteid}`, `/site/delete/{siteid}`, `/download/wordpress/{siteid}`). Store this for cross-referencing your records against the Patchstack portal. +- **`oauth.id`** is the OAuth credential identifier. Its only purpose is to form the plugin license key, which the `/site/add` response already returns pre-formatted as `apikey` (`-`). You never need to read `oauth.id` as a standalone value — just pass `apikey` to the plugin. + +For sites provisioned before 13 May 2026, `siteid` and `oauth.id` coincidentally held the same value because of how rows were inserted in our database. They may differ for any site provisioned since. If you previously stored `oauth.id` under the assumption it equalled the site identifier, see the [callout in step 2 of integration](#3-store-in-local-datastore) for how to reconcile your stored values. + +### How can I reconcile site IDs in my datastore against the Patchstack portal? +Call [`POST /monitor/sites/list/basic`](https://api.patchstack.com/app-api/documentation) with the same `UserToken` you use for `/site/add`. It returns `[{id, url}, …]` for every site on your account, where `id` is the current `siteid`. Match by URL and update your stored values. + +```bash +curl -X 'POST' \ + 'https://api.patchstack.com/monitor/sites/list/basic' \ + -H 'UserToken: ' \ +``` + +On large accounts, page through the list with `after_id` and `per_page` (default 100, max 1000): + +```bash +curl -X 'POST' \ + 'https://api.patchstack.com/monitor/sites/list/basic' \ + -H 'UserToken: ' \ + -H 'Content-Type: application/json' \ + -d '{ + "after_id": 0, + "per_page": 1000 +}' +``` + +Which outputs the following: +```json +{ + "sites": [{ "id": 12345, "url": "https://site1.com" }, …], + "total": 2400, + "next_after_id": 13345 +} +``` + +Pass `next_after_id` as `after_id` in the next request until it is `null`. \ No newline at end of file diff --git a/src/content/docs/API solutions/App API/patchstack-reports-api.md b/src/content/docs/API solutions/App API/patchstack-reports-api.md new file mode 100644 index 00000000..51268852 --- /dev/null +++ b/src/content/docs/API solutions/App API/patchstack-reports-api.md @@ -0,0 +1,88 @@ +--- +title: "Generating and downloading reports" +hidden: false +sidebar: + order: 4 +--- + +_Generating reports through the Patchstack App API is available for the Developer and Enterprise plan users_ + +You can generate [security reports](/patchstack-app/reports/reports-overview/) and download their PDFs over the [Patchstack App API](/api-solutions/app-api/patchstack-app-api/), for example to send monthly reports to your customers from your own platform. + +Reports are generated in the background, so getting a PDF takes three steps: + +1. Request a report with [`POST /report/generate/{site}`](https://api.patchstack.com/app-api/documentation) +2. Find the finished report with [`POST /report/reports`](https://api.patchstack.com/app-api/documentation) +3. Download the PDF from the report's `download_url` + +All examples use the App API root URL `https://api.patchstack.com/monitor/`. Replace `YOUR_APP_API_KEY` with your own [Patchstack App API key](/api-solutions/app-api/patchstack-app-api/#how-to-get-patchstack-app-api-key) and `12345` with your site identifier. + +### 1. Generate a report + +Send the report `type`, either `snapshot` or `developer`. A Developer report also needs a `from` and `to` date in the `D-M-YYYY` format. + +```bash +curl -X POST "https://api.patchstack.com/monitor/report/generate/12345" \ + -H "UserToken: YOUR_APP_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{"type": "developer", "from": "1-9-2026", "to": "30-9-2026"}' +``` + +The response only confirms that the report was queued. It does not contain the PDF: + +```json +{ "success": "The generation request has been sent." } +``` + +### 2. Find the generated report + +A report shows up in the report list once it is ready. A Developer report can take a few minutes. List the reports for the site, newest first: + +```bash +curl -X POST "https://api.patchstack.com/monitor/report/reports" \ + -H "UserToken: YOUR_APP_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{"page": 1, "application": "12345"}' +``` + +Each report in the response has a `download_url`: + +```json +{ + "reports": [ + { + "id": 1, + "site_id": 12345, + "type": "developer", + "hash": "1/1-eb0b4a0e-2866-436c-a7ee-cfffda415d21.pdf", + "raw_hash": "1-eb0b4a0e-2866-436c-a7ee-cfffda415d21", + "download_url": "https://api.patchstack.com/monitor/report/fetch/1-eb0b4a0e-2866-436c-a7ee-cfffda415d21", + "created_at": "2026-10-01 03:09:02" + } + ], + "total": 1 +} +``` + +To wait for a report you just requested, poll this endpoint until a new report for the site appears, for example once a minute. Compare its `id` with the newest report you saw before generating. + +### 3. Download the PDF + +Request the report's `download_url`. It redirects to a temporary link for the PDF, so tell your HTTP client to follow redirects: + +```bash +curl -L -o report.pdf "https://api.patchstack.com/monitor/report/fetch/1-eb0b4a0e-2866-436c-a7ee-cfffda415d21" +``` + +- The download URL needs no API key, so you can hand it to your customer as it is. +- The temporary link it redirects to is valid for one week. The `download_url` itself keeps working, so request it again for a fresh link. +- If you build the URL yourself, use `raw_hash`, not `hash`. `raw_hash` is `hash` without the leading folder and the `.pdf` extension. +- An unknown hash returns a `422` response with `{"error": "The given report could not be found."}`. + +:::caution[Treat download URLs like passwords] +Anyone with a report's download URL can download that report. Only share it with the people the report is meant for. +::: + +### Scheduled reports + +To get reports on a fixed schedule instead, create a schedule with [`POST /report/schedule/{site}/create`](https://api.patchstack.com/app-api/documentation). Scheduled reports show up in the same report list, so you can download them the same way. See [Scheduling reports](/patchstack-app/reports/scheduling-reports/) for how schedules work. diff --git a/src/content/docs/API solutions/Threat Intelligence API/extended.md b/src/content/docs/API solutions/Threat Intelligence API/extended.md index 732fe6b1..705efcd9 100644 --- a/src/content/docs/API solutions/Threat Intelligence API/extended.md +++ b/src/content/docs/API solutions/Threat Intelligence API/extended.md @@ -1,541 +1,135 @@ --- -title: "Extended tier API" -excerpt: "" +title: "Threat Intelligence API" +excerpt: "WordPress vulnerability intelligence — single-product and bulk lookups, latest-24h feed, and advisory-by-id detail." hidden: false -metadata: +metadata: image: [] robots: "index" createdAt: "Mon Jul 25 2022 09:29:10 GMT+0000 (Coordinated Universal Time)" updatedAt: "Thu Jun 15 2023 11:25:44 GMT+0000 (Coordinated Universal Time)" sidebar: order: 2 + label: "Guide" --- -_The purpose of this document is to provide information about the Extended Threat Intelligence API functionality._ - -## API Usage - -### Information - -The base URL of the API is - -All responses are in the JSON format. For performance reasons, responses are cached until we update the database after which the appropriate caches are cleared. - -An API key is required. This API key should be present in the **PSKey HTTP request header**. You can request an API key by reaching out to us on this page: https://patchstack.com/for-hosts/ - -Explanation of the API response properties can be found here [here](/api-solutions/threat-intelligence-api/api-properties/). - -### Latest vulnerabilities - -**Description:** Retrieve the latest 20 vulnerabilities which have been added to the database. -**Endpoint:** /latest -**Method:** GET - -**Example response (trimmed)** - -```json -{ - "vulnerabilities": [ - { - "id": 7976, - "product_id": 2175, - "title": "WordPress File Upload plugin <= 4.16.2 - Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE)", - "description": "Contributor+ Path Traversal vulnerability leading to Remote Code Execution (RCE) discovered by apple502j in WordPress File Upload plugin (versions <= 4.16.2).", - "disclosure_date": "2022-03-01 00:00:00", - "disclosed_at": "2022-03-01T00:00:00+00:00", - "created_at": "2022-03-07T11:17:05+00:00", - "url": "wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce", - "product_slug": "wp-file-upload", - "product_name": "WordPress File Upload", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Directory Traversal", - "cvss_score": 8.8, - "cve": [ - "2021-24962" - ], - "is_exploited": false, - "patch_priority": 3, - "affected_in": "<= 4.16.2", - "fixed_in": "4.16.3", - "patched_in_ranges": [], - "direct_url": "https://patchstack.com/database/vulnerability/wp-file-upload/wordpress-file-upload-plugin-4-16-2-contributor-path-traversal-vulnerability-leading-to-remote-code-execution-rce" - }, - { - "id": 7957, - "product_id": 3808, - "title": "WordPress All in One Invite Codes plugin <= 1.0.12 - Sensitive Information Disclosure vulnerability", - "description": "Sensitive Information Disclosure vulnerability discovered in WordPress All in One Invite Codes plugin (versions <= 1.0.12).", - "disclosure_date": "2022-02-28 00:00:00", - "disclosed_at": "2022-02-28T00:00:00+00:00", - "created_at": "2022-03-03T13:25:05+00:00", - "url": "wordpress-all-in-one-invite-codes-plugin-1012-sensitive-information-disclosure-vulnerability", - "product_slug": "all-in-one-invite-codes", - "product_name": "All in One Invite Codes", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Information Disclosure", - "cvss_score": 4.3, - "cve": [], - "is_exploited": false, - "patch_priority": 1, - "affected_in": "<= 1.0.12", - "fixed_in": "", - "patched_in_ranges": [], - "direct_url": "https://patchstack.com/database/vulnerability/all-in-one-invite-codes/wordpress-all-in-one-invite-codes-plugin-1012-sensitive-information-disclosure-vulnerability" - } - ] -} -``` +_The Threat Intelligence API has **custom pricing and is activated on request** — [contact us](https://patchstack.com/for-hosts/)._ -### Find vulnerability - -**Description:** Retrieve vulnerabilities of a specific plugin, theme or WordPress core version. -**Endpoint:** /product/TYPE/NAME/VERSION/EXISTS? -**Method:** GET - -**TYPE** = theme, plugin, wordpress -**NAME** = Slug of the theme, slug of the plugin, or “wordpress” in case TYPE is set to wordpress -**VERSION** = Version to check for vulnerabilities -**EXISTS** = Optional flag that will not return all vulnerabilities but only a boolean response whether or not there are vulnerabilities. This flag being present results in a faster response. - -**Example Response** - -```json -{ - "vulnerabilities": [ - { - "id": 4253, - "product_id": 2642, - "title": "WordPress Tutor LMS plugin <= 1.5.2 - Cross-Site Request Forgery (CSRF) vulnerability", - "description": "Cross-Site Request Forgery (CSRF) vulnerability found by Jinson Varghese Behanan in WordPress Tutor LMS plugin (versions <= 1.5.2).", - "disclosure_date": "2020-02-04 00:00:00", - "disclosed_at": "2020-02-04T00:00:00+00:00", - "created_at": "2021-01-08T13:50:05+00:00", - "url": "wordpress-tutor-lms-plugin-1-5-2-cross-site-request-forgery-csrf-vulnerability", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Cross Site Request Forgery (CSRF)", - "cvss_score": null, - "cve": [ - "2020-8615" - ], - "is_exploited": false, - "patch_priority": 1, - "affected_in": "<= 1.5.2", - "fixed_in": "1.5.3", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-5-2-cross-site-request-forgery-csrf-vulnerability" - }, - { - "id": 4386, - "product_id": 2642, - "title": "WordPress Tutor LMS plugin <= 1.7.6 - Multiple Blind/Time-based SQL Injection (SQLi) vulnerabilities", - "description": "Multiple Blind/Time-based SQL Injection (SQLi) vulnerabilities were discovered by WordFence in the WordPress Tutor LMS plugin (versions <= 1.7.6).", - "disclosure_date": "2021-03-15 00:00:00", - "disclosed_at": "2021-03-15T00:00:00+00:00", - "created_at": "2021-06-07T10:12:03+00:00", - "url": "wordpress-tutor-lms-plugin-1-7-6-multiple-blind-time-based-sql-injection-sqli-vulnerabilities", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "SQL Injection", - "cvss_score": 5.4, - "cve": [], - "is_exploited": false, - "patch_priority": 2, - "affected_in": "<= 1.7.6", - "fixed_in": "1.7.7", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-7-6-multiple-blind-time-based-sql-injection-sqli-vulnerabilities" - }, - { - "id": 4387, - "product_id": 2642, - "title": "WordPress Tutor LMS plugin <= 1.8.2 - Multiple Union SQL Injection (SQLi) vulnerabilities", - "description": "Multiple Union SQL Injection (SQLi) vulnerabilities were discovered by WordFence in the WordPress Tutor LMS plugin (versions <= 1.8.2).", - "disclosure_date": "2021-03-15 00:00:00", - "disclosed_at": "2021-03-15T00:00:00+00:00", - "created_at": "2021-03-16T08:48:03+00:00", - "url": "wordpress-tutor-lms-plugin-1-8-2-multiple-union-sql-injection-sqli-vulnerabilities", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "SQL Injection", - "cvss_score": null, - "cve": [], - "is_exploited": false, - "patch_priority": 2, - "affected_in": "<= 1.8.2", - "fixed_in": "1.8.3", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-8-2-multiple-union-sql-injection-sqli-vulnerabilities" - }, - { - "id": 4388, - "product_id": 2642, - "title": "WordPress Tutor LMS plugin <= 1.7.6 - Unprotected AJAX Action to Privilege Escalation vulnerability", - "description": "Unprotected AJAX Action to Privilege Escalation vulnerability discovered by WordFence in WordPress Tutor LMS plugin (versions <= 1.7.6).", - "disclosure_date": "2021-03-15 00:00:00", - "disclosed_at": "2021-03-15T00:00:00+00:00", - "created_at": "2021-08-31T08:00:05+00:00", - "url": "wordpress-tutor-lms-plugin-1-7-6-unprotected-ajax-action-to-privilege-escalation-vulnerability", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Privilege Escalation", - "cvss_score": null, - "cve": [], - "is_exploited": false, - "patch_priority": 3, - "affected_in": "<= 1.7.6", - "fixed_in": "1.7.7", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-7-6-unprotected-ajax-action-to-privilege-escalation-vulnerability" - }, - { - "id": 4549, - "product_id": 2642, - "title": "WordPress Tutor LMS plugin <= 1.8.7 - Authenticated Local File Inclusion vulnerability", - "description": "Authenticated Local File Inclusion vulnerability discovered by sasa in WordPress Tutor LMS plugin (versions <= 1.8.7)", - "disclosure_date": "2021-04-05 00:00:00", - "disclosed_at": "2021-04-05T00:00:00+00:00", - "created_at": "2021-04-19T09:28:03+00:00", - "url": "wordpress-tutor-lms-plugin-1-8-7-authenticated-local-file-inclusion-vulnerability", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Local File Inclusion", - "cvss_score": 4.9, - "cve": [ - "2021-24242" - ], - "is_exploited": false, - "patch_priority": 1, - "affected_in": "<= 1.8.7", - "fixed_in": "1.8.8", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-8-7-authenticated-local-file-inclusion-vulnerability" - }, - { - "id": 5082, - "product_id": 2642, - "title": "WordPress Tutor LMS plugin <= 1.9.5 - Reflected Cross-Site Scripting (XSS) vulnerability", - "description": "Reflected Cross-Site Scripting (XSS) vulnerability discovered by WPScanTeam in WordPress Tutor LMS plugin (versions <= 1.9.5).", - "disclosure_date": "2021-08-09 00:00:00", - "disclosed_at": "2021-08-09T00:00:00+00:00", - "created_at": "2021-08-20T06:35:01+00:00", - "url": "wordpress-tutor-lms-plugin-1-9-5-reflected-cross-site-scripting-xss-vulnerability", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Cross Site Scripting (XSS)", - "cvss_score": 7.1, - "cve": [], - "is_exploited": false, - "patch_priority": 2, - "affected_in": "<= 1.9.5", - "fixed_in": "1.9.6", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-9-5-reflected-cross-site-scripting-xss-vulnerability" - }, - { - "id": 5388, - "product_id": 2642, - "title": "WordPress Tutor LMS plugin <= 1.9.8 - Multiple Stored Cross-Site Scripting (XSS) vulnerabilities", - "description": "Multiple Stored Cross-Site Scripting (XSS) vulnerabilities were discovered by Shivam Rai in the WordPress Tutor LMS plugin (versions <= 1.9.8).", - "disclosure_date": "2021-09-20 00:00:00", - "disclosed_at": "2021-09-20T00:00:00+00:00", - "created_at": "2021-10-22T12:54:01+00:00", - "url": "wordpress-tutor-lms-plugin-1-9-8-multiple-stored-cross-site-scripting-xss-vulnerabilities", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Cross Site Scripting (XSS)", - "cvss_score": 6.9, - "cve": [ - "2021-24740" - ], - "is_exploited": false, - "patch_priority": 2, - "affected_in": "<= 1.9.8", - "fixed_in": "1.9.9", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-9-8-multiple-stored-cross-site-scripting-xss-vulnerabilities" - } - ] -} -``` +> **Interactive reference:** Every endpoint, parameter, request body and response shape is documented in the [Threat Intelligence API reference](/api-reference/threat-intelligence-extended/). +> +> **Tooling (Postman, SDK, LLM):** spec URLs and import instructions live on [Overview → Using the API with your tools](/api-solutions/threat-intelligence-api/overview/#using-the-api-with-your-tools). -**Example Response** - -```json -{ - "vulnerable": true -} -``` +This page covers the concepts you need to use the API effectively — authentication, rate limiting, errors, and code samples. Use it alongside the interactive reference. -### Bulk find vulnerability +## Endpoints at a glance -**Description:** Retrieve vulnerabilities in bulk of a number of plugins, themes or WordPress versions. -**Endpoint:** /batch -**Method:** POST -**Payload:** Raw JSON payload, same format as the individual vulnerability endpoint. This payload should contain no more than 50 objects. +| Endpoint | Purpose | +|---|---| +| `GET /product/{type}/{name}/{version}` | Advisory list for a single product + version. | +| `GET /product/{type}/{name}/{version}/exists` | Boolean-only exists check (faster). | +| `GET /latest` | The 20 most recent vulnerabilities. | +| `POST /batch` | Bulk lookup — up to 50 products per request. | +| `GET /vulnerability/{id}` | Advisory detail (CVSS vector, OWASP, references, credit). | -**Payload Example 1** +Each per-item payload includes `description`, `vuln_type`, `cvss_score`, `cve`, `is_exploited`, `patch_priority`, `affected_in`, and `patched_in_ranges`. See [API properties](/api-solutions/threat-intelligence-api/api-properties/) for full field definitions. -This payload example will determine if WooCommerce version 3.0.0 has vulnerabilities and if WordPress version 3.0.0 has vulnerabilities. It will also only return a boolean response. +## Base URL -```json -[ - {"name":"easy-digital-downloads1","version":"1.0.0","type":"plugin","exists":true}, - {"name":"wordpress","version":"3.0.0","type":"wordpress","exists":true} -] +``` +https://patchstack.com/database/api/v2/ ``` -**Example response 1** +## Authentication -```json -{ - "vulnerabilities": { - "easy-digital-downloads1": true, - "wordpress": true - } -} +Every request must include your API key in the **`PSKey`** HTTP request header. Access is activated on request — [contact us](https://patchstack.com/for-hosts/) to request a key. + +``` +PSKey: ``` -**Payload example 2** +## Response format -This payload example will determine if WooCommerce version 3.0.0 has vulnerabilities and if WordPress version 3.0.0 has vulnerabilities. For WooCommerce it will return all vulnerabilities and for WordPress if it will return a boolean response. +All responses are JSON. Responses are cached until the Patchstack database updates, at which point the cache is cleared. `GET /vulnerability/{id}` returns a richer, differently-shaped payload documented in the [reference](/api-reference/threat-intelligence-extended/). -```json -[ - {"name":"easy-digital-downloads1","version":"1.0.0","type":"plugin","exists":false}, - {"name":"wordpress","version":"3.0.0","type":"wordpress","exists":true} -] -``` +## Batch lookups -**Example response 2** - -```json -{ - "vulnerabilities": { - "easy-digital-downloads1": [ - { - "id": 4532, - "product_id": 1572, - "title": "WordPress Easy Digital Downloads plugin <= 2.10.2 - Cross-Site Request Forgery (CSRF) vulnerability", - "description": "Cross-Site Request Forgery (CSRF) vulnerability discovered by WPScan team in WordPress Easy Digital Downloads plugin (versions <= 2.10.2).", - "disclosure_date": "2021-04-16 00:00:00", - "disclosed_at": "2021-04-16T00:00:00+00:00", - "created_at": "2021-04-19T04:43:04+00:00", - "url": "wordpress-easy-digital-downloads-plugin-2-10-2-cross-site-request-forgery-csrf-vulnerability", - "product_slug": "easy-digital-downloads1", - "product_name": "Easy Digital Downloads", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Cross Site Request Forgery (CSRF)", - "cvss_score": 6.5, - "cve": [], - "is_exploited": false, - "affected_in": "<= 2.10.2", - "fixed_in": "2.10.3", - "direct_url": "https://patchstack.com/database/vulnerability/easy-digital-downloads1/wordpress-easy-digital-downloads-plugin-2-10-2-cross-site-request-forgery-csrf-vulnerability" - }, - { - "id": 5410, - "product_id": 1572, - "title": "WordPress Easy Digital Downloads plugin <= 2.11.2 - Authenticated Reflected Cross-Site Scripting (XSS) vulnerability", - "description": "Authenticated Reflected Cross-Site Scripting (XSS) vulnerability discovered by Thinkland Security Team in WordPress Easy Digital Downloads plugin (versions <= 2.11.2).", - "disclosure_date": "2021-10-21 00:00:00", - "disclosed_at": "2021-10-21T00:00:00+00:00", - "created_at": "2021-10-22T12:54:01+00:00", - "url": "wordpress-easy-digital-downloads-plugin-2-11-2-authenticated-reflected-cross-site-scripting-xss-vulnerability", - "product_slug": "easy-digital-downloads1", - "product_name": "Easy Digital Downloads", - "product_name_premium": null, - "product_type": "Plugin", - "vuln_type": "Cross Site Scripting (XSS)", - "cvss_score": 4.8, - "cve": [ - "2021-39354" - ], - "is_exploited": false, - "affected_in": "<= 2.11.2", - "fixed_in": "2.11.2.1", - "direct_url": "https://patchstack.com/database/vulnerability/easy-digital-downloads1/wordpress-easy-digital-downloads-plugin-2-11-2-authenticated-reflected-cross-site-scripting-xss-vulnerability" - } - ], - "wordpress": true - } -} -``` +`POST /batch` accepts an array of up to 50 `{name, version, type, exists?}` items. The response is keyed by `product_slug`, not by array index — duplicate slugs in the request collapse. Per-item `exists: true` returns a boolean for that slug; `exists: false` (or omitted) returns the full advisory list. -### Find specific vulnerability by ID - -**Description:** Find a specific vulnerability by vulnerability id. -**Endpoint:** /vulnerability/ID -**Method:** GET - -**ID** = Numeric identifier or PSID of the vulnerability. - -**Example response 1** - -```json -{ - "vulnerability": { - "title": "WordPress Spam protection, AntiSpam, FireWall by CleanTalk plugin <= 5.153.3 - Unauthenticated Time-Based Blind SQL Injection (SQLi) vulnerability", - "description": "Unauthenticated Time-Based Blind SQL Injection (SQLi) vulnerability discovered by WordFence in WordPress Spam protection, AntiSpam, FireWall by CleanTalk plugin (versions <= 5.153.3).", - "disclosure_date": "2021-05-03 00:00:00", - "disclosed_at": "2021-05-03T00:00:00+00:00", - "created_at": "2021-09-28T14:17:02+00:00", - "is_exploited": true, - "url": "wordpress-spam-protection-antispam-firewall-by-cleantalk-plugin-5-153-3-unauthenticated-time-based-blind-sql-injection-sqli-vulnerability", - "direct_url": "https://patchstack.com/database/vulnerability/cleantalk-spam-protect/wordpress-spam-protection-antispam-firewall-by-cleantalk-plugin-5-153-3-unauthenticated-time-based-blind-sql-injection-sqli-vulnerability" - }, - "product": { - "name": "Spam protection, AntiSpam, FireWall by CleanTalk", - "slug": "cleantalk-spam-protect", - "type": "Plugin" - }, - "type": "SQL Injection", - "cvss": { - "score": 7.5, - "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", - "description": "" - }, - "owasp": "A1: Injection", - "references_url": [ - { - "url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-24295", - "title": "CVE" - }, - { - "url": "https://www.wordfence.com/blog/2021/05/sql-injection-vulnerability-patched-in-cleantalk-antispam-plugin/", - "title": "Vulnerability details" - }, - { - "url": "https://wordpress.org/plugins/cleantalk-spam-protect/#developers", - "title": "Plugin changelog" - } - ], - "cve": [ - "2021-24295" - ], - "versions": { - "affected_in": "<= 5.153.3", - "fixed_in": "5.153.4" - }, - "versions_list": null, - "credit": { - "name": "WordFence", - "url": "https://twitter.com/wordfence" - }, - "submitter": null -} -``` +## Rate limiting -**Example response 2** - -```json -{ - "vulnerability": { - "title": "WordPress Simple File List plugin <= 4.2.2 - Unauthenticated Arbitrary File Upload vulnerability leading to Remote Code Execution (RCE)", - "description": "Unauthenticated Arbitrary File Upload vulnerability leading to Remote Code Execution (RCE) discovered by h00die and coiffeur in WordPress Simple File List plugin (versions <= 4.2.2).", - "disclosure_date": "2020-04-27 00:00:00", - "disclosed_at": "2020-04-27T00:00:00+00:00", - "created_at": "2021-04-23T15:55:02+00:00", - "is_exploited": false, - "url": "wordpress-simple-file-list-plugin-4-2-2-unauthenticated-arbitrary-file-upload-vulnerability-leading-to-remote-code-execution-rce", - "direct_url": "https://patchstack.com/database/vulnerability/simple-file-list/wordpress-simple-file-list-plugin-4-2-2-unauthenticated-arbitrary-file-upload-vulnerability-leading-to-remote-code-execution-rce" - }, - "product": { - "name": "Simple File List", - "slug": "simple-file-list", - "type": "Plugin" - }, - "type": "SQL Injection", - "cvss": { - "score": 9.8, - "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", - "description": "" - }, - "owasp": "A1: Injection", - "references_url": [ - { - "url": "https://packetstormsecurity.com/files/160221/", - "title": "Vulnerability details" - }, - { - "url": "https://wordpress.org/plugins/simple-file-list/#developers", - "title": "Plugin changelog" - } - ], - "cve": [], - "versions": { - "affected_in": "<= 4.2.2", - "fixed_in": "4.2.3" - }, - "versions_list": null, - "credit": { - "name": "coiffeur", - "url": "https://packetstormsecurity.com/files/author/14922/" - }, - "submitter": { - "name": "h00die", - "url": "https://packetstormsecurity.com/files/author/7166/" - } -} +Custom, set per contract. Contact if you need a quota change. + +## Errors + +| Status | Meaning | +|---|---| +| `401 Unauthorized` | Missing or invalid `PSKey` header. | +| `403 Forbidden` | API key not authorised for the requested endpoint. | +| `404 Not Found` | Unknown product/version or vulnerability id. | +| `422 Unprocessable Entity` | Invalid request payload (e.g. batch with more than 50 items). | +| `429 Too Many Requests` | Rate limit exceeded. | +| `500` | Server error — please include the request id in any bug report. | + +--- + +## Testing — curl one-liners + +```bash +# Latest 20 vulnerabilities +curl 'https://patchstack.com/database/api/v2/latest' \ + -H 'PSKey: ' + +# Full advisory list for a plugin version +curl 'https://patchstack.com/database/api/v2/product/plugin/tutor/1.5.2' \ + -H 'PSKey: ' + +# Boolean-only exists check +curl 'https://patchstack.com/database/api/v2/product/plugin/tutor/1.5.2/exists' \ + -H 'PSKey: ' + +# Batch — boolean-only across two products +curl -X POST 'https://patchstack.com/database/api/v2/batch' \ + -H 'PSKey: ' \ + -H 'Content-Type: application/json' \ + -d '[ + {"name":"easy-digital-downloads1","version":"1.0.0","type":"plugin","exists":true}, + {"name":"wordpress","version":"3.0.0","type":"wordpress","exists":true} + ]' + +# Advisory detail by id +curl 'https://patchstack.com/database/api/v2/vulnerability/4760' \ + -H 'PSKey: ' ``` -**Example response 3** - -```json -{ - "vulnerability": { - "title": "WordPress Redux Framework <= 4.1.23 - Cross-Site Request Forgery (CSRF) Nonce Validation Bypass vulnerability", - "description": "Cross-Site Request Forgery (CSRF) Nonce Validation Bypass vulnerability found by ErwanLR in WordPress Redux Framework (versions 4.1.22 - 4.1.23).", - "disclosure_date": "2020-12-15 00:00:00", - "disclosed_at": "2020-12-15T00:00:00+00:00", - "created_at": "2020-12-15T18:36:01+00:00", - "is_exploited": false, - "url": "wordpress-redux-framework-4-1-23-cross-site-request-forgery-csrf-nonce-validation-bypass-vulnerability", - "direct_url": "https://patchstack.com/database/vulnerability/redux-framework/wordpress-redux-framework-4-1-23-cross-site-request-forgery-csrf-nonce-validation-bypass-vulnerability" - }, - "product": { - "name": "Redux Framework", - "slug": "redux-framework", - "type": "Plugin" - }, - "type": "SQL Injection", - "cvss": null, - "owasp": "A1: Injection", - "references_url": [ - { - "url": "https://plugins.trac.wordpress.org/changeset/2437953/redux-framework/trunk/redux-core/inc/classes/class-redux-ajax-save.php?old=2405408", - "title": "Vulnerability details" - }, - { - "url": "https://github.com/reduxframework/redux-framework-4/blob/master/CHANGELOG.md", - "title": "Plugin changelog" - } - ], - "cve": [], - "versions": { - "affected_in": "<= 4.1.23", - "fixed_in": "4.1.24" - }, - "versions_list": "4.1.23, 4.1.22", - "credit": { - "name": "ErwanLR", - "url": "https://profiles.wordpress.org/erwanlr/" - }, - "submitter": null +## Batch walk (PHP) + +```php + 'easy-digital-downloads1', 'version' => '1.0.0', 'type' => 'plugin', 'exists' => false], + ['name' => 'wordpress', 'version' => '3.0.0', 'type' => 'wordpress', 'exists' => true], +]; + +$ch = curl_init('https://patchstack.com/database/api/v2/batch'); +curl_setopt_array($ch, [ + CURLOPT_RETURNTRANSFER => true, + CURLOPT_POST => true, + CURLOPT_HTTPHEADER => ['PSKey: '.$apiKey, 'Content-Type: application/json'], + CURLOPT_POSTFIELDS => json_encode($components), +]); +$response = json_decode(curl_exec($ch), true); +curl_close($ch); + +foreach ($response['vulnerabilities'] as $slug => $result) { + if (is_bool($result)) { + echo "{$slug}: ".($result ? 'vulnerable' : 'clear').PHP_EOL; + } else { + echo "{$slug}: ".count($result)." advisor".(count($result) === 1 ? 'y' : 'ies').PHP_EOL; + } } ``` -## More information about the Threat Intelligence API +## More information -You can find more information about Threat Intelligence API here: -https://patchstack.com/for-hosts/ +You can find more information about the Patchstack Threat Intelligence API on . If you have integration questions, email . diff --git a/src/content/docs/API solutions/Threat Intelligence API/npm-features.md b/src/content/docs/API solutions/Threat Intelligence API/npm-features.md new file mode 100644 index 00000000..6153a714 --- /dev/null +++ b/src/content/docs/API solutions/Threat Intelligence API/npm-features.md @@ -0,0 +1,202 @@ +--- +title: "NPM features" +excerpt: "npm-ecosystem coverage and the supporting additions on top of the Threat Intelligence API — the /all endpoint, cursor pagination, ?include=details, and the nested response shape." +hidden: false +metadata: + image: [] + robots: "index" +createdAt: "Tue Apr 21 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Mon Aug 24 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +sidebar: + order: 1 + label: "Overview" +--- + +_The npm features extend the Threat Intelligence API with npm-ecosystem coverage. They run at a separate base URL, ship their own OpenAPI spec, and are available to **selected partners working directly with Patchstack**. The shared endpoints (`/latest`, `/product/{type}/{name}/{version}`, `/product/{type}/{name}/{version}/exists`, `/batch`) behave the same as the stable API but accept extra parameters and return a nested response shape. This page documents only what's new — for the full spec including npm-flavour examples, see the [auto-generated reference](/api-reference/threat-intelligence-npm/). [Contact us](https://patchstack.com/for-hosts/) if you'd like access._ + +:::note +This partner API is not the only way to get npm vulnerability coverage. Developers can monitor their own JS/Node projects directly with [`@patchstack/connect`](/getting-started/installing-patchstack/installing-on-javascript-node-projects/), Patchstack's official self-install npm connector — no partner agreement needed. +::: + +## Base URL + +``` +https://vdp-api.patchstack.com/database/api/npm/ +``` + +:::note +The previous base URL `https://vdp-api.patchstack.com/database/api/beta/` remains supported as a permanent legacy alias and returns identical responses, so existing integrations don't need to change immediately. +::: + +## What's new + +| Addition | Where it applies | +|---|---| +| [`GET /all`](/api-reference/threat-intelligence-npm/operations/listallvulnerabilities/) | New endpoint — cursor-paginated full listing of every advisory, scoped by `?platform=`. | +| `?platform=npm` | List endpoints (`/all`, `/latest`, `/product/...`). Default is `wordpress`; case-insensitive. | +| `?cursor=` | `/all` and `/latest` — cursor pagination alongside the existing `?page=&per_page=`. | +| `?updated_since=` | `/all` in cursor mode — only entries changed since a unix time. See [Incremental sync](#incremental-sync). | +| `product.type` | Every record. The product kind in lower case: `plugin`, `theme`, `wordpress` (core) or `npm`. | +| `?include=details` | List endpoints — adds an `advisory_details` markdown field to each item (npm). | +| Nested response shape | All list endpoints — `product`, `cvss`, `cwe`, `version_info` objects in place of the v2 flat shape. | + +The full npm-features schema (every endpoint, parameter, response example) lives in the [auto-generated reference](/api-reference/threat-intelligence-npm/). + +## Pagination + +`/all` and `/latest` support **two independent strategies**. Use whichever fits your client: + +- **Offset (`?page=&per_page=`)** — returns a `pagination` block with totals, `has_next_page`, `has_previous_page`, etc. Easy to jump to a specific page; slower at depth and susceptible to row-shift when new advisories land while you're paging. +- **Cursor (`?cursor=`)** — returns a `cursor` block with `next_cursor`, `has_more`, `per_page`. Stable under concurrent inserts and faster at any depth. No `total` count (deliberately skipped to keep cursor mode fast). + +`cursor` and `page` are mutually exclusive; passing both returns `422 Unprocessable Entity`. To bootstrap cursor mode, send `?cursor=` with an empty value. + +When a cursor is malformed (invalid base64 or missing the `v1:` prefix), the endpoint returns `200` with an empty page: + +```json +{ + "vulnerabilities": [], + "cursor": { "next_cursor": null, "has_more": false, "per_page": 100 } +} +``` + +## Incremental sync + +Mirroring the whole feed on every run is slow. After the first full listing, ask only for what changed: + +1. Every `/all` response has a `watermark`: the unix time its rows were read. Keep the oldest one from your last sync. +2. Next time, walk `/all?cursor=&updated_since=`. You get the entries changed since then (new ones, and edits such as a new fixed version), and on the first page `removed_ids`: entries withdrawn since then. Replace changed entries by `id` and drop the removed ones. +3. Store the new `watermark` for the run after that. + +Starting a minute before the watermark is safe: entries are re-sent, never lost. An entry deleted outright doesn't show up in `removed_ids`, so run a full listing now and then (daily is plenty). `updated_since` needs cursor mode; with `page` it returns `422 Unprocessable Entity`. + +```bash +curl 'https://vdp-api.patchstack.com/database/api/npm/all?platform=wordpress&per_page=500&cursor=&updated_since=1793018157' \ + -H 'PSKey: YOUR_KEY' +``` + +```json +{ + "vulnerabilities": [ { "id": 46510, "product": { "id": 37, "name": "…", "slug": "…", "type": "plugin" }, "…": "…" } ], + "cursor": { "next_cursor": null, "has_more": false, "per_page": 500 }, + "watermark": 1793018399, + "removed_ids": [46412] +} +``` + +## Scoped npm packages + +npm package slugs that include a `/` (e.g. `@scope/pkg`) conflict with the route separator. URL-encode the `/` as `%2F` or contact us for guidance on the encoding helper. + +## Errors + +In addition to the [stable error codes](/api-solutions/threat-intelligence-api/extended/#errors), the npm endpoints return: + +| Status | Meaning | +|---|---| +| `422 Unprocessable Entity` | Invalid parameter combination (e.g. `cursor` + `page`, or `updated_since` without `cursor`), invalid `platform`, or `per_page > 500`. | + +## Migration notes (stable v2 → npm endpoints) + +- npm responses use **nested objects** (`product`, `cvss`, `cwe`, `capec`, `version_info`) whereas the v2 shape is flat. Update parsers accordingly. +- `ghsa_id` was renamed to `ghsa` at the top level. +- `direct_url` was renamed to `url` (the npm-flavoured shape exposes a single URL only). +- The `description` field was dropped for npm (the title already includes it). +- The response body always contains a `vulnerabilities` array, plus either `pagination` (offset mode) or `cursor` (cursor mode). + +## Multi-span advisories and the fix to show + +Many npm advisories affect several majors at once. Product lookups (`GET /product/...` and `/batch`) now match the installed version against **every** affected span, not only the lowest one. + +When a version matches, the advisory includes a `matched_range` object beside the existing top-level `fixed_in`: + +| Field | Meaning | +|---|---| +| `matched_range.from_version` | Lower bound of the span that matched the installed version (nullable). | +| `matched_range.to_version` | Upper bound of that span (nullable). | +| `matched_range.to_bound` | How to read `to_version`: `exclusive`, `inclusive`, `last-affected`, or `null` when unrecorded. | +| `matched_range.fixed_in` | The fix for **this** span. Use this when telling a user what to upgrade to. `null` means that span was never fixed. | + +Top-level `fixed_in` / `version_info.fixed` remain the **highest** fix across every span, for backwards compatibility. Prefer `matched_range.fixed_in` for user-facing upgrade advice so a site on `next@13` is not told to jump to a later major. + +--- + +## Testing + +### curl — one-liners + +```bash +# Latest 24h, npm +curl 'https://vdp-api.patchstack.com/database/api/npm/latest?platform=npm&per_page=10' \ + -H 'PSKey: ' + +# Cursor pagination walk (bootstrap + follow) +curl 'https://vdp-api.patchstack.com/database/api/npm/all?platform=npm&per_page=50&cursor=' \ + -H 'PSKey: ' + +# Check a specific npm package/version with full advisory text +curl 'https://vdp-api.patchstack.com/database/api/npm/product/npm/axios/0.21.4?include=details' \ + -H 'PSKey: ' + +# Boolean-only exists check +curl 'https://vdp-api.patchstack.com/database/api/npm/product/npm/axios/0.21.4/exists' \ + -H 'PSKey: ' +``` + +### Cursor iteration (JavaScript / Node) + +```javascript +async function* allVulnerabilities(apiKey, platform = 'npm', perPage = 100) { + const base = 'https://vdp-api.patchstack.com/database/api/npm/all'; + let cursor = ''; // empty = bootstrap cursor mode + + while (true) { + const url = `${base}?platform=${platform}&per_page=${perPage}&cursor=${encodeURIComponent(cursor)}`; + const res = await fetch(url, { headers: { PSKey: apiKey } }).then(r => r.json()); + + for (const vuln of res.vulnerabilities) { + yield vuln; + } + + if (!res.cursor.has_more) return; + cursor = res.cursor.next_cursor; + } +} + +// usage +for await (const vuln of allVulnerabilities(process.env.PATCHSTACK_KEY)) { + console.log(vuln.id, vuln.title); +} +``` + +### Cursor iteration (PHP) + +```php + true, + CURLOPT_HTTPHEADER => ['PSKey: '.$apiKey, 'Accept: application/json'], + ]); + $response = json_decode(curl_exec($ch), true); + curl_close($ch); + + foreach ($response['vulnerabilities'] as $vuln) { + // handle $vuln + } + + $cursor = $response['cursor']['next_cursor'] ?? null; +} while ($response['cursor']['has_more'] ?? false); +``` + +## More information + +You can find more information about the Patchstack Threat Intelligence API on . If you have integration questions, email . diff --git a/src/content/docs/API solutions/Threat Intelligence API/overview.md b/src/content/docs/API solutions/Threat Intelligence API/overview.md index 3cc7628a..85219a39 100644 --- a/src/content/docs/API solutions/Threat Intelligence API/overview.md +++ b/src/content/docs/API solutions/Threat Intelligence API/overview.md @@ -1,23 +1,80 @@ ---- -title: "Overview" -excerpt: "" -metadata: - image: [] - robots: "index" -createdAt: "Thu Jun 01 2023 12:04:17 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Mon Jul 31 2023 12:13:26 GMT+0000 (Coordinated Universal Time)" -sidebar: - order: 1 - label: "Overview" - hidden: false ---- - -### Standard Threat Intelligence API -Fetch the latest vulnerability information for a single version of a particular plugin, theme or WordPress core. API is limited for 5000 calls / 24 hours. Price for that API is $249 / month. Access to this API can be purchased through the [Patchstack App](https://app.patchsatck.com/billing/subscription). - -[Standard Threat Intelligence API Documentation](/api-solutions/threat-intelligence-api/standard/) - -### Extended Threat Intelligence API -Access everything included in the Standard tier, bulk-request data for multiple plugins with one API call, and have additional endpoints with more information about vulnerabilities. Extended tier has custom pricing and is activated on request only. For access to these API endpoints, please [contact us here](https://patchstack.com/for-hosts/). - -[Extended Threat Intelligence API Documentation](/api-solutions/threat-intelligence-api/extended/) \ No newline at end of file +--- +title: "Overview" +excerpt: "" +metadata: + image: [] + robots: "index" +createdAt: "Thu Jun 01 2023 12:04:17 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Mon Jul 31 2023 12:13:26 GMT+0000 (Coordinated Universal Time)" +sidebar: + order: 1 + label: "Overview" + hidden: false +--- + +The Patchstack Threat Intelligence API exposes our vulnerability database for WordPress plugins, themes and core. It supports single-product lookups, bulk lookups (`POST /batch`, up to 50 products per request), the `/latest` rolling feed, advisory-by-id detail, and a per-item payload that includes `cvss_score`, `cve`, `is_exploited`, `patch_priority`, and `patched_in_ranges`. + +Custom pricing, activated on request — [contact us](https://patchstack.com/for-hosts/). + +- [Guide](/api-solutions/threat-intelligence-api/extended/) · [Reference](/api-reference/threat-intelligence-extended/) · [OpenAPI](/schemas/threat-intel-extended.yaml) · [Postman](/schemas/threat-intel-extended.postman_collection.json) · [API properties](/api-solutions/threat-intelligence-api/api-properties/) + +## NPM features + +For partners covering JavaScript components, the npm features add **npm-ecosystem coverage** alongside WordPress, available to **selected partners working directly with Patchstack**. Beyond npm itself they ship the supporting additions that make npm coverage workable at scale: the new `GET /all` endpoint, cursor pagination, `?include=details` for full advisory bodies, and a nested response shape the stable API will eventually adopt. Everything else (`/latest`, `/product/{type}/{name}/{version}`, `/batch`) is the same surface as the stable API. + +See the [NPM features](/api-solutions/threat-intelligence-api/npm-features/) page for the full delta — base URL, parameters, pagination, errors, and migration notes — and the [auto-generated reference](/api-reference/threat-intelligence-npm/) for the full schema. [Contact us](https://patchstack.com/for-hosts/) for access. + +--- + +The legacy [Standard tier](/api-solutions/threat-intelligence-api/standard/) is no longer offered to new customers but remains documented for existing integrations — its endpoints are a strict subset of the current API. + +--- + +## Using the API with your tools + +The API ships with an OpenAPI spec and a generated Postman collection. The npm features have their own spec — pick whichever you're integrating against: + +| | OpenAPI spec | Postman collection | +|---|---|---| +| Threat Intelligence API | [`threat-intel-extended.yaml`](/schemas/threat-intel-extended.yaml) | [`threat-intel-extended.postman_collection.json`](/schemas/threat-intel-extended.postman_collection.json) | +| NPM features | [`threat-intel-npm.yaml`](/schemas/threat-intel-npm.yaml) | [`threat-intel-npm.postman_collection.json`](/schemas/threat-intel-npm.postman_collection.json) | +| Standard *(legacy)* | [`threat-intel-standard.yaml`](/schemas/threat-intel-standard.yaml) | [`threat-intel-standard.postman_collection.json`](/schemas/threat-intel-standard.postman_collection.json) | + +### Postman, Insomnia, Bruno or Hoppscotch + +Every endpoint, parameter, request body and example is preconfigured. Download the Postman collection and drag it into your tool, or import by URL from inside the tool: + +| Tool | How to import | +|---|---| +| **Postman** | `File → Import → Link` and paste the collection URL. | +| **Insomnia** | `Create → Import From → URL` → paste the OpenAPI URL. | +| **Bruno** | `Collection → Import → OpenAPI V3 Spec` → paste the OpenAPI URL. | +| **Hoppscotch** | `Collections → Import/Export → OpenAPI` → paste the OpenAPI URL. | + +**Authentication:** in Postman set the collection `Authorization` to **API Key**, key `PSKey`, value `{{PSKEY}}`, and add `PSKEY` as a collection variable with your real key as the **Current value** (leave Initial blank so it doesn't sync to teammates). Other tools work the same way — set `PSKey` as a collection header once. + +### Claude Code and other LLM coding assistants + +Point your assistant at the spec. LLMs parse OpenAPI cleanly and will generate clients that match the real field names instead of hallucinating. + +- **Ad hoc:** paste the spec URL into your prompt. Example: *"Write a Python client for `https://docs.patchstack.com/schemas/threat-intel-extended.yaml`. I need a batch walker over a `package.json`-style list."* +- **In your repo:** download the spec to `docs/vendor/patchstack-threat-intel.yaml` and reference it from your `CLAUDE.md` / `AGENTS.md`. Your assistant can then grep the YAML for specific fields without refetching. +- **Plain-text fallback:** for tools that don't parse YAML, our [`llms-full.txt`](/llms-full.txt) contains the full reference as flat markdown. + +### SDK generation + +Generate a client in any language from the spec: + +```bash +# TypeScript +npx @openapitools/openapi-generator-cli generate \ + -i https://docs.patchstack.com/schemas/threat-intel-extended.yaml \ + -g typescript-fetch -o ./patchstack-client + +# Python +npx @openapitools/openapi-generator-cli generate \ + -i https://docs.patchstack.com/schemas/threat-intel-extended.yaml \ + -g python -o ./patchstack-client-py +``` + +Speakeasy and Fern also consume the same spec and produce more idiomatic SDKs if you need a polished client library. diff --git a/src/content/docs/API solutions/Threat Intelligence API/standard.md b/src/content/docs/API solutions/Threat Intelligence API/standard.md index 42acb36e..5d855bd5 100644 --- a/src/content/docs/API solutions/Threat Intelligence API/standard.md +++ b/src/content/docs/API solutions/Threat Intelligence API/standard.md @@ -1,77 +1,76 @@ --- title: "Standard tier API" -excerpt: "" -metadata: +excerpt: "Entry-level WordPress vulnerability lookup — single product + version, 5,000 requests per day." +metadata: image: [] robots: "index" createdAt: "Mon Jul 25 2022 09:28:24 GMT+0000 (Coordinated Universal Time)" updatedAt: "Wed May 10 2023 12:26:10 GMT+0000 (Coordinated Universal Time)" sidebar: order: 1 + label: "Guide" --- -_If you’re looking for an API that has a complete data coverage and could be used commercially, please look at the Extended Threat Intelligence API here._ - -## API Usage - -The Standard Threat Intelligence API is limited to 5000 requests per 24 hours. - -The base URL of the API is - -All responses are in JSON format. For performance reasons, responses are cached until we update the database after which the appropriate caches are cleared. - -An API key is required. This API key should be present in the _PSKey_ HTTP request header. You can request an API key by logging into your Patchstack App account and then by going to the Upgrades page . - -Explanation of the API response properties can be found here [here](/api-solutions/threat-intelligence-api/api-properties/). - -## Find Vulnerability - -**Description:** Retrieve vulnerabilities of a specific plugin, theme or WordPress core version. -**Endpoint:** /product/TYPE/NAME/VERSION/EXISTS? -**Method:** GET - -**TYPE** = theme, plugin, wordpress -**NAME** = Slug of the theme, slug of the plugin, or “wordpress” in case TYPE is set to wordpress -**VERSION** = Version to check for vulnerabilities -**EXISTS** = Optional flag that will not return all vulnerabilities but only a boolean response whether or not there are vulnerabilities. This flag being present results in a faster response. - -Example response (): - -```json -{ - "vulnerabilities": [ - { - "id": 4253, - "title": "WordPress Tutor LMS plugin <= 1.5.2 - Cross-Site Request Forgery (CSRF) vulnerability", - "disclosed_at": "2020-02-04T00:00:00+00:00", - "created_at": "2022-05-27T10:23:01+00:00", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "fixed_in": "1.5.3", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-5-2-cross-site-request-forgery-csrf-vulnerability" - }, - { - "id": 4386, - "title": "WordPress Tutor LMS plugin <= 1.7.6 - Multiple Blind/Time-based SQL Injection (SQLi) vulnerabilities", - "disclosed_at": "2021-03-15T00:00:00+00:00", - "created_at": "2022-05-27T10:23:01+00:00", - "product_slug": "tutor", - "product_name": "Tutor LMS", - "product_name_premium": null, - "product_type": "Plugin", - "fixed_in": "1.7.7", - "direct_url": "https://patchstack.com/database/vulnerability/tutor/wordpress-tutor-lms-plugin-1-7-6-multiple-blind-time-based-sql-injection-sqli-vulnerabilities" - } - ] -} +_The Standard Threat Intelligence API is **no longer offered to new customers**. New integrations should use the [Threat Intelligence API](/api-solutions/threat-intelligence-api/extended/), which is a strict superset — every endpoint and field documented here is available there. This page is preserved for existing Standard integrations._ + +> **Interactive reference:** Every endpoint, parameter and response shape is documented in the [Threat Intelligence API (Standard) reference](/api-reference/threat-intelligence-standard/). +> +> **Tooling (Postman, SDK, LLM):** spec URLs and import instructions for all three tiers live on [Overview → Using the APIs with your tools](/api-solutions/threat-intelligence-api/overview/#using-the-apis-with-your-tools). + +This page covers the concepts you need to use the API effectively — authentication, rate limiting, errors, and code samples. Use it alongside the interactive reference. + +## Base URL + +``` +https://patchstack.com/database/api/v2/ ``` -Example response (): +## Authentication + +Every request must include your API key in the **`PSKey`** HTTP request header. Standard keys remain valid for existing customers. New keys are not issued — [contact us](https://patchstack.com/for-hosts/) about Extended. -```json -{ - "vulnerable": true -} ``` +PSKey: +``` + +## Response format + +All responses are JSON. Responses are cached until the Patchstack database updates, at which point the cache is cleared. + +The Standard tier returns a **flat** per-item shape. For the richer shape with `description`, `vuln_type`, `cvss_score`, `cve`, and `patched_in_ranges`, use the [Extended tier](/api-solutions/threat-intelligence-api/extended/). Field definitions live in [API properties](/api-solutions/threat-intelligence-api/api-properties/). + +## Rate limiting + +Standard is limited to **5,000 requests per 24 hours**. Contact to move to Extended for a higher quota and additional endpoints. + +## Errors + +| Status | Meaning | +|---|---| +| `401 Unauthorized` | Missing or invalid `PSKey` header. | +| `403 Forbidden` | API key not authorised for the requested endpoint. | +| `404 Not Found` | Unknown product/version combination. | +| `429 Too Many Requests` | Rate limit exceeded. | +| `500` | Server error — please include the request id in any bug report. | + +--- + +## Testing — curl one-liners + +```bash +# Full advisory list for a plugin version +curl 'https://patchstack.com/database/api/v2/product/plugin/tutor/1.5.2' \ + -H 'PSKey: ' + +# Boolean-only exists check (faster) +curl 'https://patchstack.com/database/api/v2/product/plugin/tutor/1.5.2/exists' \ + -H 'PSKey: ' + +# WordPress core +curl 'https://patchstack.com/database/api/v2/product/wordpress/wordpress/5.8.2' \ + -H 'PSKey: ' +``` + +## More information + +You can find more information about the Patchstack Threat Intelligence API on . If you have integration questions, email . diff --git a/src/content/docs/API solutions/index.mdx b/src/content/docs/API solutions/index.mdx index 5813b82f..f5b0faf7 100644 --- a/src/content/docs/API solutions/index.mdx +++ b/src/content/docs/API solutions/index.mdx @@ -25,28 +25,11 @@ This API has unlimited requests and can be used by all Developer plan users for -## Threat Intelligence API -Query our vulnerability database and retrieve information about all published vulnerabilities. Threat Intelligence API is available in two tiers: - -### Standard tier -Fetch the latest vulnerability information for a single version of a particular plugin, theme or WordPress core. API is limited for 5000 calls / 24 hours. Price for that API is $249 / month. - - - - Read more here - - - -### Extended tier -Access everything included in the Standard tier, bulk-request data for multiple plugins with one API call, and have additional endpoints with more information about vulnerabilities. Extended tier has custom pricing and is activated on request only. +## Threat Intelligence API +Query our vulnerability database and retrieve information about all published vulnerabilities. The Extended tier covers single-product lookups, bulk-request endpoints for multiple components in one call, the `/latest` rolling feed, and advisory-by-id detail. Custom pricing, activated on request. DEFINITIONS +Your data, and how we handle it, should never be a mystery. Everything you need for a GDPR review lives on patchstack.com, where we keep it current, so the documents below are the single source of truth. -Site – website available at patchstack.com -Services – the services available from and related to the domain and subdomains of the Site -Patchstack (also referred to as “we”, “our” or “us”) – Patchstack OÜ, a company incorporated and registered under the laws of the Republic of Estonia with registration code 14331217 -User (also referred to as “you” or “your”) – an individual who creates a user account -General Terms – terms and conditions of services. +## Data Processing Addendum (DPA) -We provide services for B2B clients and therefore, privacy regulations (GDPR - General Data Protection Regulation) do not apply for such data, however, we might provide services also for individuals and therefore, we are informing you about personal data processes herein. +Need a DPA on file? Download our pre-signed Data Processing Addendum, countersign it, and email it to privacy@patchstack.com. -Our Privacy Notice describes how we collect, use, process, and disclose your information related to your access to using the Patchstack services. +[Read and download the DPA](https://patchstack.com/dpa/) -Our Services include a website security firewall to prevent cyber attacks and to protect your websites. Using Patchstack or any other Services, we do not collect any personal data about users of your website or website owners. In the event, we detect website hacking incidents we are not allocating any personal data because hackers are hiding identity and do not reveal identifiable IP addresses, names, e-mail addresses, or any personal data. Therefore, we are in a position where we are not processing any personal data of the hackers as well. +## Privacy Policy -Therefore as we are not collecting personal data, there is no need to sign a data processing agreement between you and Patchstack. +Our Privacy Policy explains what personal data we collect, why we collect it, how long we keep it, and the rights you have over it. + +[Read the Privacy Policy](https://patchstack.com/privacy-policy/) + +## Terms and Conditions + +The Terms and Conditions cover the rules of using Patchstack's services, for you and for us. + +[Read the Terms and Conditions](https://patchstack.com/terms-and-conditions/) + +Still have a question about privacy or compliance? Write to us at privacy@patchstack.com and we'll help. diff --git a/src/content/docs/FAQ Troubleshooting/Pricing Plans/does-patchstack-have-a-free-version.md b/src/content/docs/FAQ Troubleshooting/Pricing Plans/does-patchstack-have-a-free-version.md index c041065a..0d2d1f3e 100644 --- a/src/content/docs/FAQ Troubleshooting/Pricing Plans/does-patchstack-have-a-free-version.md +++ b/src/content/docs/FAQ Troubleshooting/Pricing Plans/does-patchstack-have-a-free-version.md @@ -7,7 +7,7 @@ metadata: image: [] robots: "index" createdAt: "Wed Jul 27 2022 12:18:00 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Wed Jun 28 2023 12:35:06 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Oct 13 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" sidebar: order: 3.1 --- @@ -25,19 +25,20 @@ Patchstack has a free version available. Free version of Patchstack detects vuln **What does Patchstack Personal (Free) version include?** **Detect security issues before hackers take over your website:** -
  • Detect the latest security vulnerabilities in your WordPress, Drupal or Joomla sites.
  • +
    • Detect the latest security vulnerabilities in your WordPress or Drupal sites.
    • Receive real-time alerts to email if any security vulnerabilities are found.
    • -
    • Have a central security dashboard for up to 3 websites (via the Patchstack App).
    +
  • Have a central security dashboard for up to 3 websites (via the Patchstack App).
  • +
  • Update WordPress plugins, themes and core remotely from your site's Packages tab.
  • +
  • Generate Snapshot reports: a PDF of a site's current security status.
+ +Patchstack no longer updates software automatically. You choose when to update, and protection (below) blocks attacks on known vulnerabilities in the meantime — see [Automatic updates](/patchstack-app/site-dashboard/site-software/#automatic-updates). **What's the difference between a free version and paid version?** -The free version of Patchstack only detects and notifies you about the vulnerabilities in the software versions your sites use. The paid version of Patchstack will also protect against malicious traffic and attacks exploiting known serious vulnerabilities on your site. The pricing for Patchstack protection starts from $5 / month per site. +The free version of Patchstack detects and notifies you about the vulnerabilities in the software versions your sites use, and lets you update that software yourself. The paid version of Patchstack will also protect against malicious traffic and attacks exploiting known serious vulnerabilities on your site. The pricing for Patchstack protection starts from $5 / month per site. ### For WordPress To use a free version of Patchstack with WordPress, install the Patchstack plugin on your site first, and start the user registration flow from the plugin itself, after activating it on your WordPress. -### For Joomla -To use a free version of Patchstack with Joomla, you'll need to sign up for the Developer plan trial first. After that, you can downgrade your subscription from Developer plan to Personal plan (Free). Add your site to Patchstack App, and go through this tutorial to install the Patchstack connector to your Joomla site. - ### For Drupal To use a free version of Patchstack with Drupal, you'll need to sign up for the Developer plan trial first. After that, you can downgrade your subscription from Developer plan to Personal plan (Free). Add your site to Patchstack App, and go through this tutorial to install the Patchstack connector to your Drupal site. diff --git a/src/content/docs/FAQ Troubleshooting/Technical/can-i-use-the-same-plugin-api-key-for-staging-environment.md b/src/content/docs/FAQ Troubleshooting/Technical/can-i-use-the-same-plugin-api-key-for-staging-environment.md index a9d77376..0a641696 100644 --- a/src/content/docs/FAQ Troubleshooting/Technical/can-i-use-the-same-plugin-api-key-for-staging-environment.md +++ b/src/content/docs/FAQ Troubleshooting/Technical/can-i-use-the-same-plugin-api-key-for-staging-environment.md @@ -34,7 +34,17 @@ Patchstack allows you to use the same plugin API key for the staging environment 'wpengine.com', 'wp-dv', 'optiserver.co.uk', -'azurewebsites.net' +'azurewebsites.net', +'artdev.space', +'artevio.dev', +'artevio.art', +'copilhost.cloud', +'.myftpupload.com', +'.mwp.accessdomain.com', +'store.godaddy.com', +'stuurlui.dev', +'flyinghost.app', +'.wpenginepowered.com' ``` ### How the staging and production site work with Patchstack? @@ -42,7 +52,7 @@ Patchstack will work normally with your live site, if you share the same API key Some things to keep in mind: - Your production (live) site receives all the real-time protection rules - All custom hardening rules set in Patchstack App are also synced normally -- All the features that Patchstack offers, will work on your live site (like auto-updates, custom rules, etc) +- All the features that Patchstack offers, will work on your live site (like custom rules, etc) - On the staging site however, only the API key license check will work. Other features and firewall rules are not synced to the staging site - We recommend turning on the server level protection for your staging site (e.g. htaccess and htpasswd) diff --git a/src/content/docs/FAQ Troubleshooting/Technical/does-patchstack-work-with-other-captcha-plugins.md b/src/content/docs/FAQ Troubleshooting/Technical/does-patchstack-work-with-other-captcha-plugins.md index 3586c085..23f483df 100644 --- a/src/content/docs/FAQ Troubleshooting/Technical/does-patchstack-work-with-other-captcha-plugins.md +++ b/src/content/docs/FAQ Troubleshooting/Technical/does-patchstack-work-with-other-captcha-plugins.md @@ -15,6 +15,6 @@ Patchstack plugin can add either Google ReCAPTCHA or Cloudflare Turnstile to you Patchstack, by default, has the captcha features turned off. You can pick to which pages you would like to add the capcha -- login, register, forgot password, and comments. -Note that Patchstack's captcha only works with WordPress's built-in forms and not for other plugins forms (like e-commerce registration forms). +Note that Patchstack's captcha works with WordPress's built-in forms and WooCommerce forms, but not with other plugins' forms. If you turn this feature on and have a different plugin installed that has the same kind of functionality, you may get locked out of your WordPress site. In this scenario, you'd have to delete either plugin to regain access to your site. diff --git a/src/content/docs/FAQ Troubleshooting/Technical/how-to-add-security-headers-with-patchstack.md b/src/content/docs/FAQ Troubleshooting/Technical/how-to-add-security-headers-with-patchstack.md index 4be61ffe..85d06d60 100644 --- a/src/content/docs/FAQ Troubleshooting/Technical/how-to-add-security-headers-with-patchstack.md +++ b/src/content/docs/FAQ Troubleshooting/Technical/how-to-add-security-headers-with-patchstack.md @@ -13,6 +13,8 @@ sidebar: --- If you have the Patchstack plugin installed, we will automatically try to inject the security headers into the response. +Because these headers can be injected into the HTTP response at runtime, they may not appear in your `.htaccess` file even when they are active. To confirm which headers are being sent, check the live response (for example with [securityheaders.com](https://securityheaders.com/)) instead of reading `.htaccess`. Avoid adding the same headers both automatically and manually, or you may end up with duplicate headers. For how these settings relate to each other, see [How hardening and security headers work](/patchstack-app/site-dashboard/hardening/hardening-and-security-headers-explained/). + If this does not work, perhaps due to an aggressive caching plugin or caching/proxy server, you may have to manually add the .htaccess rules below to your .htaccess file. ## Adding the security headers automatically diff --git a/src/content/docs/FAQ Troubleshooting/Technical/list-of-ip-addresses-that-patchstack-uses.mdx b/src/content/docs/FAQ Troubleshooting/Technical/list-of-ip-addresses-that-patchstack-uses.mdx index 7dfbd0cb..4f10823e 100644 --- a/src/content/docs/FAQ Troubleshooting/Technical/list-of-ip-addresses-that-patchstack-uses.mdx +++ b/src/content/docs/FAQ Troubleshooting/Technical/list-of-ip-addresses-that-patchstack-uses.mdx @@ -10,9 +10,11 @@ updatedAt: "Tue May 16 2023 14:17:00 GMT+0000 (Coordinated Universal Time)" sidebar: order: 7.3 --- -import Ips from '../../../../components/Ips.astro'; +Sometimes you need to whitelist our IP addresses in order to avoid your hosting provider or (secondary) firewall blocking our services. -Sometimes you need to whitelist these IP addresses in order to avoid your hosting provider or (secondary) firewall blocking our services. +You can use these two API endpoints to get the list of IP addresses that Patchstack uses: + +- [patchstack.com/ips-v4/](https://patchstack.com/ips-v4/) +- [patchstack.com/ips-v6/](https://patchstack.com/ips-v6/) Note that we may add and remove IP addresses at any time without notice. - diff --git a/src/content/docs/FAQ Troubleshooting/Technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-127001-or-other-security-checks.md b/src/content/docs/FAQ Troubleshooting/Technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-27001-or-other-security-checks.md similarity index 93% rename from src/content/docs/FAQ Troubleshooting/Technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-127001-or-other-security-checks.md rename to src/content/docs/FAQ Troubleshooting/Technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-27001-or-other-security-checks.md index 4052f621..ade320b1 100644 --- a/src/content/docs/FAQ Troubleshooting/Technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-127001-or-other-security-checks.md +++ b/src/content/docs/FAQ Troubleshooting/Technical/will-patchstack-plugin-help-my-site-pass-pci-dss-soc2-iso-27001-or-other-security-checks.md @@ -1,5 +1,5 @@ --- -title: "Will Patchstack plugin help my site pass PCI-DSS, SOC2, ISO 127001 or other security checks?" +title: "Will Patchstack plugin help my site pass PCI-DSS, SOC2, ISO 27001 or other security checks?" excerpt: "" hidden: false metadata: diff --git a/src/content/docs/Getting Started/Installing Patchstack/ai-assistant-blocked-a-command.mdx b/src/content/docs/Getting Started/Installing Patchstack/ai-assistant-blocked-a-command.mdx new file mode 100644 index 00000000..c5a5f10b --- /dev/null +++ b/src/content/docs/Getting Started/Installing Patchstack/ai-assistant-blocked-a-command.mdx @@ -0,0 +1,110 @@ +--- +title: "My AI assistant blocked a Connect command" +excerpt: "Claude Code or another coding assistant refused to run npm install or npx @patchstack/connect setup. Run the command yourself — in Claude Code, with the ! prefix — and let the assistant carry on." +hidden: false +createdAt: "Wed Sep 30 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Wed Sep 30 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +sidebar: + order: 7.5 + label: "AI assistant blocked a command" +--- + +import { Steps, Aside } from '@astrojs/starlight/components'; + +Coding assistants such as Claude Code check each shell command before running it, and some of those checks stop a command that downloads or runs a package from npm. Installing [`@patchstack/connect`](/getting-started/installing-patchstack/installing-on-javascript-node-projects/) involves both, so the install can stop part-way with a message like one of these: + +```text +Auto mode's safety check blocked the install and flagged it as bringing +untrusted code into the project. Nothing has changed. +``` + +```text +I installed @patchstack/connect as a dependency, but I haven't set it up. +My permission check blocked running the package's own setup command, because +that means running code downloaded from npm on your machine. +``` + +The commands that usually get stopped are the install itself (`npm install --save-dev @patchstack/connect`, or the `pnpm`, `yarn` or `bun` equivalent) and `npx @patchstack/connect setup`. + +**Running the command yourself is fine.** It is the same command the assistant was about to run, it changes only what [`setup` is documented to change](/getting-started/installing-patchstack/installing-on-javascript-node-projects/#install), and it sends Patchstack dependency names and versions only — see [Security and data handling](/getting-started/installing-patchstack/installing-on-javascript-node-projects/#security-and-data-handling). + + + +## In Claude Code: run it with `!` + +Type the command in the Claude Code prompt with `!` in front of it. Claude Code runs it in your session straight away, without the permission check, and the output lands in the conversation — so Claude sees the result and can finish the rest of the install. + + + +1. **Run whichever command was blocked.** If the install was blocked, install the package with the project's package manager: + + ```text + ! npm install --save-dev @patchstack/connect + ``` + + If the install went through and `setup` was blocked, run `setup`: + + ```text + ! npx @patchstack/connect setup + ``` + + If the message you pasted from the app carried a claim token (you ticked **Connect this website to my account automatically**), keep it on the command so the site is created attached to your account: + + ```text + ! npx @patchstack/connect setup --claim-token + ``` + +2. **Let Claude continue.** Once the command finishes, tell Claude to carry on — for example with the prompt below. It picks up from the output it can now see: finishing anything `setup` lists as missing, running the build, and handing you the dashboard link. + +3. **Check server-side protection, if your app has a server.** For an Express, Fastify, or other server app, confirm the protection is wired up: + + ```text + ! npx @patchstack/connect protect --check + ``` + + + +```text +I ran the blocked Patchstack command myself; the output is above. Please +continue the @patchstack/connect install from there: finish anything setup +lists as missing, run the complete production build, and give me the +Patchstack dashboard link. Tell me if any other command is blocked instead of +reporting the install as complete. +``` + +### Allow the Connect commands for this project + +If you would rather Claude Code ran the Connect commands itself — for example because you reinstall or rescan often — add an allow rule to `.claude/settings.json` in the project, then ask Claude to retry: + +```json +{ + "permissions": { + "allow": [ + "Bash(npx @patchstack/connect:*)" + ] + } +} +``` + +Add the rule yourself. Claude Code will usually decline to edit its own permissions to get past a check that has just stopped it. + +## In other assistants and site builders + +Codex, OpenCode, Gemini CLI, Cursor and the rest each have their own approval settings, but the fix is the same: run the blocked command yourself from the project folder, then tell the assistant it has been run. + + + +1. Open a terminal in the project folder — the one containing `package.json`. +2. Run the command the assistant was blocked on, using the project's package manager (check the lockfile: `package-lock.json` is npm, `pnpm-lock.yaml` is pnpm, `yarn.lock` is yarn, `bun.lock` or `bun.lockb` is bun). +3. Paste the command's output into the chat along with the prompt above, so the assistant continues from where the command left off instead of starting again. + + + +Site builders such as Lovable, GoDaddy Airo and Hostinger Horizons do not always give you a terminal. If yours has none and the assistant cannot run the install, ask it to name the exact step it cannot perform — the [builder context](/getting-started/installing-patchstack/troubleshooting-javascript-node-projects/#tell-your-builder-what-project-this-is) snippets help with that. + +## Still stuck? + +- `npx @patchstack/connect guide` prints a project-aware checklist of what is present and what is missing, so you can see how far the install got. +- [Troubleshooting JS / Node.js](/getting-started/installing-patchstack/troubleshooting-javascript-node-projects/) covers what can go wrong after the install: a widget that never appears, a stale published build, or an outdated Connect version. diff --git a/src/content/docs/Getting Started/Installing Patchstack/installing-on-javascript-node-projects.md b/src/content/docs/Getting Started/Installing Patchstack/installing-on-javascript-node-projects.md new file mode 100644 index 00000000..e73c44d1 --- /dev/null +++ b/src/content/docs/Getting Started/Installing Patchstack/installing-on-javascript-node-projects.md @@ -0,0 +1,130 @@ +--- +title: "Installing on JavaScript / Node.js projects" +excerpt: "Connect any JS/Node project to Patchstack vulnerability monitoring with the official @patchstack/connect npm package." +hidden: false +createdAt: "Tue Jul 14 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Wed Jul 15 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +sidebar: + order: 7.3 + label: "JavaScript / Node.js projects" +--- + +Patchstack monitors JavaScript and Node.js applications — not only WordPress sites — through [`@patchstack/connect`](https://www.npmjs.com/package/@patchstack/connect), the official Patchstack Connect package, maintained and published by Patchstack on npm under the `@patchstack` organization. + +- **npm:** https://www.npmjs.com/package/@patchstack/connect +- **Source (MIT-licensed):** https://github.com/patchstack/connect +- **Setup guide:** https://github.com/patchstack/connect/blob/main/GETTING-STARTED.md + +## What it does + +Connect reads the project's dependency lockfile (`package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock`; bun projects are detected via `node_modules/`) and reports package names and versions to Patchstack, which matches them against its vulnerability database and notifies you when a dependency needs patching. It works with any framework — Next.js, Vite, Nuxt, Remix, SvelteKit, TanStack Start, plain Node — and with npm, pnpm, yarn, and bun. + +It sends dependency names and versions only: no source code, no environment variable values, no file paths, no git history. + +## Install + +No signup, dashboard step, or UUID is needed up front. Install the package as a development dependency, then run `setup`: + +```bash +npm install --save-dev @patchstack/connect # or: pnpm add -D / yarn add -D / bun add -d +npx --no-install patchstack-connect setup +``` + +If your coding assistant refuses to run either command — Claude Code's permission check sometimes stops installs from npm — run it yourself; see [My AI assistant blocked a Connect command](/getting-started/installing-patchstack/ai-assistant-blocked-a-command/). + +`setup` applies a bounded, idempotent set of changes and nothing else: + +1. **Scans the lockfile and sends the dependency manifest** (package names and versions) to Patchstack. +2. **Provisions a Patchstack site** on the first run and writes its UUID to `.patchstackrc.json` (commit this file); later runs reuse the existing site instead of creating a duplicate. +3. **Manages the Patchstack Connector tag** in the project's root HTML shell (the first of `index.html`, `public/index.html`, or `src/app.html` that exists) — see the widget section below. +4. **Adds production build integration to `package.json`:** `scan` runs before the build and `mark-build` after it, via `prebuild`/`postbuild` lifecycle hooks (or a direct build chain on bun, which skips npm-style hooks). Existing build commands are preserved, dev scripts are untouched, and `setup` never runs the build itself. +5. **Prints a status checklist** of anything that still needs a manual step, such as framework-specific widget placement. + +`setup` ends by printing a **dashboard link**. The CLI never opens the link and never asks for Patchstack credentials. The site is monitored either way; connecting it to an account is what makes the reports visible to you — see [Connecting the site to your account](#connecting-the-site-to-your-account) for the three ways to do that. + +### Connecting the site to your account + +A site that is scanning but not connected is an anonymous record: it is monitored, but its reports have nowhere to go, and because the site UUID is public and claiming is first-come, it stays claimable by anyone who loads the page. Any one of these attaches it, and they all end in the same place: + +1. **From the widget on your own site — the shortest route.** While the site is unclaimed, the widget on your preview shows a one-time **"Connect this website"** panel. Sign in there and the site is attached; no terminal, no copied URL, and no link to find. This is where claiming is meant to happen, which is why the panel appears in the builder's edit preview by default. +2. **From the dashboard link.** Open the link `setup`, `scan`, or `status` printed in your browser and sign in. +3. **From the terminal.** `npx @patchstack/connect claim` prints a link to sign in with, then attaches the site to that account. + +On a **published** build the connect panel is hidden from ordinary visitors (see [the Patchstack Connector](#the-patchstack-connector) below). As the owner you can still reach the sign-in there by loading any page with `#patchstack` appended to the URL — `?patchstack` works too. + +Once the site is connected, the panel never appears again, and the widget shows the public report form instead. + +### Connecting straight to your account + +If you start from the app — **Sites → Add new → AI-assisted** — and tick **Connect this website to my account automatically**, the message it gives you to paste into your assistant carries a **claim token** for your account, and the assistant runs `setup` with it: + +```bash +npx @patchstack/connect setup --claim-token +# or: PATCHSTACK_CLAIM_TOKEN= npx @patchstack/connect setup +``` + +The site is then created already attached to your account, `setup` prints your dashboard link for it, and the app's **Connect website** panel picks the site up on its own. The token names your account, not the project: it is never written to `.patchstackrc.json` or the credential file, and it stops working after a day. An expired or unrecognised token does not break the install — the site is created unattached, exactly as it would be without one, and `setup` prints the dashboard link to connect it by hand. + +`setup` never runs the `protect` command (see below). + +### Manual alternative + +The same pieces can be applied individually: `npx @patchstack/connect scan` performs steps 1–3, and the build hooks can be added by hand: + +```jsonc +{ + "scripts": { + "prebuild": "patchstack-connect scan", + "postbuild": "patchstack-connect mark-build" + } +} +``` + +Run `npx @patchstack/connect guide` at any time for a project-aware checklist of what is present and what is missing, with commands tailored to the project. `npx @patchstack/connect status` re-prints the site UUID and dashboard link. + +## The Patchstack Connector + +Connect installs the **Patchstack Connector**, Patchstack's vulnerability disclosure widget — a floating control that becomes a "Report a vulnerability" button once the site is connected to an account, so anyone who spots an issue can report it straight to you. The widget is a single script tag loading `https://cdn.patchstack.com/patchstack-widget.js`, configured with the site UUID (which is public by design — it ships in client-side HTML and is not a secret). A pre-existing manually placed widget tag is left untouched, and `mark-build` ensures the tag in build output (`dist/`, `build/`, `out/`, `.output/public`) without ever editing source. + +Frameworks without a static HTML shell need a one-line placement in the root layout; `guide` prints the exact snippet for the detected framework, and the [widget reference](https://cdn.patchstack.com/llm.html) covers additional patterns. + +To run without the widget, set `"widget": false` in `.patchstackrc.json` — this disables all widget management; otherwise the next scan re-adds the tag. + +**What the widget shows depends on whether the site is connected to an account.** While it is unclaimed, the widget serves the one-time "Connect this website" panel *instead of* the report button — so on a fresh install the first thing you see is the sign-in, not the floating button. Connect the site and the panel is replaced by the public **Report a vulnerability** button for good. To skip the onboarding entirely and always show the report form, set `data-build-mode="false"` on the script tag. + +On a **published** build Connect's `mark-build` hook stamps `window.__PATCHSTACK_PROD__` into the built HTML, which hides the connect panel and the owner "Log in" link from visitors and leaves the report form only. Owners reach the sign-in there with `#patchstack` (or `?patchstack`) appended to any page URL. + +See [Troubleshooting JS / Node.js](/getting-started/installing-patchstack/troubleshooting-javascript-node-projects/) if the widget does not appear at all. + +### Signing in to the widget on your site + +The widget's sign-in form leads with **Continue with Patchstack**: one click signs you in with the account you are already signed in to at app.patchstack.com — no password, no provider round trip, and it works for SSO and two-factor accounts too. In Chrome and Edge the button already names your account ("Continue as …"); Safari and Firefox do not let the widget see that, so there it is unnamed but works the same way. If you are not signed in to app.patchstack.com in that browser, the widget says so and the e-mail, Google, GitHub and LinkedIn options are right underneath. + +## The `protect` command + +The package also ships an **opt-in** `protect` command: a runtime exploit guard, currently for TanStack Start + Supabase applications, which patches the app's Supabase client to route traffic through a same-origin guard. It modifies application code and runs **only** when explicitly invoked — `setup`, `scan`, `guide`, `status`, and `mark-build` never invoke it. If you don't run `protect`, no application code is changed beyond the widget tag and `package.json` scripts described above. + +## Security and data handling + +- **Data sent to Patchstack:** dependency package names and versions from the lockfile, plus a build fingerprint from `mark-build`. No source code, environment variable values, file paths, or git history is transmitted. +- **Files written locally:** `.patchstackrc.json` (site UUID and settings), the widget script tag in the root HTML shell, and the `scan`/`mark-build` entries in `package.json` scripts. `mark-build` additionally stamps build output, never source. +- **External resources:** the widget script is loaded in the browser from `https://cdn.patchstack.com/patchstack-widget.js`. The CLI itself downloads and executes nothing from a URL. +- **Dashboard link:** printed to the terminal only; the CLI never opens it and never asks for credentials. + +## Uninstalling + +1. Note the site UUID from `.patchstackrc.json` before deleting anything — it identifies the site in the dashboard. +2. Remove the widget tag (and any `PatchstackWidget.init(...)` call) from the layout or HTML shell. +3. Remove the `patchstack-connect scan` / `patchstack-connect mark-build` parts from `package.json` scripts, keeping any chained commands. +4. Uninstall with the manager matching the lockfile: `npm uninstall` / `pnpm remove` / `yarn remove` / `bun remove` `@patchstack/connect`. +5. Delete `.patchstackrc.json` and any `PATCHSTACK_SITE_UUID` environment variables. + +Reporting stops immediately. Local removal does not delete the site record on Patchstack's side: an unclaimed site is an anonymous record that stops receiving reports; a claimed site can be removed in the dashboard at https://app.patchstack.com. + +## Troubleshooting + +A widget that never appears, a published site serving an old build, a broken config file, or a Connect install stuck on an old version are all covered — with copy-paste prompts for AI site builders — in [Troubleshooting JavaScript / Node.js projects](/getting-started/installing-patchstack/troubleshooting-javascript-node-projects/). If the assistant never got that far because it would not run `npm install` or `setup`, see [My AI assistant blocked a Connect command](/getting-started/installing-patchstack/ai-assistant-blocked-a-command/). + +## How this relates to host-level npm protection + +Hosting partners can enable npm vulnerability intelligence for the sites they host through the partner-level [Threat Intelligence API npm features](/api-solutions/threat-intelligence-api/npm-features/). That integration is applied by the host at the infrastructure level. `@patchstack/connect` is the complementary self-service path: developers install it directly into their own projects, whether or not their host is a Patchstack partner. Both feed the same vulnerability database. diff --git a/src/content/docs/Getting Started/Installing Patchstack/troubleshooting-javascript-node-projects.mdx b/src/content/docs/Getting Started/Installing Patchstack/troubleshooting-javascript-node-projects.mdx new file mode 100644 index 00000000..e9d8f06d --- /dev/null +++ b/src/content/docs/Getting Started/Installing Patchstack/troubleshooting-javascript-node-projects.mdx @@ -0,0 +1,284 @@ +--- +title: "Troubleshooting JavaScript / Node.js projects" +excerpt: "Fix a Patchstack Connector that never appears or appears twice, a published build that serves an old integration, a broken config file, or an outdated @patchstack/connect — including prompts to paste into an AI site builder." +hidden: false +createdAt: "Mon Sep 07 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Wed Sep 09 2026 00:00:00 GMT+0000 (Coordinated Universal Time)" +sidebar: + order: 7.4 + label: "Troubleshooting JS / Node.js" +--- + +import { Steps, Aside } from '@astrojs/starlight/components'; + +This page covers the problems that come up after connecting a JavaScript or Node.js project with [`@patchstack/connect`](/getting-started/installing-patchstack/installing-on-javascript-node-projects/): a Patchstack Connector that never appears, a widget that appears twice, a published site still serving an old integration, a build that broke after a config change, a Connect install stuck on an old version, and an update that will not take because the package manager is holding the release back. + +If the install never finished because your AI assistant refused to run `npm install` or `npx @patchstack/connect setup`, start with [My AI assistant blocked a Connect command](/getting-started/installing-patchstack/ai-assistant-blocked-a-command/) instead. + +Every section ends with a **prompt you can paste into your site builder's AI chat**. The prompts are deliberately explicit about proving the result, because builder assistants otherwise tend to report the version they remember, or stop after editing one file. + + + +## Tell your builder what project this is + +AI builders differ in which package manager they use and which controls they expose. Prepend the snippet for your platform to any prompt below. + +**Lovable** + +```text +This is a Lovable project. Inspect the existing lockfile before installing +anything. Lovable projects often use Bun; if bun.lock or bun.lockb exists, use +Bun and do not create a package-lock.json beside it. +``` + +**GoDaddy Airo** + +```text +This is a GoDaddy Airo project. Make the changes in the project workspace and +use its existing package manager. If Airo does not expose the required install +or build control, tell me exactly which step is unavailable instead of +reporting that the task is complete. +``` + +**Hostinger Horizons** + +```text +This is a Hostinger Horizons project. Use its existing package manager and allow +the dependency install and full production build to finish before checking the +result; do not treat a slow build as a failed one. +``` + +**Anything else, or not sure** + +```text +First identify this project's package manager from its lockfile and use that +same package manager for every command. Do not create a second lockfile. +``` + +## The widget is not visible on my site + +The visitor-facing **Report a vulnerability** button does not appear until the site is connected to a Patchstack account. If you installed Connect and never saw it, that is usually the reason rather than a broken install — work through these in order. + + + +1. **Connect the site to your account.** While the site is unclaimed the widget shows a one-time **"Connect this website"** panel *instead of* the report button. Sign in through that panel — on your preview it is already on the page — and the button takes its place permanently. The [dashboard link](/getting-started/installing-patchstack/installing-on-javascript-node-projects/#connecting-the-site-to-your-account) and `npx @patchstack/connect claim` do the same thing from a browser or a terminal. + + To skip the onboarding entirely and always show the report form, set `data-build-mode="false"` on the script tag: + + ```html + + ``` + +2. **Open the widget as the site owner.** On a published build the connect panel and the owner "Log in" link are hidden from visitors, so neither is a sign the install failed. Load any page of your site with `#patchstack` appended to the URL: + + ```text + https://your-site.com/#patchstack + ``` + + That reveals the owner log-in even on a live production build, and it works from any device or network. `?patchstack` in the query string does the same thing. + +3. **Check the script tag actually shipped.** View source on the published page (not the builder preview) and confirm there is exactly one script loading `https://cdn.patchstack.com/patchstack-widget.js`, with `data-site-uuid` set to the UUID from your committed `.patchstackrc.json`. + +4. **Check the site UUID is a literal value.** The UUID must be written into the HTML. Reading it from `VITE_*`, `NEXT_PUBLIC_*`, or another environment-only variable that is not defined at build time leaves the attribute empty and the widget silent. The site UUID is public by design — it ships in client-side HTML and is not a secret. + +5. **Check the widget was not disabled.** `"widget": false` in `.patchstackrc.json` turns off all widget management, and the next `scan` will not re-add the tag. + +6. **Check the browser console.** A Content Security Policy that omits `cdn.patchstack.com` from `script-src`, or a content blocker, will stop the script from loading. Both show up as an error on the live page. + + + + + +### Prompt: widget missing after publish + +Use this when the widget works in the builder preview but is absent from the published site. + +```text +Please diagnose why the Patchstack Connector works in preview but is missing from +the published site. + +1. Use the latest @patchstack/connect release from npm. +2. Confirm the root page contains exactly one Connect-managed script from + https://cdn.patchstack.com/patchstack-widget.js with data-site-uuid set from + the public .patchstackrc.json value. +3. Do not read the site UUID from VITE_*, NEXT_PUBLIC_*, or another + environment-only variable. +4. Run the Connect setup/scan flow and the complete production build, + including mark-build where the project scripts require it. +5. Inspect the generated production output — not only source files — and verify + that the widget script and window.__PATCHSTACK_PROD__ marker are present. +6. Publish that verified output, then check the live page and browser console + for the first concrete error. + +Please make the fix and show the production evidence. Thank you. +``` + +## The published widget still looks outdated + +Your source can be correct while the builder or CDN is still serving an older artifact. Confirm the live URL — not the preview — is loading the current script, and compare the version the widget reports in each. + +The widget shows its version in the owner dashboard. If preview and live disagree, the deployment is stale, not the code. + +```text +Please verify that the published site is actually serving the newest Patchstack +integration rather than an older build artifact. + +1. Confirm @patchstack/connect matches the newest release the project's + package manager will install. A release published in the last 24 hours may + be held back — see the section below. +2. Confirm the site loads the Patchstack CDN script rather than a copied local + patchstack-widget.js file. +3. Run a clean production build through the project's normal build command and + wait for it to finish. +4. Republish the new output and invalidate only the relevant builder/deployment + cache if the platform exposes that control. +5. On the live URL, inspect the Network response for patchstack-widget.js and + the version shown by the widget. Compare that with preview and report both + values. + +Please do not stop at a source-code check; verify the live deployment. +Thank you. +``` + +## Is this the latest Connect version? + +Site builders often resolve `@patchstack/connect` from cached package metadata and land on an older release. Check what npm actually has: + +```bash +npm view @patchstack/connect version +``` + +Then compare it against **the lockfile**, not `package.json`. The lockfile records what is installed; `package.json` records what was asked for, and the two can disagree — see the next section. If they differ, install `@patchstack/connect@latest` with the package manager that matches your lockfile. + +```text +Please update @patchstack/connect from the official npm registry. Please do not +rely on a remembered or cached version. + +1. Query npm for the current dist-tag with: npm view @patchstack/connect version. +2. Install @patchstack/connect@latest as a regular dependency with the package + manager already used by this project. +3. Confirm the exact installed version in the LOCKFILE, not package.json, and + with @patchstack/connect --version. +4. If the lockfile did not move to the version you asked for, check whether this + project holds back newly published packages (for example minimumReleaseAge in + bunfig.toml) and tell me the version it settled on and why. +5. Run the project's complete production build. +6. Tell me the registry version, the installed version from the lockfile, files + changed, and the final build result. + +Please make the changes and verify them. Thank you. +``` + +## The update keeps coming back after I update + +Some platforms hold a newly published package for a day before they will install it. Lovable is one: every project it generates carries a `bunfig.toml` with + +```toml +[install] +minimumReleaseAge = 86400 +``` + +which tells Bun to skip any version published in the last 24 hours. Ask for one of those and the install reports success, `package.json` shows the new number, and the lockfile stays exactly where it was. + +This is a supply-chain guard, and a reasonable one — a package published minutes ago has had no time to be noticed if it was published by someone who should not have been able to. **We do not suggest turning it off.** + +To see what actually happened, open your lockfile (`bun.lock`, `package-lock.json`, `pnpm-lock.yaml`) and find `@patchstack/connect`. That number is the one that counts. If it is behind `package.json`, the release you asked for is still inside the hold window, and the install will pick it up on its own the next time the project is built after the window passes. + +Patchstack allows for this. The update notice in your dashboard and in the widget compares what you have installed against the newest release your package manager will actually accept, so it does not ask you to install something that is being held back — and when a newer release exists but is still held, the update screen says so rather than treating it as something you have failed to do. + +## The build broke after a config update + +Connect uses two config files with different jobs, and mixing them up breaks the build: + +| File | Commit it? | Holds | +|------|-----------|-------| +| `.patchstackrc.json` | Yes | The public `siteUuid` and non-secret settings such as `widget` | +| `.patchstackrc.local.json` | No — gitignore it | `apiKey` only | + +The API key can also come from the `PATCHSTACK_API_KEY` environment variable. Never import it into browser code and never move it into the public config. + +```text +Please diagnose and fix the Patchstack build after the config-file update. + +1. Update @patchstack/connect to the latest npm version first, even if it was + released within the last 24 hours. +2. Search the entire project for .patchstackrc.json and + .patchstackrc.local.json, including build scripts and generated integration + code. +3. Keep the public siteUuid and non-secret settings in committed + .patchstackrc.json. +4. Keep apiKey only in gitignored .patchstackrc.local.json or + PATCHSTACK_API_KEY. Never import that secret into browser code or move it + into the public config. +5. Fix any stale code path that still expects the credential only in + .patchstackrc.json, while preserving the site UUID. +6. Run Patchstack status, scan, and the complete production build. Report the + root cause, exact files changed, and build output. + +Please complete and verify the fix. Thank you. +``` + +## I see two Patchstack Connectors + +Two shield buttons stacked in the corner, sometimes one opening the owner log-in and the other the report form, mean the widget script ran twice on that page. They often sit on exactly the same pixel, so the second one only shows when a panel opens or the layout shifts. + +The widget keeps **one floating launcher per page** on its own: + +- A second copy loaded by the **same document** is ignored, with a `[PatchstackWidget]` warning in the browser console. +- A copy inside a page of **your own site that the shell shows in an ` + + +:::tip[Standing up a local environment first?] +If you want to test the module locally before configuring a production WHMCS, +follow your local WHMCS development setup guide to get a working install, then +return here to configure Patchstack. +::: + +- **Prerequisites:** WHMCS 8.0+, PHP 7.3+, `cURL` extension enabled, a Patchstack **Developer or Enterprise** plan (required for App API access), SSH access with WP-CLI installed on each cPanel server you want to auto-deploy to. + +## Technical integration + +The module is a standard WHMCS provisioning module (`modules/servers/patchstack`) +plus optional hooks. It plugs into the four WHMCS module commands — Create, +Suspend, Unsuspend, Terminate — so every billing event drives a corresponding +action against the [Patchstack App API](/api-solutions/app-api/patchstack-app-api/). +On Create it registers the customer's site, stores OAuth credentials, and (if +enabled) SSH-deploys the Patchstack plugin to the correct WordPress installation. +Suspend/Unsuspend toggle protection state. Terminate removes the site from +Patchstack when the service is cancelled. For how the underlying provisioning API +works, see the [Patchstack integration guide](/api-solutions/app-api/patchstack-integration/). + +Multi-server support is built around WHMCS's own server management. You configure +**one** Patchstack API server record (carrying only your App API token) and point +the Patchstack product at it via a Server Group. Your existing cPanel servers are +used as-is: when a customer buys Patchstack, the module looks up the customer's +active hosting service, identifies which cPanel server it lives on, and reads SSH +credentials from that server record. Two servers or two hundred — there's no +per-server product configuration. + +The client area covers five explicit states from "just ordered" to "protected", +including the two edge cases the module handles without support intervention: +multiple WordPress installs on one account (customer picks which one), and +external hosting with no SSH access (customer gets a one-click pre-configured +plugin download). Once a site has pinged Patchstack at least once, the client area +exposes a single-sign-on link into the Patchstack dashboard — no second password +to manage. + +:::caution[Admin URLs are placeholders] +Replace `https://your-whmcs.example.com/admin/` throughout with your own WHMCS +admin URL. Paths below are relative to `/admin/` on your WHMCS install. +::: + +## Configure Patchstack — hosting-provider walkthrough + +The manual steps a hosting provider takes inside WHMCS to wire up **Patchstack +Protection**, end to end. Every step is meant to be run against your real WHMCS +admin UI, with the values captured as you go. + +:::note +Assumes WHMCS is already installed and running, and requires a Patchstack +**Developer** or **Enterprise** subscription (App API access). +::: + +--- + +## Step 1 — Get your Patchstack App API Token + +1. Log in to the [Patchstack Dashboard](https://app.patchstack.com/). +2. Navigate to [**Settings → Integrations**](https://app.patchstack.com/settings/integrations). +3. Click **Generate Token** (or copy your existing App API token). +4. **Copy the token somewhere safe now** — you enter it as the server **Access Hash** + in Step 3. Once you navigate away, you may not be able to view the same token again. + +For details on the token (`UserToken`) and what it authorizes, see the +[Patchstack App API](/api-solutions/app-api/patchstack-app-api/) documentation. + +--- + +## Step 2 — Activate Payments (Bank Transfer) + +1. Open **Settings → Apps & Integrations** (`https://your-whmcs.example.com/admin/index.php?rp=/admin/apps`). +2. Click **Browse**. +3. Go to the **Payments** section. +4. Find and click **Bank Transfer**. +5. Click to activate it. +6. Save changes. + +--- + +## Step 3 — Configure the Patchstack API Server + +This server record stores only your Patchstack App API token — it does **not** +represent a cPanel server. + +1. Navigate to **Setup → Products/Services → Servers** (`https://your-whmcs.example.com/admin/configservers.php`). +2. Click **Add New Server**, then **Go to Advanced Mode**. +3. Configure: + +| Field | Value | +| --- | --- | +| Name | `Patchstack API` | +| Hostname | `api.patchstack.com` | +| Module | `Patchstack Protection` | +| Access Hash | your App API token (from Step 1) | + +4. Click **Test Connection** to verify, then **Save**. + +:::note +Leave the **IP Address** field blank. If the test fails, confirm the hostname is +`api.patchstack.com` and the token is valid. +::: + +--- + +## Step 4 — Create a Server Group + +1. Navigate to **Setup → Products/Services → Servers** (`https://your-whmcs.example.com/admin/configservers.php`). +2. Click **Create New Group**. +3. Name it `Patchstack Protection Group`. +4. Add your Patchstack API server into the group, then **Save**. + +--- + +## Step 5 — Configure cPanel Servers for SSH + +The module reads SSH credentials directly from each cPanel **server record** (not +from the product). For each cPanel server in your infrastructure: + +1. Navigate to **Setup → Products/Services → Servers** (`https://your-whmcs.example.com/admin/configservers.php`). +2. Open an existing cPanel server (or add one) and set: + +| Field | Value / notes | +| --- | --- | +| Module | `cPanel` | +| Hostname / IP Address | the server's IP (enter the IP, not a hostname) | +| Username | `root` | +| Password | SSH password — for password auth; leave blank if using a key | +| API Token | SSH **private key (PEM)** — for key auth; leave blank if using a password | + +:::note +WHMCS labels the last field "API Token" for cPanel servers; the module stores the +SSH private key there and auto-detects key auth when the value starts with `-----BEGIN`. +::: + +:::caution[Handle SSH credentials securely] +Enter root passwords and private keys straight into the WHMCS server record. Never +commit them to a repository, paste them into plaintext files, or share them outside +your secrets manager. +::: + +3. **Save**, and repeat for each cPanel server. + +--- + +## Step 6 — Create a Product Group + +1. Navigate to **Setup → Products/Services → Products/Services** (`https://your-whmcs.example.com/admin/configproducts.php`). +2. Click **Create a New Group** and configure: + +| Field | Value | +| --- | --- | +| Product Group Name | `Patchstack Protection Product Group` | +| Order Form Template | `Standard Cart` | +| Available Payment Gateways | `Bank Transfer` | + +3. **Save**. + +--- + +## Step 7 — Create the Patchstack Product + +1. Navigate to **Setup → Products/Services → Products/Services** (`https://your-whmcs.example.com/admin/configproducts.php`). +2. Click **Create a New Product**: + +| Field | Value | +| --- | --- | +| Product Type | `Other` | +| Product Group | `Patchstack Protection Product Group` | +| Product Name | `Patchstack Protection` | +| Module | `Patchstack Protection` | +| Create as Hidden | `Unchecked` | + +3. Click **Continue**, then configure the tabs: + - **Details** — Require Domain: **Checked** + - **Pricing** — Payment Type: `Free` *(for testing; set real pricing in production)* + - **Module Settings** — Server Group: `Patchstack Protection Group` · Auto Deploy Plugin: **Checked** · "Automatically setup the product as soon as the first payment is received": **Selected** +4. Click **Save Changes**. + +--- + +## Step 8 — Custom Fields (automatic) + +1. Open the **Custom Fields** tab. +2. Click **Save Changes** — the module creates the required custom fields on save; + they appear in the tab afterward. + +--- + +## Testing a full order end to end + +Place a test order end to end to confirm the module provisions correctly. This +assumes you've completed Steps 1–8 above and have access to a cPanel/WHM test +server. Throughout this section, replace `` with your test +server's IP and `` with a domain that resolves to it (for +example, an `nip.io` wildcard domain). + +### Test Step 1 — Create a cPanel Server Group and Hosting Product + +In production the hosting provider already has cPanel hosting products and server +groups in WHMCS. In a test environment you create them to simulate this. + +**Create the server group** + +1. Navigate to **Setup → Products/Services → Servers** (`https://your-whmcs.example.com/admin/configservers.php`). +2. Click **Create New Group**. +3. Name it `Hosting Servers`. +4. Add the cPanel test server into the group, then **Save**. + +**Create the product group and product** + +1. Navigate to **Setup → Products/Services → Products/Services** (`https://your-whmcs.example.com/admin/configproducts.php`). +2. Click **Create a New Group**, name it `Hosting`, and **Save**. +3. Click **Create a New Product** and configure: + +| Field | Value | +| --- | --- | +| Product Type | `Shared Hosting` | +| Product Group | `Hosting` | +| Product Name | `cPanel Hosting` | +| Module | `cPanel` | +| Create as Hidden | `Checked` | + +4. Click **Continue**, then **Save Changes**. +5. The product reloads — open the **Module Settings** tab and configure: + +| Field | Value | +| --- | --- | +| Server Group | `Hosting Servers` | +| Module Settings | Automatically setup the product when you manually accept a pending order | + +6. Click **Save Changes**. + +:::note +The **Server Group** field is only selectable after the product has been saved +once. If it's greyed out on first creation, save, then re-open Module Settings. +::: + +### Test Step 2 — Order cPanel Hosting (WHMCS auto-provisions) + +WHMCS creates the cPanel account automatically when the order is accepted, just as +in production. The cPanel username is stored on the service record automatically — +no manual entry needed. + +1. Navigate to **Clients** (`https://your-whmcs.example.com/admin/clients.php`) and click the test client. +2. Click **Add New Order**. +3. Select the **cPanel Hosting** product. +4. Set the domain to `wpsite.`. +5. Leave **Order Status** as `Pending`. +6. Click **Submit Order**. +7. Navigate to **Orders** (`https://your-whmcs.example.com/admin/orders.php`), check the order, and click **Accept Order**. + +WHMCS calls WHM to create the cPanel account and records the username on the hosting +service automatically. + +:::note +If the order fails with "reserved username", the subdomain maps to a username +reserved on that cPanel server. Cancel and retry with a different subdomain +(e.g. `wpsite2.`). Use the same domain for all subsequent steps. +::: + +:::caution +If creation fails with **"The domain … already exists in the userdata" (XID …)**, +a cPanel account using that domain is left over from an earlier attempt — WHMCS +provisioning creates a *new* account and won't reuse an existing one. Either +terminate the leftover account in WHM (**Account Information → List Accounts** → +find the domain → **Terminate an Account**) and re-run **Module Commands → Create**, +or change the service **Domain** to a fresh subdomain (e.g. `wpsite2.`) +and create again — then use that domain for all later steps. +::: + +Next, install WordPress on the provisioned cPanel account (via WHM/cPanel), then +return here for the next step. + +### Test Step 3 — Order Patchstack Protection + +1. Navigate to the Patchstack Protection store page (`https://your-whmcs.example.com/index.php?rp=/store/patchstack-protection-group`). +2. Click **Order Now** for the Patchstack Protection product. +3. Click **I will use my existing domain and update my nameservers**. +4. Enter a placeholder domain such as `example.com` (WHMCS may not allow your + `nip.io` test domain at checkout — we correct it in the next step). +5. Click **Checkout** and complete the order. + +### Test Step 4 — Correct the Domain + +1. Navigate to **Clients** (`https://your-whmcs.example.com/admin/clients.php`) and open the test client. +2. Go to the **Products/Services** tab and select the Patchstack order. +3. Update the **Domain** field to `wpsite.`. +4. Click **Save Changes**. + +### Test Step 5 — Accept Order + +1. Navigate to **Orders** (`https://your-whmcs.example.com/admin/orders.php`). +2. Check the order. +3. Click **Accept Order**. + +If **Auto Deploy Plugin** is enabled, the module attempts SSH deployment +automatically. Check **Utilities → Logs → Module Log** filtered by `patchstack` to +see the deployment result. + +:::caution +If accept fails with **"This UserToken has expired"**, the App API token in the +Patchstack API server's **Access Hash** (Step 3) is no longer valid — it hit its +expiry, or a newer token superseded it (regenerating a token invalidates older +ones). Generate a fresh token at +[Settings → Integrations](https://app.patchstack.com/settings/integrations), update +the **Access Hash** on the `Patchstack API` server, click **Test Connection** to +confirm it's valid, then re-accept the order. +::: + +:::caution +If accept dies on a WHMCS **"Oops"** page (Display Errors off) and the container log +shows **`Class "phpseclib3\Net\SSH2" not found`**, the module's `vendor/` directory +isn't installed. Install the module's Composer dependencies once, then use **Retry +Deployment** on the service. +::: + +## Further information + +- [Patchstack App dashboard](https://app.patchstack.com/) — log in to manage the App API token and review provisioned sites. +- [Patchstack App → Settings → Integrations](https://app.patchstack.com/settings/integrations) — generate or rotate the App API token. +- [Patchstack App API](/api-solutions/app-api/patchstack-app-api/) — the provisioning API the module calls under the hood. +- [Patchstack integration guide](/api-solutions/app-api/patchstack-integration/) — how site provisioning and the plugin lifecycle work end to end. +- [WHMCS Server Management documentation](https://docs.whmcs.com/Servers) — official WHMCS guide for the underlying server-record infrastructure this module relies on. +- **Module support.** For technical questions about the module itself, contact `support@patchstack.com`. diff --git a/src/styles/custom.css b/src/styles/custom.css index 2d590278..59ea496d 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -72,7 +72,7 @@ header button { --sl-color-black: #ffffff; --sl-color-bg-nav: #24272f; --sl-color-text-invert:#24272f; - + starlight-theme-select select, starlight-theme-select option, @@ -111,7 +111,7 @@ header button { border: 0; } .tagline { - font-family: Faktum Regular, sans-serif; + font-family: Faktum Regular, sans-serif; font-size: 1rem; line-height: var(--sl-line-height); } @@ -135,4 +135,4 @@ header button { .main-frame { margin-bottom: 30px; -} \ No newline at end of file +}