Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
chore: comment out geo location insights for now
Scott Wilson58ac75aad566
diff --git a/backend/package-lock.json b/backend/package-lock.jsonindex 5bb2bb9f3f..3ca0b083ac 100644--- a/backend/package-lock.json+++ b/backend/package-lock.json@@ -89,7 +89,6 @@"fastify": "^4.29.1","fastify-plugin": "^4.5.1","file-type": "^22.0.0",- "geoip-lite": "^2.0.1","google-auth-library": "^9.9.0","handlebars": "^4.7.8","hdb": "^0.19.10",@@ -164,7 +163,6 @@"@smithy/types": "^4.3.1","@types/bcrypt": "^5.0.2","@types/dns-packet": "^5.6.5",- "@types/geoip-lite": "^1.4.4","@types/jmespath": "^0.15.2","@types/js-yaml": "^4.0.9","@types/jsonwebtoken": "^9.0.5",@@ -2214,7 +2212,6 @@"integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==","dev": true,"license": "MIT",- "peer": true,"dependencies": {"@ampproject/remapping": "^2.2.0","@babel/code-frame": "^7.26.2",@@ -4273,7 +4270,6 @@"url": "https://opencollective.com/csstools"}],- "peer": true,"engines": {"node": ">=18"},@@ -4295,7 +4291,6 @@"url": "https://opencollective.com/csstools"}],- "peer": true,"engines": {"node": ">=18"}@@ -6942,7 +6937,6 @@"resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz","integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==","license": "MIT",- "peer": true,"funding": {"url": "https://github.com/sponsors/colinhacks"}@@ -7863,7 +7857,6 @@"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz","integrity": "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==","license": "MIT",- "peer": true,"dependencies": {"@octokit/auth-token": "^4.0.0","@octokit/graphql": "^7.1.0",@@ -8359,7 +8352,6 @@"version": "1.9.0","resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz","integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",- "peer": true,"engines": {"node": ">=8.0.0"}@@ -9023,7 +9015,6 @@"resolved": "https://registry.npmjs.org/@react-email/body/-/body-0.2.0.tgz","integrity": "sha512-9GCWmVmKUAoRfloboCd+RKm6X17xn7eGL7HnpAZUnjBXBilWCxsKnLMTC/ixSHDKS/A/057M1Tx6ZUXd89sVBw==","license": "MIT",- "peer": true,"peerDependencies": {"react": "^18.0 || ^19.0 || ^19.0.0-rc"}@@ -9033,7 +9024,6 @@"resolved": "https://registry.npmjs.org/@react-email/button/-/button-0.2.0.tgz","integrity": "sha512-8i+v6cMxr2emz4ihCrRiYJPp2/sdYsNNsBzXStlcA+/B9Umpm5Jj3WJKYpgTPM+aeyiqlG/MMI1AucnBm4f1oQ==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9046,7 +9036,6 @@"resolved": "https://registry.npmjs.org/@react-email/code-block/-/code-block-0.2.0.tgz","integrity": "sha512-eIrPW9PIFgDopQU0e/OPpwCW2QWQDtNZDSsiN4sJO8KdMnWWnXJicnRfzrit5rHwFo+Y98i+w/Y5ScnBAFr1dQ==","license": "MIT",- "peer": true,"dependencies": {"prismjs": "^1.30.0"},@@ -9062,7 +9051,6 @@"resolved": "https://registry.npmjs.org/@react-email/code-inline/-/code-inline-0.0.5.tgz","integrity": "sha512-MmAsOzdJpzsnY2cZoPHFPk6uDO/Ncpb4Kh1hAt9UZc1xOW3fIzpe1Pi9y9p6wwUmpaeeDalJxAxH6/fnTquinA==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9138,7 +9126,6 @@"resolved": "https://registry.npmjs.org/@react-email/container/-/container-0.0.15.tgz","integrity": "sha512-Qo2IQo0ru2kZq47REmHW3iXjAQaKu4tpeq/M8m1zHIVwKduL2vYOBQWbC2oDnMtWPmkBjej6XxgtZByxM6cCFg==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9172,7 +9159,6 @@"resolved": "https://registry.npmjs.org/@react-email/heading/-/heading-0.0.15.tgz","integrity": "sha512-xF2GqsvBrp/HbRHWEfOgSfRFX+Q8I5KBEIG5+Lv3Vb2R/NYr0s8A5JhHHGf2pWBMJdbP4B2WHgj/VUrhy8dkIg==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9185,7 +9171,6 @@"resolved": "https://registry.npmjs.org/@react-email/hr/-/hr-0.0.11.tgz","integrity": "sha512-S1gZHVhwOsd1Iad5IFhpfICwNPMGPJidG/Uysy1AwmspyoAP5a4Iw3OWEpINFdgh9MHladbxcLKO2AJO+cA9Lw==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9210,7 +9195,6 @@"resolved": "https://registry.npmjs.org/@react-email/img/-/img-0.0.11.tgz","integrity": "sha512-aGc8Y6U5C3igoMaqAJKsCpkbm1XjguQ09Acd+YcTKwjnC2+0w3yGUJkjWB2vTx4tN8dCqQCXO8FmdJpMfOA9EQ==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9223,7 +9207,6 @@"resolved": "https://registry.npmjs.org/@react-email/link/-/link-0.0.12.tgz","integrity": "sha512-vF+xxQk2fGS1CN7UPQDbzvcBGfffr+GjTPNiWM38fhBfsLv6A/YUfaqxWlmL7zLzVmo0K2cvvV9wxlSyNba1aQ==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9251,7 +9234,6 @@"resolved": "https://registry.npmjs.org/@react-email/preview/-/preview-0.0.13.tgz","integrity": "sha512-F7j9FJ0JN/A4d7yr+aw28p4uX7VLWs7hTHtLo7WRyw4G+Lit6Zucq4UWKRxJC8lpsUdzVmG7aBJnKOT+urqs/w==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -9824,7 +9806,6 @@"resolved": "https://registry.npmjs.org/@react-email/text/-/text-0.1.5.tgz","integrity": "sha512-o5PNHFSE085VMXayxH+SJ1LSOtGsTv+RpNKnTiJDrJUwoBu77G3PlKOsZZQHCNyD28WsQpl9v2WcJLbQudqwPg==","license": "MIT",- "peer": true,"engines": {"node": ">=18.0.0"},@@ -11364,13 +11345,6 @@"@types/send": "*"}},- "node_modules/@types/geoip-lite": {- "version": "1.4.4",- "resolved": "https://registry.npmjs.org/@types/geoip-lite/-/geoip-lite-1.4.4.tgz",- "integrity": "sha512-2uVfn+C6bX/H356H6mjxsWUA5u8LO8dJgSBIRO/NFlpMe4DESzacutD/rKYrTDKm1Ugv78b4Wz1KvpHrlv3jSw==",- "dev": true,- "license": "MIT"- },"node_modules/@types/http-errors": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz",@@ -11495,7 +11469,6 @@"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.23.tgz","integrity": "sha512-yIdlVVVHXpmqRhtyovZAcSy0MiPcYWGkoO4CGe/+jpP0hmNuihm4XhHbADpK++MsiLHP5MVlv+bcgdF99kSiFQ==","license": "MIT",- "peer": true,"dependencies": {"undici-types": "~6.21.0"}@@ -11989,7 +11962,6 @@"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==","dev": true,"license": "BSD-2-Clause",- "peer": true,"dependencies": {"@typescript-eslint/scope-manager": "6.21.0","@typescript-eslint/types": "6.21.0",@@ -12446,7 +12418,6 @@"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz","integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==","license": "MIT",- "peer": true,"bin": {"acorn": "bin/acorn"},@@ -12927,7 +12898,6 @@"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz","integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==","license": "MIT",- "peer": true,"dependencies": {"bn.js": "^4.0.0","inherits": "^2.0.1",@@ -13140,7 +13110,6 @@"resolved": "https://registry.npmjs.org/axios/-/axios-1.14.0.tgz","integrity": "sha512-3Y8yrqLSwjuzpXuZ0oIYZ/XGgLwUIBU3uLvbcpb0pidD9ctpShJd43KSlEEkVQg6DS0G9NKyzOvBfUtDKEyHvQ==","license": "MIT",- "peer": true,"dependencies": {"follow-redirects": "^1.15.11","form-data": "^4.0.5",@@ -13772,7 +13741,6 @@}],"license": "MIT",- "peer": true,"dependencies": {"baseline-browser-mapping": "^2.8.9","caniuse-lite": "^1.0.30001746",@@ -13823,15 +13791,6 @@"ieee754": "^1.2.1"}},- "node_modules/buffer-crc32": {- "version": "0.2.13",- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",- "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",- "license": "MIT",- "engines": {- "node": "*"- }- },"node_modules/buffer-equal-constant-time": {"version": "1.0.1","resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",@@ -15213,7 +15172,6 @@"version": "16.4.1","resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz","integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==",- "peer": true,"engines": {"node": ">=12"},@@ -15584,7 +15542,6 @@"dev": true,"hasInstallScript": true,"license": "MIT",- "peer": true,"bin": {"esbuild": "bin/esbuild"},@@ -15667,7 +15624,6 @@"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz","integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==","dev": true,- "peer": true,"dependencies": {"@eslint-community/eslint-utils": "^4.2.0","@eslint-community/regexpp": "^4.6.1",@@ -15766,7 +15722,6 @@"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz","integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==","dev": true,- "peer": true,"bin": {"eslint-config-prettier": "bin/cli.js"},@@ -15855,7 +15810,6 @@"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz","integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==","dev": true,- "peer": true,"dependencies": {"array-includes": "^3.1.7","array.prototype.findlastindex": "^1.2.3",@@ -16268,7 +16222,6 @@"resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz","integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==","license": "MIT",- "peer": true,"dependencies": {"accepts": "~1.3.8","array-flatten": "1.1.1",@@ -16342,6 +16295,7 @@"resolved": "https://registry.npmjs.org/express-session/-/express-session-1.19.0.tgz","integrity": "sha512-0csaMkGq+vaiZTmSMMGkfdCOabYv192VbytFypcvI0MANrp+4i/7yEkJ0sbAEhycQjntaKGzYfjfXQyVb7BHMA==","license": "MIT",+ "peer": true,"dependencies": {"cookie": "~0.7.2","cookie-signature": "~1.0.7",@@ -16363,12 +16317,14 @@"node_modules/express-session/node_modules/cookie-signature": {"version": "1.0.7","resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",- "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA=="+ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",+ "peer": true},"node_modules/express-session/node_modules/debug": {"version": "2.6.9","resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz","integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",+ "peer": true,"dependencies": {"ms": "2.0.0"}@@ -16376,7 +16332,8 @@"node_modules/express-session/node_modules/ms": {"version": "2.0.0","resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",+ "peer": true},"node_modules/express/node_modules/cookie-signature": {"version": "1.0.6",@@ -17286,79 +17243,6 @@"node": ">=6.9.0"}},- "node_modules/geoip-lite": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/geoip-lite/-/geoip-lite-2.0.1.tgz",- "integrity": "sha512-cR9E28nu1a6dsvzB1tANhdmCyXWV1L4AiSCT9alHLIUl06599EGu33mqY99ieU0twQob0kfcDQ/sAUBvHb7swA==",- "license": "Apache-2.0",- "dependencies": {- "chalk": "4.1 - 4.1.2",- "iconv-lite": "0.4.13 - 0.6.3",- "ip-address": "5.8.9 - 5.9.4",- "lazy": "1.0.11",- "yauzl": "^3.2.1"- },- "engines": {- "node": ">=24.0.0"- }- },- "node_modules/geoip-lite/node_modules/chalk": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",- "license": "MIT",- "dependencies": {- "ansi-styles": "^4.1.0",- "supports-color": "^7.1.0"- },- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/chalk/chalk?sponsor=1"- }- },- "node_modules/geoip-lite/node_modules/has-flag": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",- "license": "MIT",- "engines": {- "node": ">=8"- }- },- "node_modules/geoip-lite/node_modules/ip-address": {- "version": "5.9.4",- "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz",- "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==",- "license": "MIT",- "dependencies": {- "jsbn": "1.1.0",- "lodash": "^4.17.15",- "sprintf-js": "1.1.2"- },- "engines": {- "node": ">= 0.10"- }- },- "node_modules/geoip-lite/node_modules/sprintf-js": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",- "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==",- "license": "BSD-3-Clause"- },- "node_modules/geoip-lite/node_modules/supports-color": {- "version": "7.2.0",- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",- "license": "MIT",- "dependencies": {- "has-flag": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },"node_modules/get-caller-file": {"version": "2.0.5","resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",@@ -17903,7 +17787,6 @@"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.9.tgz","integrity": "sha512-wy3T8Zm2bsEvxKZM5w21VdHDDcwVS1yUFFY6i8UobSsKfFceT7TOwhbhfKsDyx7tYQlmRM5FLpIuYvNFyjctiA==","license": "MIT",- "peer": true,"engines": {"node": ">=16.9.0"}@@ -19349,15 +19232,6 @@"integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==","license": "MIT"},- "node_modules/lazy": {- "version": "1.0.11",- "resolved": "https://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz",- "integrity": "sha512-Y+CjUfLmIpoUCCRl0ub4smrYtGGr5AOa2AKOaWelGHOGz33X/Y/KizefGqbkwfz44+cnq/+9habclf8vOmu2LA==",- "license": "MIT",- "engines": {- "node": ">=0.2.0"- }- },"node_modules/ldap-filter": {"version": "0.3.3","resolved": "https://registry.npmjs.org/ldap-filter/-/ldap-filter-0.3.3.tgz",@@ -21390,6 +21264,7 @@"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz","integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==","license": "MIT",+ "peer": true,"engines": {"node": ">= 0.8"}@@ -21949,12 +21824,6 @@"url": "https://ko-fi.com/killymxi"}},- "node_modules/pend": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",- "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",- "license": "MIT"- },"node_modules/pg": {"version": "8.13.1","resolved": "https://registry.npmjs.org/pg/-/pg-8.13.1.tgz",@@ -22082,7 +21951,6 @@"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.2.tgz","integrity": "sha512-cfDHL6LStTEKlNilboNtobT/kEa30PtAf2Q1OgszfrG/rpVl1xaFWT9ktfkS306GmHgmnad1Sw4wabhlvFtsTw==","license": "MIT",- "peer": true,"engines": {"node": ">=10"},@@ -22425,7 +22293,6 @@}],"license": "MIT",- "peer": true,"dependencies": {"nanoid": "^3.3.11","picocolors": "^1.1.1",@@ -22523,7 +22390,6 @@"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz","integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==","license": "MIT",- "peer": true,"bin": {"prettier": "bin/prettier.cjs"},@@ -22940,6 +22806,7 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz","integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==",+ "peer": true,"engines": {"node": ">= 0.8"}@@ -23043,7 +22910,6 @@"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz","integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==","license": "MIT",- "peer": true,"engines": {"node": ">=0.10.0"}@@ -23053,7 +22919,6 @@"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz","integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==","license": "MIT",- "peer": true,"dependencies": {"scheduler": "^0.26.0"},@@ -24803,7 +24668,6 @@"resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz","integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==","license": "MIT",- "peer": true,"dependencies": {"ip-address": "^9.0.5","smart-buffer": "^4.2.0"@@ -26146,7 +26010,6 @@"integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==","dev": true,"license": "MIT",- "peer": true,"dependencies": {"esbuild": "~0.25.0","get-tsconfig": "^4.7.5"@@ -26315,7 +26178,6 @@"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz","integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==","dev": true,- "peer": true,"bin": {"tsc": "bin/tsc","tsserver": "bin/tsserver"@@ -26356,6 +26218,7 @@"version": "2.1.5","resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz","integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",+ "peer": true,"dependencies": {"random-bytes": "~1.0.0"},@@ -26918,7 +26781,6 @@"integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==","dev": true,"license": "MIT",- "peer": true,"dependencies": {"esbuild": "^0.25.0","fdir": "^6.5.0",@@ -27537,19 +27399,6 @@"url": "https://github.com/sponsors/eemeli"}},- "node_modules/yauzl": {- "version": "3.3.0",- "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.3.0.tgz",- "integrity": "sha512-PtGEvEP30p7sbIBJKUBjUnqgTVOyMURc4dLo9iNyAJnNIEz9pm88cCXF21w94Kg3k6RXkeZh5DHOGS0qEONvNQ==",- "license": "MIT",- "dependencies": {- "buffer-crc32": "~0.2.3",- "pend": "~1.2.0"- },- "engines": {- "node": ">=12"- }- },"node_modules/yn": {"version": "3.1.1","resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",@@ -27588,7 +27437,6 @@"resolved": "https://registry.npmjs.org/zod/-/zod-3.24.3.tgz","integrity": "sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==","license": "MIT",- "peer": true,"funding": {"url": "https://github.com/sponsors/colinhacks"}diff --git a/backend/package.json b/backend/package.jsonindex a8b5777194..432621ab8a 100644--- a/backend/package.json+++ b/backend/package.json@@ -83,7 +83,6 @@"@smithy/types": "^4.3.1","@types/bcrypt": "^5.0.2","@types/dns-packet": "^5.6.5",- "@types/geoip-lite": "^1.4.4","@types/jmespath": "^0.15.2","@types/js-yaml": "^4.0.9","@types/jsonwebtoken": "^9.0.5",@@ -212,7 +211,6 @@"fastify": "^4.29.1","fastify-plugin": "^4.5.1","file-type": "^22.0.0",- "geoip-lite": "^2.0.1","google-auth-library": "^9.9.0","handlebars": "^4.7.8","hdb": "^0.19.10",diff --git a/backend/src/ee/routes/v1/insights-router.ts b/backend/src/ee/routes/v1/insights-router.tsindex 551524c83d..6fcdf6e0dd 100644--- a/backend/src/ee/routes/v1/insights-router.ts+++ b/backend/src/ee/routes/v1/insights-router.ts@@ -99,38 +99,38 @@ export const registerInsightsRouter = async (server: FastifyZodProvider) => {}});- server.route({- method: "GET",- url: "/secrets/access-locations",- config: { rateLimit: readLimit },- schema: {- operationId: "getInsightsAccessLocations",- description: "Get geographic locations of secret access based on audit log IP addresses",- security: [{ bearerAuth: [] }],- querystring: z.object({- projectId: z.string().trim(),- days: z.coerce.number().min(1).max(90).default(30)- }),- response: {- 200: z.object({- locations: z.array(- z.object({ lat: z.number(), lng: z.number(), city: z.string(), country: z.string(), count: z.number() })- )- })- }- },- onRequest: verifyAuth([AuthMode.JWT]),- handler: async (req) => {- const { projectId, days } = req.query;- const result = await server.services.insights.getAccessLocations({ projectId, days }, req.permission);- await server.services.auditLog.createAuditLog({- projectId,- event: { type: EventType.VIEW_INSIGHTS_SECRETS_MANAGEMENT_ACCESS_LOCATIONS, metadata: { projectId, days } },- ...req.auditLogInfo- });- return result;- }- });+ // server.route({+ // method: "GET",+ // url: "/secrets/access-locations",+ // config: { rateLimit: readLimit },+ // schema: {+ // operationId: "getInsightsAccessLocations",+ // description: "Get geographic locations of secret access based on audit log IP addresses",+ // security: [{ bearerAuth: [] }],+ // querystring: z.object({+ // projectId: z.string().trim(),+ // days: z.coerce.number().min(1).max(90).default(30)+ // }),+ // response: {+ // 200: z.object({+ // locations: z.array(+ // z.object({ lat: z.number(), lng: z.number(), city: z.string(), country: z.string(), count: z.number() })+ // )+ // })+ // }+ // },+ // onRequest: verifyAuth([AuthMode.JWT]),+ // handler: async (req) => {+ // const { projectId, days } = req.query;+ // const result = await server.services.insights.getAccessLocations({ projectId, days }, req.permission);+ // await server.services.auditLog.createAuditLog({+ // projectId,+ // event: { type: EventType.VIEW_INSIGHTS_SECRETS_MANAGEMENT_ACCESS_LOCATIONS, metadata: { projectId, days } },+ // ...req.auditLogInfo+ // });+ // return result;+ // }+ // });server.route({method: "GET",diff --git a/backend/src/ee/services/insights/insights-service.ts b/backend/src/ee/services/insights/insights-service.tsindex 77e0371692..4b819407b7 100644--- a/backend/src/ee/services/insights/insights-service.ts+++ b/backend/src/ee/services/insights/insights-service.ts@@ -1,6 +1,6 @@import { ForbiddenError } from "@casl/ability";-import geoip from "geoip-lite";+// import geoip from "geoip-lite";import { ActionProjectType, IdentityAuthMethod } from "@app/db/schemas";import { TAuditLogDALFactory } from "@app/ee/services/audit-log/audit-log-dal";import { EventType } from "@app/ee/services/audit-log/audit-log-types";@@ -19,7 +19,7 @@ import { TSecretV2BridgeDALFactory } from "@app/services/secret-v2-bridge/secretimport { TUserDALFactory } from "@app/services/user/user-dal";import {- TGetAccessLocationsDTO,+ // TGetAccessLocationsDTO,TGetAccessVolumeDTO,TGetAuthMethodDistributionDTO,TGetInsightsCalendarDTO,@@ -234,84 +234,84 @@ export const insightsServiceFactory = ({});};- const getAccessLocations = async (dto: TGetAccessLocationsDTO, actorDto: OrgServiceActor) => {- await checkInsightsPermission(permissionService, licenseService, dto.projectId, actorDto);-- const cacheKey = KeyStorePrefixes.InsightsCache(dto.projectId, `access-locations:${dto.days}`);- return withCache(cacheKey, async () => {- const endDate = new Date();- const startDate = new Date();- startDate.setUTCDate(startDate.getUTCDate() - dto.days);-- const ipRows = await auditLogDAL.countByIpAddress({- orgId: actorDto.orgId,- projectId: dto.projectId,- eventTypes: VALUE_EVENT_TYPES,- startDate: startDate.toISOString(),- endDate: endDate.toISOString()- });-- const locationMap = new Map<string, { lat: number; lng: number; city: string; country: string; count: number }>();-- const isPrivateIp = (ip: string) =>- ip === "127.0.0.1" ||- ip === "::1" ||- ip === "::ffff:127.0.0.1" ||- ip.startsWith("10.") ||- ip.startsWith("172.16.") ||- ip.startsWith("172.17.") ||- ip.startsWith("172.18.") ||- ip.startsWith("172.19.") ||- ip.startsWith("172.20.") ||- ip.startsWith("172.21.") ||- ip.startsWith("172.22.") ||- ip.startsWith("172.23.") ||- ip.startsWith("172.24.") ||- ip.startsWith("172.25.") ||- ip.startsWith("172.26.") ||- ip.startsWith("172.27.") ||- ip.startsWith("172.28.") ||- ip.startsWith("172.29.") ||- ip.startsWith("172.30.") ||- ip.startsWith("172.31.") ||- ip.startsWith("192.168.");-- ipRows.forEach(({ ipAddress: ip, count }) => {- if (isPrivateIp(ip)) {- const key = "Local Network:LOCAL";- const existing = locationMap.get(key);- if (existing) {- existing.count += count;- } else {- locationMap.set(key, { lat: 0, lng: 0, city: "Local Network", country: "LOCAL", count });- }- return;- }-- const geo = geoip.lookup(ip);- if (!geo || !geo.ll) return;-- const city = geo.city || geo.region || "";- const key = `${city}:${geo.country}`;- const existing = locationMap.get(key);- if (existing) {- existing.count += count;- } else {- locationMap.set(key, {- lat: geo.ll[0],- lng: geo.ll[1],- city,- country: geo.country,- count- });- }- });-- return {- locations: Array.from(locationMap.values()).sort((a, b) => b.count - a.count)- };- });- };+ // const getAccessLocations = async (dto: TGetAccessLocationsDTO, actorDto: OrgServiceActor) => {+ // await checkInsightsPermission(permissionService, licenseService, dto.projectId, actorDto);++ // const cacheKey = KeyStorePrefixes.InsightsCache(dto.projectId, `access-locations:${dto.days}`);+ // return withCache(cacheKey, async () => {+ // const endDate = new Date();+ // const startDate = new Date();+ // startDate.setUTCDate(startDate.getUTCDate() - dto.days);++ // const ipRows = await auditLogDAL.countByIpAddress({+ // orgId: actorDto.orgId,+ // projectId: dto.projectId,+ // eventTypes: VALUE_EVENT_TYPES,+ // startDate: startDate.toISOString(),+ // endDate: endDate.toISOString()+ // });++ // const locationMap = new Map<string, { lat: number; lng: number; city: string; country: string; count: number }>();++ // const isPrivateIp = (ip: string) =>+ // ip === "127.0.0.1" ||+ // ip === "::1" ||+ // ip === "::ffff:127.0.0.1" ||+ // ip.startsWith("10.") ||+ // ip.startsWith("172.16.") ||+ // ip.startsWith("172.17.") ||+ // ip.startsWith("172.18.") ||+ // ip.startsWith("172.19.") ||+ // ip.startsWith("172.20.") ||+ // ip.startsWith("172.21.") ||+ // ip.startsWith("172.22.") ||+ // ip.startsWith("172.23.") ||+ // ip.startsWith("172.24.") ||+ // ip.startsWith("172.25.") ||+ // ip.startsWith("172.26.") ||+ // ip.startsWith("172.27.") ||+ // ip.startsWith("172.28.") ||+ // ip.startsWith("172.29.") ||+ // ip.startsWith("172.30.") ||+ // ip.startsWith("172.31.") ||+ // ip.startsWith("192.168.");++ // ipRows.forEach(({ ipAddress: ip, count }) => {+ // if (isPrivateIp(ip)) {+ // const key = "Local Network:LOCAL";+ // const existing = locationMap.get(key);+ // if (existing) {+ // existing.count += count;+ // } else {+ // locationMap.set(key, { lat: 0, lng: 0, city: "Local Network", country: "LOCAL", count });+ // }+ // return;+ // }++ // const geo = geoip.lookup(ip);+ // if (!geo || !geo.ll) return;++ // const city = geo.city || geo.region || "";+ // const key = `${city}:${geo.country}`;+ // const existing = locationMap.get(key);+ // if (existing) {+ // existing.count += count;+ // } else {+ // locationMap.set(key, {+ // lat: geo.ll[0],+ // lng: geo.ll[1],+ // city,+ // country: geo.country,+ // count+ // });+ // }+ // });++ // return {+ // locations: Array.from(locationMap.values()).sort((a, b) => b.count - a.count)+ // };+ // });+ // };const getAuthMethodDistribution = async (dto: TGetAuthMethodDistributionDTO, actorDto: OrgServiceActor) => {await checkInsightsPermission(permissionService, licenseService, dto.projectId, actorDto);@@ -479,7 +479,7 @@ export const insightsServiceFactory = ({return {getCalendar,getAccessVolume,- getAccessLocations,+ // getAccessLocations,getAuthMethodDistribution,getSummary};diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex 1ed268f7a2..1f6e7d991c 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -72,7 +72,6 @@"clsx": "^2.1.1","cmdk": "^1.1.1","cva": "npm:class-variance-authority@^0.7.1",- "d3-geo": "^3.1.1","date-fns": "^4.1.0","diff": "^8.0.3","dompurify": "^3.2.4",@@ -110,7 +109,6 @@"rehype-raw": "^7.0.0","sonner": "^2.0.7","tailwind-merge": "^2.5.5",- "topojson-client": "^3.1.0","tweetnacl": "^1.0.3","tweetnacl-util": "^0.15.1","xterm-readline": "^1.1.2",@@ -132,7 +130,6 @@"@tanstack/router-devtools": "^1.87.9","@tanstack/router-plugin": "^1.95.1","@types/argon2-browser": "^1.18.4",- "@types/d3-geo": "^3.1.0","@types/file-saver": "^2.0.7","@types/jsrp": "^0.2.6","@types/ms": "^0.7.34",@@ -142,8 +139,6 @@"@types/react-dom": "^18.3.1","@types/react-helmet": "^6.1.11","@types/react-simple-maps": "^3.0.6",- "@types/topojson-client": "^3.1.5",- "@types/topojson-specification": "^1.0.5","@vitejs/plugin-react-swc": "^3.5.0","eslint": "^8.57.1","eslint-config-airbnb": "^19.0.4",@@ -6627,16 +6622,6 @@"integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==","license": "MIT"},- "node_modules/@types/d3-geo": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz",- "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "@types/geojson": "*"- }- },"node_modules/@types/d3-interpolate": {"version": "3.0.4","resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",@@ -6968,27 +6953,6 @@"dev": true,"license": "MIT"},- "node_modules/@types/topojson-client": {- "version": "3.1.5",- "resolved": "https://registry.npmjs.org/@types/topojson-client/-/topojson-client-3.1.5.tgz",- "integrity": "sha512-C79rySTyPxnQNNguTZNI1Ct4D7IXgvyAs3p9HPecnl6mNrJ5+UhvGNYcZfpROYV2lMHI48kJPxwR+F9C6c7nmw==",- "dev": true,- "license": "MIT",- "dependencies": {- "@types/geojson": "*",- "@types/topojson-specification": "*"- }- },- "node_modules/@types/topojson-specification": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/@types/topojson-specification/-/topojson-specification-1.0.5.tgz",- "integrity": "sha512-C7KvcQh+C2nr6Y2Ub4YfgvWvWCgP2nOQMtfhlnwsRL4pYmmwzBS7HclGiS87eQfDOU/DLQpX6GEscviaz4yLIQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "@types/geojson": "*"- }- },"node_modules/@types/trusted-types": {"version": "2.0.7","resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",@@ -9436,18 +9400,6 @@"node": ">=12"}},- "node_modules/d3-geo": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz",- "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",- "license": "ISC",- "dependencies": {- "d3-array": "2.5.0 - 3"- },- "engines": {- "node": ">=12"- }- },"node_modules/d3-interpolate": {"version": "3.0.1","resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",diff --git a/frontend/package.json b/frontend/package.jsonindex cb9d5b35c6..1b375df63a 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -84,7 +84,6 @@"clsx": "^2.1.1","cmdk": "^1.1.1","cva": "npm:class-variance-authority@^0.7.1",- "d3-geo": "^3.1.1","date-fns": "^4.1.0","diff": "^8.0.3","dompurify": "^3.2.4",@@ -122,7 +121,6 @@"rehype-raw": "^7.0.0","sonner": "^2.0.7","tailwind-merge": "^2.5.5",- "topojson-client": "^3.1.0","tweetnacl": "^1.0.3","tweetnacl-util": "^0.15.1","xterm-readline": "^1.1.2",@@ -144,7 +142,6 @@"@tanstack/router-devtools": "^1.87.9","@tanstack/router-plugin": "^1.95.1","@types/argon2-browser": "^1.18.4",- "@types/d3-geo": "^3.1.0","@types/file-saver": "^2.0.7","@types/jsrp": "^0.2.6","@types/ms": "^0.7.34",@@ -154,8 +151,6 @@"@types/react-dom": "^18.3.1","@types/react-helmet": "^6.1.11","@types/react-simple-maps": "^3.0.6",- "@types/topojson-client": "^3.1.5",- "@types/topojson-specification": "^1.0.5","@vitejs/plugin-react-swc": "^3.5.0","eslint": "^8.57.1","eslint-config-airbnb": "^19.0.4",diff --git a/frontend/src/hooks/api/secretInsights/index.ts b/frontend/src/hooks/api/secretInsights/index.tsindex ab975b5b4f..6f6a248854 100644--- a/frontend/src/hooks/api/secretInsights/index.ts+++ b/frontend/src/hooks/api/secretInsights/index.ts@@ -2,7 +2,7 @@ export {useGetAuthMethodDistribution,useGetCalendarInsights,useGetInsightsSummary,- useGetSecretAccessLocations,+ // useGetSecretAccessLocations,useGetSecretAccessVolume} from "./queries";export type {diff --git a/frontend/src/hooks/api/secretInsights/queries.tsx b/frontend/src/hooks/api/secretInsights/queries.tsxindex 194533f78a..c0d72b1705 100644--- a/frontend/src/hooks/api/secretInsights/queries.tsx+++ b/frontend/src/hooks/api/secretInsights/queries.tsx@@ -9,8 +9,8 @@ import {TGetCalendarInsightsResponse,TGetInsightsSummaryDTO,TGetInsightsSummaryResponse,- TGetSecretAccessLocationsDTO,- TGetSecretAccessLocationsResponse,+ // TGetSecretAccessLocationsDTO,+ // TGetSecretAccessLocationsResponse,TGetSecretAccessVolumeDTO,TGetSecretAccessVolumeResponse} from "./types";@@ -21,8 +21,8 @@ export const secretInsightsKeys = {[...secretInsightsKeys.all(), "calendar-events", params] as const,accessVolume: (params: TGetSecretAccessVolumeDTO) =>[...secretInsightsKeys.all(), "access-volume", params] as const,- accessLocations: (params: TGetSecretAccessLocationsDTO) =>- [...secretInsightsKeys.all(), "access-locations", params] as const,+ // accessLocations: (params: TGetSecretAccessLocationsDTO) =>+ // [...secretInsightsKeys.all(), "access-locations", params] as const,authMethodDistribution: (params: TGetAuthMethodDistributionDTO) =>[...secretInsightsKeys.all(), "auth-method-distribution", params] as const,summary: (params: TGetInsightsSummaryDTO) =>@@ -83,31 +83,31 @@ export const useGetSecretAccessVolume = (});};-export const useGetSecretAccessLocations = (- params: TGetSecretAccessLocationsDTO,- options?: Omit<- UseQueryOptions<- TGetSecretAccessLocationsResponse,- unknown,- TGetSecretAccessLocationsResponse,- ReturnType<typeof secretInsightsKeys.accessLocations>- >,- "queryKey" | "queryFn"- >-) => {- return useQuery({- queryKey: secretInsightsKeys.accessLocations(params),- queryFn: async () => {- const { data } = await apiRequest.get<TGetSecretAccessLocationsResponse>(- "/api/v1/insights/secrets/access-locations",- { params }- );- return data;- },- staleTime: INSIGHTS_STALE_TIME,- ...options- });-};+// export const useGetSecretAccessLocations = (+// params: TGetSecretAccessLocationsDTO,+// options?: Omit<+// UseQueryOptions<+// TGetSecretAccessLocationsResponse,+// unknown,+// TGetSecretAccessLocationsResponse,+// ReturnType<typeof secretInsightsKeys.accessLocations>+// >,+// "queryKey" | "queryFn"+// >+// ) => {+// return useQuery({+// queryKey: secretInsightsKeys.accessLocations(params),+// queryFn: async () => {+// const { data } = await apiRequest.get<TGetSecretAccessLocationsResponse>(+// "/api/v1/insights/secrets/access-locations",+// { params }+// );+// return data;+// },+// staleTime: INSIGHTS_STALE_TIME,+// ...options+// });+// };export const useGetAuthMethodDistribution = (params: TGetAuthMethodDistributionDTO,diff --git a/frontend/src/pages/secret-manager/InsightsPage/InsightsPage.tsx b/frontend/src/pages/secret-manager/InsightsPage/InsightsPage.tsxindex 85bb2815e9..add4ba9c72 100644--- a/frontend/src/pages/secret-manager/InsightsPage/InsightsPage.tsx+++ b/frontend/src/pages/secret-manager/InsightsPage/InsightsPage.tsx@@ -16,8 +16,7 @@ import {AuthMethodChart,CalendarCard,InsightsSummaryCards,- SecretAccessChart,- WorldMap+ SecretAccessChart} from "./components";export const InsightsPage = withProjectPermission(@@ -44,7 +43,7 @@ export const InsightsPage = withProjectPermission(<InsightsSummaryCards /><div className="flex flex-col gap-6 xl:flex-row"><div className="mt-6 flex flex-[1.3] flex-col gap-6">- <WorldMap />+ {/* <WorldMap /> */}<CalendarCard /></div><div className="flex flex-1 flex-col gap-6 xl:mt-6">diff --git a/frontend/src/pages/secret-manager/InsightsPage/components/WorldMap.tsx b/frontend/src/pages/secret-manager/InsightsPage/components/WorldMap.tsxindex 2deae24068..fd236013c9 100644--- a/frontend/src/pages/secret-manager/InsightsPage/components/WorldMap.tsx+++ b/frontend/src/pages/secret-manager/InsightsPage/components/WorldMap.tsx@@ -1,348 +1,348 @@-import { useMemo, useState } from "react";-import { geoNaturalEarth1, geoPath } from "d3-geo";-import { feature } from "topojson-client";-import type { Topology } from "topojson-specification";+// import { useMemo, useState } from "react";+// import { geoNaturalEarth1, geoPath } from "d3-geo";+// import { feature } from "topojson-client";+// import type { Topology } from "topojson-specification";-import {- Badge,- Skeleton,- Tooltip,- TooltipContent,- TooltipProvider,- TooltipTrigger,- UnstableCard,- UnstableCardContent,- UnstableCardDescription,- UnstableCardHeader,- UnstableCardTitle-} from "@app/components/v3";-import { useProject } from "@app/context";-import { useGetSecretAccessLocations } from "@app/hooks/api";-import { TAccessLocation } from "@app/hooks/api/secretInsights/types";+// import {+// Badge,+// Skeleton,+// Tooltip,+// TooltipContent,+// TooltipProvider,+// TooltipTrigger,+// UnstableCard,+// UnstableCardContent,+// UnstableCardDescription,+// UnstableCardHeader,+// UnstableCardTitle+// } from "@app/components/v3";+// import { useProject } from "@app/context";+// import { useGetSecretAccessLocations } from "@app/hooks/api";+// import { TAccessLocation } from "@app/hooks/api/secretInsights/types";-import worldTopoJson from "./countries-110m.json";+// import worldTopoJson from "./countries-110m.json";-// ISO 3166-1 alpha-2 → numeric mapping (covers common countries; extend as needed)-/* eslint-disable @typescript-eslint/naming-convention */-const ALPHA2_TO_NUMERIC: Record<string, string> = {- AF: "004",- AL: "008",- DZ: "012",- AR: "032",- AU: "036",- AT: "040",- BD: "050",- BE: "056",- BR: "076",- BG: "100",- CA: "124",- CL: "152",- CN: "156",- CO: "170",- HR: "191",- CZ: "203",- DK: "208",- EG: "818",- EE: "233",- FI: "246",- FR: "250",- DE: "276",- GR: "300",- HK: "344",- HU: "348",- IN: "356",- ID: "360",- IR: "364",- IQ: "368",- IE: "372",- IL: "376",- IT: "380",- JP: "392",- KE: "404",- KR: "410",- LV: "428",- LT: "440",- MY: "458",- MX: "484",- MA: "504",- NL: "528",- NZ: "554",- NG: "566",- NO: "578",- PK: "586",- PE: "604",- PH: "608",- PL: "616",- PT: "620",- RO: "642",- RU: "643",- SA: "682",- SG: "702",- ZA: "710",- ES: "724",- SE: "752",- CH: "756",- TW: "158",- TH: "764",- TR: "792",- UA: "804",- AE: "784",- GB: "826",- US: "840",- VN: "704",- KZ: "398",- CY: "196"-};-/* eslint-enable @typescript-eslint/naming-convention */+// // ISO 3166-1 alpha-2 → numeric mapping (covers common countries; extend as needed)+// /* eslint-disable @typescript-eslint/naming-convention */+// const ALPHA2_TO_NUMERIC: Record<string, string> = {+// AF: "004",+// AL: "008",+// DZ: "012",+// AR: "032",+// AU: "036",+// AT: "040",+// BD: "050",+// BE: "056",+// BR: "076",+// BG: "100",+// CA: "124",+// CL: "152",+// CN: "156",+// CO: "170",+// HR: "191",+// CZ: "203",+// DK: "208",+// EG: "818",+// EE: "233",+// FI: "246",+// FR: "250",+// DE: "276",+// GR: "300",+// HK: "344",+// HU: "348",+// IN: "356",+// ID: "360",+// IR: "364",+// IQ: "368",+// IE: "372",+// IL: "376",+// IT: "380",+// JP: "392",+// KE: "404",+// KR: "410",+// LV: "428",+// LT: "440",+// MY: "458",+// MX: "484",+// MA: "504",+// NL: "528",+// NZ: "554",+// NG: "566",+// NO: "578",+// PK: "586",+// PE: "604",+// PH: "608",+// PL: "616",+// PT: "620",+// RO: "642",+// RU: "643",+// SA: "682",+// SG: "702",+// ZA: "710",+// ES: "724",+// SE: "752",+// CH: "756",+// TW: "158",+// TH: "764",+// TR: "792",+// UA: "804",+// AE: "784",+// GB: "826",+// US: "840",+// VN: "704",+// KZ: "398",+// CY: "196"+// };+// /* eslint-enable @typescript-eslint/naming-convention */-const MAX_RADIUS = 10;-const MIN_RADIUS = 3;+// const MAX_RADIUS = 10;+// const MIN_RADIUS = 3;-// Natural Earth 1 projection — trimmed left (before Hawaii), padded right-const SVG_WIDTH = 960;-const SVG_HEIGHT = 460;+// // Natural Earth 1 projection — trimmed left (before Hawaii), padded right+// const SVG_WIDTH = 960;+// const SVG_HEIGHT = 460;-const projection = geoNaturalEarth1()- .scale(170)- .translate([SVG_WIDTH / 2 - 25, SVG_HEIGHT / 2 + 5]);+// const projection = geoNaturalEarth1()+// .scale(170)+// .translate([SVG_WIDTH / 2 - 25, SVG_HEIGHT / 2 + 5]);-const pathGenerator = geoPath(projection);+// const pathGenerator = geoPath(projection);-const geoFeatures = (- feature(- worldTopoJson as unknown as Topology,- (worldTopoJson as unknown as Topology).objects.countries- ) as GeoJSON.FeatureCollection-).features;+// const geoFeatures = (+// feature(+// worldTopoJson as unknown as Topology,+// (worldTopoJson as unknown as Topology).objects.countries+// ) as GeoJSON.FeatureCollection+// ).features;-// Inactive country base: dark but visible against the card bg-const INACTIVE_FILL = "#242629";-// Stroke between countries-const BORDER_STROKE = "#3a3c40";-// Info color for active country gradient-const INFO_COLOR = "#63b0bd";+// // Inactive country base: dark but visible against the card bg+// const INACTIVE_FILL = "#242629";+// // Stroke between countries+// const BORDER_STROKE = "#3a3c40";+// // Info color for active country gradient+// const INFO_COLOR = "#63b0bd";-const ResponsiveWorldMap = ({- mapLocations,- countryActivity,- countryMaxCount,- getRadius-}: {- mapLocations: TAccessLocation[];- countryActivity: Map<string, number>;- countryMaxCount: number;- getRadius: (count: number) => number;-}) => {- const [hovered, setHovered] = useState<string | null>(null);+// const ResponsiveWorldMap = ({+// mapLocations,+// countryActivity,+// countryMaxCount,+// getRadius+// }: {+// mapLocations: TAccessLocation[];+// countryActivity: Map<string, number>;+// countryMaxCount: number;+// getRadius: (count: number) => number;+// }) => {+// const [hovered, setHovered] = useState<string | null>(null);- // Build gradient definitions for each active country- const activeCountryGradients = useMemo(() => {- const gradients: { id: string; topOpacity: number; bottomOpacity: number }[] = [];- countryActivity.forEach((count, numericCode) => {- const ratio = count / countryMaxCount;- // Top of gradient is brighter, bottom fades to the base- const topOpacity = 0.25 + ratio * 0.55; // 0.25 → 0.80- const bottomOpacity = 0.08 + ratio * 0.15; // 0.08 → 0.23- gradients.push({ id: numericCode, topOpacity, bottomOpacity });- });- return gradients;- }, [countryActivity, countryMaxCount]);+// // Build gradient definitions for each active country+// const activeCountryGradients = useMemo(() => {+// const gradients: { id: string; topOpacity: number; bottomOpacity: number }[] = [];+// countryActivity.forEach((count, numericCode) => {+// const ratio = count / countryMaxCount;+// // Top of gradient is brighter, bottom fades to the base+// const topOpacity = 0.25 + ratio * 0.55; // 0.25 → 0.80+// const bottomOpacity = 0.08 + ratio * 0.15; // 0.08 → 0.23+// gradients.push({ id: numericCode, topOpacity, bottomOpacity });+// });+// return gradients;+// }, [countryActivity, countryMaxCount]);- const getFill = (id: string, isHover: boolean) => {- const isActive = countryActivity.has(id);- if (isHover) {- return isActive ? `url(#grad-hover-${id})` : "#2f3136";- }- return isActive ? `url(#grad-${id})` : INACTIVE_FILL;- };+// const getFill = (id: string, isHover: boolean) => {+// const isActive = countryActivity.has(id);+// if (isHover) {+// return isActive ? `url(#grad-hover-${id})` : "#2f3136";+// }+// return isActive ? `url(#grad-${id})` : INACTIVE_FILL;+// };- return (- <div className="w-full overflow-hidden rounded-md border border-border bg-bunker-800/25">- <svg- viewBox={`0 0 ${SVG_WIDTH} ${SVG_HEIGHT}`}- className="h-auto w-full"- preserveAspectRatio="xMidYMid meet"- >- <defs>- {activeCountryGradients.map((g) => (- <linearGradient key={`grad-${g.id}`} id={`grad-${g.id}`} x1="0" y1="0" x2="0" y2="1">- <stop offset="0%" stopColor={INFO_COLOR} stopOpacity={g.topOpacity} />- <stop offset="100%" stopColor={INFO_COLOR} stopOpacity={g.bottomOpacity} />- </linearGradient>- ))}- {activeCountryGradients.map((g) => (- <linearGradient- key={`grad-hover-${g.id}`}- id={`grad-hover-${g.id}`}- x1="0"- y1="0"- x2="0"- y2="1"- >- <stop- offset="0%"- stopColor={INFO_COLOR}- stopOpacity={Math.min(g.topOpacity + 0.15, 1)}- />- <stop- offset="100%"- stopColor={INFO_COLOR}- stopOpacity={Math.min(g.bottomOpacity + 0.1, 0.5)}- />- </linearGradient>- ))}- </defs>- <g>- {geoFeatures.map((geo) => {- const id = String(geo.id ?? "");- const d = pathGenerator(geo) ?? "";- const isHover = hovered === id;- return (- <path- key={id}- d={d}- fill={getFill(id, isHover)}- stroke={BORDER_STROKE}- strokeWidth={0.5}- onMouseEnter={() => setHovered(id)}- onMouseLeave={() => setHovered(null)}- style={{ outline: "none", transition: "fill 0.15s, opacity 0.15s" }}- />- );- })}- </g>- <g>- {mapLocations.map((loc) => {- const coords = projection([loc.lng, loc.lat]);- if (!coords) return null;- return (- <Tooltip key={`${loc.city}:${loc.country}`}>- <TooltipTrigger asChild>- <circle- cx={coords[0]}- cy={coords[1]}- r={getRadius(loc.count)}- fill="color-mix(in srgb, var(--color-warning) 50%, transparent)"- stroke="var(--color-warning)"- strokeWidth={1}- className="cursor-pointer transition-opacity hover:opacity-80"- />- </TooltipTrigger>- <TooltipContent>- <p className="font-medium">- {loc.city ? `${loc.city}, ${loc.country}` : loc.country}- </p>- <p className="text-xs text-muted">- {loc.count.toLocaleString()} access{loc.count !== 1 ? "es" : ""}- </p>- </TooltipContent>- </Tooltip>- );- })}- </g>- </svg>- </div>- );-};+// return (+// <div className="w-full overflow-hidden rounded-md border border-border bg-bunker-800/25">+// <svg+// viewBox={`0 0 ${SVG_WIDTH} ${SVG_HEIGHT}`}+// className="h-auto w-full"+// preserveAspectRatio="xMidYMid meet"+// >+// <defs>+// {activeCountryGradients.map((g) => (+// <linearGradient key={`grad-${g.id}`} id={`grad-${g.id}`} x1="0" y1="0" x2="0" y2="1">+// <stop offset="0%" stopColor={INFO_COLOR} stopOpacity={g.topOpacity} />+// <stop offset="100%" stopColor={INFO_COLOR} stopOpacity={g.bottomOpacity} />+// </linearGradient>+// ))}+// {activeCountryGradients.map((g) => (+// <linearGradient+// key={`grad-hover-${g.id}`}+// id={`grad-hover-${g.id}`}+// x1="0"+// y1="0"+// x2="0"+// y2="1"+// >+// <stop+// offset="0%"+// stopColor={INFO_COLOR}+// stopOpacity={Math.min(g.topOpacity + 0.15, 1)}+// />+// <stop+// offset="100%"+// stopColor={INFO_COLOR}+// stopOpacity={Math.min(g.bottomOpacity + 0.1, 0.5)}+// />+// </linearGradient>+// ))}+// </defs>+// <g>+// {geoFeatures.map((geo) => {+// const id = String(geo.id ?? "");+// const d = pathGenerator(geo) ?? "";+// const isHover = hovered === id;+// return (+// <path+// key={id}+// d={d}+// fill={getFill(id, isHover)}+// stroke={BORDER_STROKE}+// strokeWidth={0.5}+// onMouseEnter={() => setHovered(id)}+// onMouseLeave={() => setHovered(null)}+// style={{ outline: "none", transition: "fill 0.15s, opacity 0.15s" }}+// />+// );+// })}+// </g>+// <g>+// {mapLocations.map((loc) => {+// const coords = projection([loc.lng, loc.lat]);+// if (!coords) return null;+// return (+// <Tooltip key={`${loc.city}:${loc.country}`}>+// <TooltipTrigger asChild>+// <circle+// cx={coords[0]}+// cy={coords[1]}+// r={getRadius(loc.count)}+// fill="color-mix(in srgb, var(--color-warning) 50%, transparent)"+// stroke="var(--color-warning)"+// strokeWidth={1}+// className="cursor-pointer transition-opacity hover:opacity-80"+// />+// </TooltipTrigger>+// <TooltipContent>+// <p className="font-medium">+// {loc.city ? `${loc.city}, ${loc.country}` : loc.country}+// </p>+// <p className="text-xs text-muted">+// {loc.count.toLocaleString()} access{loc.count !== 1 ? "es" : ""}+// </p>+// </TooltipContent>+// </Tooltip>+// );+// })}+// </g>+// </svg>+// </div>+// );+// };-export const WorldMap = () => {- const { projectId } = useProject();+// export const WorldMap = () => {+// const { projectId } = useProject();- const { data, isPending } = useGetSecretAccessLocations(- { projectId, days: 30 },- { enabled: !!projectId }- );+// const { data, isPending } = useGetSecretAccessLocations(+// { projectId, days: 30 },+// { enabled: !!projectId }+// );- const allLocations = data?.locations ?? [];+// const allLocations = data?.locations ?? [];- // Separate local network entries from geo-resolvable locations- const { mapLocations, localCount } = useMemo(() => {- const geo: TAccessLocation[] = [];- let local = 0;- allLocations.forEach((loc) => {- if (loc.country === "LOCAL") {- local += loc.count;- } else {- geo.push(loc);- }- });- return { mapLocations: geo, localCount: local };- }, [allLocations]);+// // Separate local network entries from geo-resolvable locations+// const { mapLocations, localCount } = useMemo(() => {+// const geo: TAccessLocation[] = [];+// let local = 0;+// allLocations.forEach((loc) => {+// if (loc.country === "LOCAL") {+// local += loc.count;+// } else {+// geo.push(loc);+// }+// });+// return { mapLocations: geo, localCount: local };+// }, [allLocations]);- // Aggregate total access count per country (numeric code) for choropleth fill- const { countryActivity, countryMaxCount } = useMemo(() => {- const activity = new Map<string, number>();- mapLocations.forEach((loc) => {- const numericCode = ALPHA2_TO_NUMERIC[loc.country];- if (!numericCode) return;- activity.set(numericCode, (activity.get(numericCode) || 0) + loc.count);- });- const maxVal = Math.max(...Array.from(activity.values()), 1);- return { countryActivity: activity, countryMaxCount: maxVal };- }, [mapLocations]);+// // Aggregate total access count per country (numeric code) for choropleth fill+// const { countryActivity, countryMaxCount } = useMemo(() => {+// const activity = new Map<string, number>();+// mapLocations.forEach((loc) => {+// const numericCode = ALPHA2_TO_NUMERIC[loc.country];+// if (!numericCode) return;+// activity.set(numericCode, (activity.get(numericCode) || 0) + loc.count);+// });+// const maxVal = Math.max(...Array.from(activity.values()), 1);+// return { countryActivity: activity, countryMaxCount: maxVal };+// }, [mapLocations]);- const maxCount = useMemo(() => Math.max(...mapLocations.map((l) => l.count), 1), [mapLocations]);+// const maxCount = useMemo(() => Math.max(...mapLocations.map((l) => l.count), 1), [mapLocations]);- const getRadius = (count: number) => {- const ratio = count / maxCount;- return MIN_RADIUS + ratio * (MAX_RADIUS - MIN_RADIUS);- };+// const getRadius = (count: number) => {+// const ratio = count / maxCount;+// return MIN_RADIUS + ratio * (MAX_RADIUS - MIN_RADIUS);+// };- const totalAccess = allLocations.reduce((sum, l) => sum + l.count, 0);+// const totalAccess = allLocations.reduce((sum, l) => sum + l.count, 0);- return (- <UnstableCard>- <UnstableCardHeader>- <UnstableCardTitle>Secret Access Locations</UnstableCardTitle>- <UnstableCardDescription>- Geographic distribution of secret access over the past 30 days- </UnstableCardDescription>- </UnstableCardHeader>- <UnstableCardContent>- {isPending ? (- <Skeleton- className="my-[0.5px] w-full rounded-md"- style={{ aspectRatio: `${SVG_WIDTH} / ${SVG_HEIGHT}` }}- />- ) : (- <TooltipProvider>- <ResponsiveWorldMap- mapLocations={mapLocations}- countryActivity={countryActivity}- countryMaxCount={countryMaxCount}- getRadius={getRadius}- />- {totalAccess > 0 && (- <div className="mt-3 -mb-2 flex flex-wrap items-center gap-3 text-xs">- {mapLocations.map((loc) => (- <span key={`${loc.city}:${loc.country}`} className="text-foreground">- <span className="text-muted">- {loc.city ? `${loc.city}, ${loc.country}` : loc.country}:- </span>{" "}- {loc.count.toLocaleString()}- </span>- ))}- {localCount > 0 && (- <Tooltip>- <TooltipTrigger asChild>- <Badge variant="neutral" className="ml-auto cursor-default">- Local Network: {localCount.toLocaleString()}- </Badge>- </TooltipTrigger>- <TooltipContent>- <p className="font-medium">Local / Private Network</p>- <p className="text-xs text-muted">- {localCount.toLocaleString()} access{localCount !== 1 ? "es" : ""} from- localhost, Docker, or private IP ranges (127.x, 10.x, 192.168.x)- </p>- </TooltipContent>- </Tooltip>- )}- </div>- )}- </TooltipProvider>- )}- </UnstableCardContent>- </UnstableCard>- );-};+// return (+// <UnstableCard>+// <UnstableCardHeader>+// <UnstableCardTitle>Secret Access Locations</UnstableCardTitle>+// <UnstableCardDescription>+// Geographic distribution of secret access over the past 30 days+// </UnstableCardDescription>+// </UnstableCardHeader>+// <UnstableCardContent>+// {isPending ? (+// <Skeleton+// className="my-[0.5px] w-full rounded-md"+// style={{ aspectRatio: `${SVG_WIDTH} / ${SVG_HEIGHT}` }}+// />+// ) : (+// <TooltipProvider>+// <ResponsiveWorldMap+// mapLocations={mapLocations}+// countryActivity={countryActivity}+// countryMaxCount={countryMaxCount}+// getRadius={getRadius}+// />+// {totalAccess > 0 && (+// <div className="mt-3 -mb-2 flex flex-wrap items-center gap-3 text-xs">+// {mapLocations.map((loc) => (+// <span key={`${loc.city}:${loc.country}`} className="text-foreground">+// <span className="text-muted">+// {loc.city ? `${loc.city}, ${loc.country}` : loc.country}:+// </span>{" "}+// {loc.count.toLocaleString()}+// </span>+// ))}+// {localCount > 0 && (+// <Tooltip>+// <TooltipTrigger asChild>+// <Badge variant="neutral" className="ml-auto cursor-default">+// Local Network: {localCount.toLocaleString()}+// </Badge>+// </TooltipTrigger>+// <TooltipContent>+// <p className="font-medium">Local / Private Network</p>+// <p className="text-xs text-muted">+// {localCount.toLocaleString()} access{localCount !== 1 ? "es" : ""} from+// localhost, Docker, or private IP ranges (127.x, 10.x, 192.168.x)+// </p>+// </TooltipContent>+// </Tooltip>+// )}+// </div>+// )}+// </TooltipProvider>+// )}+// </UnstableCardContent>+// </UnstableCard>+// );+// };diff --git a/frontend/src/pages/secret-manager/InsightsPage/components/index.ts b/frontend/src/pages/secret-manager/InsightsPage/components/index.tsindex d062302f05..a9930b1066 100644--- a/frontend/src/pages/secret-manager/InsightsPage/components/index.ts+++ b/frontend/src/pages/secret-manager/InsightsPage/components/index.ts@@ -5,4 +5,4 @@ export { CalendarLegend } from "./CalendarLegend";export { InsightsSummaryCards } from "./InsightsSummaryCards";export { SecretAccessChart } from "./SecretAccessChart";export type { CalendarEvent } from "./types";-export { WorldMap } from "./WorldMap";+// export { WorldMap } from "./WorldMap";