From 3a909b2fa4870b7322c64105a8da87aac852009d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:57:01 +0100 Subject: [PATCH 1/6] [deps] Tools: Update electron to v28 (#7132) * [deps] Tools: Update electron to v28 * Update electron-builder 27.2.0 to 28.1.0 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel James Smith --- apps/desktop/electron-builder.json | 2 +- package-lock.json | 8 ++++---- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/desktop/electron-builder.json b/apps/desktop/electron-builder.json index 4275603d1a..7687716c2d 100644 --- a/apps/desktop/electron-builder.json +++ b/apps/desktop/electron-builder.json @@ -19,7 +19,7 @@ "**/node_modules/@bitwarden/desktop-native/index.js", "**/node_modules/@bitwarden/desktop-native/desktop_native.${platform}-${arch}*.node" ], - "electronVersion": "27.2.0", + "electronVersion": "28.1.0", "generateUpdatesFilesForAllChannels": true, "publish": { "provider": "generic", diff --git a/package-lock.json b/package-lock.json index 3c32b4917d..872fd01b54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -127,7 +127,7 @@ "copy-webpack-plugin": "11.0.0", "cross-env": "7.0.3", "css-loader": "6.8.1", - "electron": "27.2.0", + "electron": "28.1.0", "electron-builder": "23.6.0", "electron-log": "5.0.1", "electron-reload": "2.0.0-alpha.1", @@ -19203,9 +19203,9 @@ } }, "node_modules/electron": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-27.2.0.tgz", - "integrity": "sha512-no/iMICVLI/5G0IqgKFbB89HDN88DWwKeRO+dPfJPkpJISdEX8Cx/sMEOFuuRa4VNInNe5CKCqRWExK5z3AdcQ==", + "version": "28.1.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-28.1.0.tgz", + "integrity": "sha512-82Y7o4PSWPn1o/aVwYPsgmBw6Gyf2lVHpaBu3Ef8LrLWXxytg7ZRZr/RtDqEMOzQp3+mcuy3huH84MyjdmP50Q==", "dev": true, "hasInstallScript": true, "dependencies": { diff --git a/package.json b/package.json index 2df5df750c..ee1e192b2a 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "copy-webpack-plugin": "11.0.0", "cross-env": "7.0.3", "css-loader": "6.8.1", - "electron": "27.2.0", + "electron": "28.1.0", "electron-builder": "23.6.0", "electron-log": "5.0.1", "electron-reload": "2.0.0-alpha.1", From a5913a20fe994d1e2e5cb39573f2a7610a74961f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 06:32:08 -0800 Subject: [PATCH 2/6] [deps] SM: Update eslint-plugin-tailwindcss to v3.13.1 (#7423) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 872fd01b54..d4101c336a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -140,7 +140,7 @@ "eslint-plugin-rxjs": "5.0.3", "eslint-plugin-rxjs-angular": "2.0.1", "eslint-plugin-storybook": "0.6.15", - "eslint-plugin-tailwindcss": "3.13.0", + "eslint-plugin-tailwindcss": "3.13.1", "gulp": "4.0.2", "gulp-filter": "9.0.1", "gulp-if": "3.0.0", @@ -20200,9 +20200,9 @@ } }, "node_modules/eslint-plugin-tailwindcss": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.13.0.tgz", - "integrity": "sha512-Fcep4KDRLWaK3KmkQbdyKHG0P4GdXFmXdDaweTIPcgOP60OOuWFbh1++dufRT28Q4zpKTKaHwTsXPJ4O/EjU2Q==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.13.1.tgz", + "integrity": "sha512-2Nlgr9doO6vFAG9w4iGU0sspWXuzypfng10HTF+dFS2NterhweWtgdRvf/f7aaoOUUxVZM8wMIXzazrZ7CxyeA==", "dev": true, "dependencies": { "fast-glob": "^3.2.5", diff --git a/package.json b/package.json index ee1e192b2a..a80a3e1b75 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "eslint-plugin-rxjs": "5.0.3", "eslint-plugin-rxjs-angular": "2.0.1", "eslint-plugin-storybook": "0.6.15", - "eslint-plugin-tailwindcss": "3.13.0", + "eslint-plugin-tailwindcss": "3.13.1", "gulp": "4.0.2", "gulp-filter": "9.0.1", "gulp-if": "3.0.0", From 32ac6db060dab1b7b2485014fa30e21e6eaa21b6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 07:04:15 -0800 Subject: [PATCH 3/6] [deps] SM: Update typescript-eslint monorepo to v6.17.0 (#7424) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 122 +++++++++++++++++++++++----------------------- package.json | 4 +- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4101c336a..182a7bd6a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -115,8 +115,8 @@ "@types/react": "16.14.54", "@types/retry": "0.12.2", "@types/zxcvbn": "4.4.4", - "@typescript-eslint/eslint-plugin": "6.16.0", - "@typescript-eslint/parser": "6.16.0", + "@typescript-eslint/eslint-plugin": "6.17.0", + "@typescript-eslint/parser": "6.17.0", "@webcomponents/custom-elements": "1.6.0", "autoprefixer": "10.4.16", "base64-loader": "1.0.0", @@ -13454,16 +13454,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz", - "integrity": "sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz", + "integrity": "sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/type-utils": "6.16.0", - "@typescript-eslint/utils": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/type-utils": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -13489,13 +13489,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.16.0.tgz", - "integrity": "sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz", + "integrity": "sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0" + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -13506,13 +13506,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.16.0.tgz", - "integrity": "sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz", + "integrity": "sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.16.0", - "@typescript-eslint/utils": "6.16.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/utils": "6.17.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -13533,9 +13533,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.16.0.tgz", - "integrity": "sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.17.0.tgz", + "integrity": "sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -13546,13 +13546,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.16.0.tgz", - "integrity": "sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz", + "integrity": "sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -13574,17 +13574,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.16.0.tgz", - "integrity": "sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.17.0.tgz", + "integrity": "sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/typescript-estree": "6.16.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", "semver": "^7.5.4" }, "engines": { @@ -13599,12 +13599,12 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.16.0.tgz", - "integrity": "sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz", + "integrity": "sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/types": "6.17.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -13707,15 +13707,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.16.0.tgz", - "integrity": "sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.17.0.tgz", + "integrity": "sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/typescript-estree": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", "debug": "^4.3.4" }, "engines": { @@ -13735,13 +13735,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.16.0.tgz", - "integrity": "sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz", + "integrity": "sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0" + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -13752,9 +13752,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.16.0.tgz", - "integrity": "sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.17.0.tgz", + "integrity": "sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -13765,13 +13765,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.16.0.tgz", - "integrity": "sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz", + "integrity": "sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -13793,12 +13793,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.16.0.tgz", - "integrity": "sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==", + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz", + "integrity": "sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/types": "6.17.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/package.json b/package.json index a80a3e1b75..904868a056 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "@types/react": "16.14.54", "@types/retry": "0.12.2", "@types/zxcvbn": "4.4.4", - "@typescript-eslint/eslint-plugin": "6.16.0", - "@typescript-eslint/parser": "6.16.0", + "@typescript-eslint/eslint-plugin": "6.17.0", + "@typescript-eslint/parser": "6.17.0", "@webcomponents/custom-elements": "1.6.0", "autoprefixer": "10.4.16", "base64-loader": "1.0.0", From 364e23d8a55d0f30f5cdf9fb2556f1263b6613e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ch=C4=99ci=C5=84ski?= Date: Wed, 3 Jan 2024 16:48:51 +0100 Subject: [PATCH 4/6] [DEVOPS-1656] Update Web build workflow to automatically trigger DevTest deploy (#7307) --- .github/workflows/build-web.yml | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml index 7fc9a9f7a6..7172ecb520 100644 --- a/.github/workflows/build-web.yml +++ b/.github/workflows/build-web.yml @@ -292,6 +292,39 @@ jobs: upload_sources: true upload_translations: false + trigger-web-vault-deploy: + name: Trigger web vault deploy + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-22.04 + needs: build-artifacts + steps: + - name: Login to Azure - CI Subscription + uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 + with: + creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} + + - name: Retrieve github PAT secrets + id: retrieve-secret-pat + uses: bitwarden/gh-actions/get-keyvault-secrets@main + with: + keyvault: "bitwarden-ci" + secrets: "github-pat-bitwarden-devops-bot-repo-scope" + + - name: Trigger web vault deploy + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + with: + github-token: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }} + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: 'bitwarden', + repo: 'clients', + workflow_id: 'deploy-web.yml', + ref: 'main', + inputs: { + environment: 'USDEV', + tag: 'main' + } + }) check-failures: name: Check for failures @@ -303,6 +336,7 @@ jobs: - build-artifacts - build-containers - crowdin-push + - trigger-web-vault-deploy steps: - name: Check if any job failed if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/rc') }} @@ -312,6 +346,7 @@ jobs: ARTIFACT_STATUS: ${{ needs.build-artifacts.result }} BUILD_CONTAINERS_STATUS: ${{ needs.build-containers.result }} CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }} + TRIGGER_WEB_VAULT_DEPLOY_STATUS: ${{ needs.trigger-web-vault-deploy.result }} run: | if [ "$CLOC_STATUS" = "failure" ]; then exit 1 @@ -325,6 +360,8 @@ jobs: exit 1 elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then exit 1 + elif [ "$TRIGGER_WEB_VAULT_DEPLOY_STATUS" = "failure" ]; then + exit 1 fi - name: Login to Azure - Prod Subscription From 1b4717a78fbd61d040f84c685f77242d463c21e7 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Wed, 3 Jan 2024 19:20:17 +0100 Subject: [PATCH 5/6] [PM-3343] Capture TOTP QR codes from websites in the browser extension (#5985) * Implement totp capture for browser extensions --- apps/browser/src/_locales/en/messages.json | 15 ++++++ apps/browser/src/manifest.json | 1 + apps/browser/src/manifest.v3.json | 1 + .../src/platform/browser/browser-api.ts | 6 +++ .../components/vault/add-edit.component.html | 49 ++++++++++++++----- .../components/vault/add-edit.component.ts | 24 +++++++++ .../src/vault/app/vault/add-edit.component.ts | 2 + .../emergency-add-edit-cipher.component.ts | 2 + .../individual-vault/add-edit.component.ts | 8 ++- .../app/vault/org-vault/add-edit.component.ts | 2 + .../vault/components/add-edit.component.ts | 25 ++++++++++ package-lock.json | 14 ++++++ package.json | 1 + 13 files changed, 136 insertions(+), 14 deletions(-) diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index dfbda4c1b2..9fb10bb0ba 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -326,6 +326,9 @@ "password": { "message": "Password" }, + "totp": { + "message": "Authenticator secret" + }, "passphrase": { "message": "Passphrase" }, @@ -512,6 +515,18 @@ "autofillError": { "message": "Unable to auto-fill the selected item on this page. Copy and paste the information instead." }, + "totpCaptureError": { + "message": "Unable to scan QR code from the current webpage" + }, + "totpCaptureSuccess": { + "message": "Authenticator key added" + }, + "totpCapture": { + "message": "Scan authenticator QR code from current webpage" + }, + "copyTOTP": { + "message": "Copy Authenticator key (TOTP)" + }, "loggedOut": { "message": "Logged out" }, diff --git a/apps/browser/src/manifest.json b/apps/browser/src/manifest.json index 7022b38962..41d70d3116 100644 --- a/apps/browser/src/manifest.json +++ b/apps/browser/src/manifest.json @@ -56,6 +56,7 @@ "default_popup": "popup/index.html" }, "permissions": [ + "", "tabs", "contextMenus", "storage", diff --git a/apps/browser/src/manifest.v3.json b/apps/browser/src/manifest.v3.json index dad4524c4e..67f65599e0 100644 --- a/apps/browser/src/manifest.v3.json +++ b/apps/browser/src/manifest.v3.json @@ -59,6 +59,7 @@ "default_popup": "popup/index.html" }, "permissions": [ + "", "tabs", "contextMenus", "storage", diff --git a/apps/browser/src/platform/browser/browser-api.ts b/apps/browser/src/platform/browser/browser-api.ts index aaab7e113a..229d993fb6 100644 --- a/apps/browser/src/platform/browser/browser-api.ts +++ b/apps/browser/src/platform/browser/browser-api.ts @@ -413,6 +413,12 @@ export class BrowserApi { return win.opr?.sidebarAction || browser.sidebarAction; } + static captureVisibleTab(): Promise { + return new Promise((resolve) => { + chrome.tabs.captureVisibleTab(null, { format: "png" }, resolve); + }); + } + /** * Extension API helper method used to execute a script in a tab. * @see https://developer.chrome.com/docs/extensions/reference/tabs/#method-executeScript diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.html b/apps/browser/src/vault/popup/components/vault/add-edit.component.html index 78635ac482..33f3fc3a4f 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit.component.html +++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.html @@ -146,20 +146,45 @@ -
- - +
+
+ + +
+
+ + +
+
diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts index 8ada1a36df..2f89d09b8c 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts +++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts @@ -1,6 +1,7 @@ import { DatePipe, Location } from "@angular/common"; import { Component } from "@angular/core"; import { ActivatedRoute, Router } from "@angular/router"; +import qrcodeParser from "qrcode-parser"; import { firstValueFrom } from "rxjs"; import { first } from "rxjs/operators"; @@ -84,6 +85,7 @@ export class AddEditComponent extends BaseAddEditComponent { organizationService, sendApiService, dialogService, + window, datePipe, ); } @@ -342,4 +344,26 @@ export class AddEditComponent extends BaseAddEditComponent { this.singleActionKey || VaultPopoutType.addEditVaultItem, ); } + + async captureTOTPFromTab() { + try { + const screenshot = await BrowserApi.captureVisibleTab(); + const data = await qrcodeParser(screenshot); + const url = new URL(data.toString()); + if (url.protocol == "otpauth:" && url.searchParams.has("secret")) { + this.cipher.login.totp = data.toString(); + this.platformUtilsService.showToast( + "success", + null, + this.i18nService.t("totpCaptureSuccess") + ); + } + } catch (e) { + this.platformUtilsService.showToast( + "error", + this.i18nService.t("errorOccurred"), + this.i18nService.t("totpCaptureError") + ); + } + } } diff --git a/apps/desktop/src/vault/app/vault/add-edit.component.ts b/apps/desktop/src/vault/app/vault/add-edit.component.ts index d786ba21d2..31f7abddd7 100644 --- a/apps/desktop/src/vault/app/vault/add-edit.component.ts +++ b/apps/desktop/src/vault/app/vault/add-edit.component.ts @@ -47,6 +47,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges, organizationService: OrganizationService, sendApiService: SendApiService, dialogService: DialogService, + window: Window, datePipe: DatePipe, ) { super( @@ -65,6 +66,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges, organizationService, sendApiService, dialogService, + window, datePipe, ); } diff --git a/apps/web/src/app/auth/settings/emergency-access/view/emergency-add-edit-cipher.component.ts b/apps/web/src/app/auth/settings/emergency-access/view/emergency-add-edit-cipher.component.ts index 146d12e734..29c13d2289 100644 --- a/apps/web/src/app/auth/settings/emergency-access/view/emergency-add-edit-cipher.component.ts +++ b/apps/web/src/app/auth/settings/emergency-access/view/emergency-add-edit-cipher.component.ts @@ -49,6 +49,7 @@ export class EmergencyAddEditCipherComponent extends BaseAddEditComponent { logService: LogService, sendApiService: SendApiService, dialogService: DialogService, + window: Window, datePipe: DatePipe, ) { super( @@ -69,6 +70,7 @@ export class EmergencyAddEditCipherComponent extends BaseAddEditComponent { passwordRepromptService, sendApiService, dialogService, + window, datePipe, ); } diff --git a/apps/web/src/app/vault/individual-vault/add-edit.component.ts b/apps/web/src/app/vault/individual-vault/add-edit.component.ts index 839555f697..3ebe84f2b5 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit.component.ts +++ b/apps/web/src/app/vault/individual-vault/add-edit.component.ts @@ -61,6 +61,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On passwordRepromptService: PasswordRepromptService, sendApiService: SendApiService, dialogService: DialogService, + window: Window, datePipe: DatePipe, ) { super( @@ -79,6 +80,7 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On organizationService, sendApiService, dialogService, + window, datePipe, ); } @@ -142,9 +144,9 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On this.platformUtilsService.launchUri(uri.launchUri); } - copy(value: string, typeI18nKey: string, aType: string) { + async copy(value: string, typeI18nKey: string, aType: string): Promise { if (value == null) { - return; + return false; } this.platformUtilsService.copyToClipboard(value, { window: window }); @@ -166,6 +168,8 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On ); } } + + return true; } async generatePassword(): Promise { diff --git a/apps/web/src/app/vault/org-vault/add-edit.component.ts b/apps/web/src/app/vault/org-vault/add-edit.component.ts index 551e21263d..96d498de9a 100644 --- a/apps/web/src/app/vault/org-vault/add-edit.component.ts +++ b/apps/web/src/app/vault/org-vault/add-edit.component.ts @@ -51,6 +51,7 @@ export class AddEditComponent extends BaseAddEditComponent { organizationService: OrganizationService, sendApiService: SendApiService, dialogService: DialogService, + window: Window, datePipe: DatePipe, ) { super( @@ -71,6 +72,7 @@ export class AddEditComponent extends BaseAddEditComponent { passwordRepromptService, sendApiService, dialogService, + window, datePipe, ); } diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index 6b903383fb..eac1c4c518 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -111,6 +111,7 @@ export class AddEditComponent implements OnInit, OnDestroy { private organizationService: OrganizationService, protected sendApiService: SendApiService, protected dialogService: DialogService, + protected win: Window, protected datePipe: DatePipe, ) { this.typeOptions = [ @@ -653,4 +654,28 @@ export class AddEditComponent implements OnInit, OnDestroy { return loadedSavedInfo; } + + async copy(value: string, typeI18nKey: string, aType: string): Promise { + if (value == null) { + return false; + } + + const copyOptions = this.win != null ? { window: this.win } : null; + this.platformUtilsService.copyToClipboard(value, copyOptions); + this.platformUtilsService.showToast( + "info", + null, + this.i18nService.t("valueCopied", this.i18nService.t(typeI18nKey)) + ); + + if (typeI18nKey === "password") { + this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, this.cipherId); + } else if (typeI18nKey === "securityCode") { + this.eventCollectionService.collect(EventType.Cipher_ClientCopiedCardCode, this.cipherId); + } else if (aType === "H_Field") { + this.eventCollectionService.collect(EventType.Cipher_ClientCopiedHiddenField, this.cipherId); + } + + return true; + } } diff --git a/package-lock.json b/package-lock.json index 182a7bd6a0..20655f45ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,6 +62,7 @@ "patch-package": "8.0.0", "popper.js": "1.16.1", "proper-lockfile": "4.1.2", + "qrcode-parser": "^2.1.3", "qrious": "4.0.2", "rxjs": "7.8.1", "tabbable": "6.2.0", @@ -26776,6 +26777,11 @@ "node >= 0.2.0" ] }, + "node_modules/jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" + }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -32998,6 +33004,14 @@ ], "peer": true }, + "node_modules/qrcode-parser": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/qrcode-parser/-/qrcode-parser-2.1.3.tgz", + "integrity": "sha512-tyakoHUQXCjH1+RGiqxH3/6XqbQuXuSaW0CkUp1AlYT0+XA4ndG7bxxyyWpdnr0Z2Vuv0GRwgKSq6sOzNiQfog==", + "dependencies": { + "jsqr": "^1.4.0" + } + }, "node_modules/qrious": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/qrious/-/qrious-4.0.2.tgz", diff --git a/package.json b/package.json index 904868a056..cfd919bb1f 100644 --- a/package.json +++ b/package.json @@ -197,6 +197,7 @@ "patch-package": "8.0.0", "popper.js": "1.16.1", "proper-lockfile": "4.1.2", + "qrcode-parser": "^2.1.3", "qrious": "4.0.2", "rxjs": "7.8.1", "tabbable": "6.2.0", From eebd10dfd0eb93d8e5639982ab6f4030e0f3d19e Mon Sep 17 00:00:00 2001 From: Jason Ng Date: Wed, 3 Jan 2024 15:36:48 -0500 Subject: [PATCH 6/6] linting failures from community pr update (#7434) --- .../src/vault/popup/components/vault/add-edit.component.ts | 4 ++-- libs/angular/src/vault/components/add-edit.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts index 2f89d09b8c..6960fc6dff 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit.component.ts +++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.ts @@ -355,14 +355,14 @@ export class AddEditComponent extends BaseAddEditComponent { this.platformUtilsService.showToast( "success", null, - this.i18nService.t("totpCaptureSuccess") + this.i18nService.t("totpCaptureSuccess"), ); } } catch (e) { this.platformUtilsService.showToast( "error", this.i18nService.t("errorOccurred"), - this.i18nService.t("totpCaptureError") + this.i18nService.t("totpCaptureError"), ); } } diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index eac1c4c518..ad5359a3c7 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -665,7 +665,7 @@ export class AddEditComponent implements OnInit, OnDestroy { this.platformUtilsService.showToast( "info", null, - this.i18nService.t("valueCopied", this.i18nService.t(typeI18nKey)) + this.i18nService.t("valueCopied", this.i18nService.t(typeI18nKey)), ); if (typeI18nKey === "password") {