diff --git a/.editorconfig b/.editorconfig index f76666a28..29c51930b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,13 +3,27 @@ # top-most EditorConfig file root = true -# Unix-style newlines with a newline ending every file +# Don't use tabs for indentation. [*] +indent_size = 4 +indent_style = space +tab_width = 4 end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true insert_final_newline = true +guidelines = 120 -# Set default charset -[*.{js,ts,scss,html}] -charset = utf-8 -indent_style = space +# JSON files +[*.json] +indent_size = 2 + +# JS files +[*.{js,cjs,mjs,ts,scss,html}] +indent_size = 2 + +[*.{ts}] +quote_type = single + +[*.{scss,css,yml}] indent_size = 2 diff --git a/.gitattributes b/.gitattributes index 1ff0c4230..6313b56c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,63 +1 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### -* text=auto - -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp - -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary - -############################################################################### -# behavior for image files -# -# image files are treated as binary by default. -############################################################################### -#*.jpg binary -#*.png binary -#*.gif binary - -############################################################################### -# diff behavior for common document formats -# -# Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the -# entries below. -############################################################################### -#*.doc diff=astextplain -#*.DOC diff=astextplain -#*.docx diff=astextplain -#*.DOCX diff=astextplain -#*.dot diff=astextplain -#*.DOT diff=astextplain -#*.pdf diff=astextplain -#*.PDF diff=astextplain -#*.rtf diff=astextplain -#*.RTF diff=astextplain +* text=auto eol=lf diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 4121ec5da..5f3c205ca 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,10 +1,10 @@ { $schema: "https://docs.renovatebot.com/renovate-schema.json", extends: ["github>bitwarden/renovate-config"], - enabledManagers: ["github-actions", "npm"], + enabledManagers: ["docker-compose", "github-actions", "npm"], packageRules: [ { - groupName: "gh minor", + groupName: "github-action minor", matchManagers: ["github-actions"], matchUpdateTypes: ["minor", "patch"], }, diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index f81088b2c..965190d01 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -5,6 +5,8 @@ on: push: branches: - "main" + - "rc" + - "hotfix-rc" pull_request: types: [opened, synchronize, reopened] branches-ignore: diff --git a/.prettierrc.json b/.prettierrc.json index de753c537..1d43a318a 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,3 +1,4 @@ { - "printWidth": 100 + "printWidth": 100, + "tabWidth": 2 } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f05a0382f..2833057bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,3 @@ -Code contributions are welcome! Please commit any pull requests against the `master` branch. +# How to Contribute -# Localization (l10n) - -[![Crowdin](https://d322cqt584bo4o.cloudfront.net/bitwarden-desktop/localized.svg)](https://crowdin.com/project/bitwarden-desktop) - -We use a translation tool called [Crowdin](https://crowdin.com) to help manage our localization efforts across many different languages. - -If you are interested in helping translate the Bitwarden desktop app into another language (or make a translation correction), please register an account at Crowdin and join our project here: https://crowdin.com/project/bitwarden-desktop - -If the language that you are interested in translating is not already listed, create a new account on Crowdin, join the project, and contact the project owner (https://crowdin.com/mail/compose/kspearrin). - -You can read Crowdin's getting started guide for translators here: https://support.crowdin.com/crowdin-intro/ +Our [Contributing Guidelines](https://contributing.bitwarden.com/contributing/) are located in our [Contributing Documentation](https://contributing.bitwarden.com/). The documentation also includes recommended tooling, code style tips, and lots of other great information to get you started. diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 7a70e7be6..000000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/SECURITY.md b/SECURITY.md index e6edb96da..b2a37f699 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,11 +1,19 @@ -Bitwarden believes that working with security researchers across the globe is crucial to keeping our users safe. If you believe you've found a security issue in our product or service, we encourage you to please submit a report through our [HackerOne Program](https://hackerone.com/bitwarden/). We welcome working with you to resolve the issue promptly. Thanks in advance! +Bitwarden believes that working with security researchers across the globe is crucial to keeping our +users safe. If you believe you've found a security issue in our product or service, we encourage you +to please submit a report through our [HackerOne Program](https://hackerone.com/bitwarden/). We +welcome working with you to resolve the issue promptly. Thanks in advance! # Disclosure Policy -- Let us know as soon as possible upon discovery of a potential security issue, and we'll make every effort to quickly resolve the issue. -- Provide us a reasonable amount of time to resolve the issue before any disclosure to the public or a third-party. We may publicly disclose the issue before resolving it, if appropriate. -- Make a good faith effort to avoid privacy violations, destruction of data, and interruption or degradation of our service. Only interact with accounts you own or with explicit permission of the account holder. -- If you would like to encrypt your report, please use the PGP key with long ID `0xDE6887086F892325FEC04CC0D847525B6931381F` (available in the public keyserver pool). +- Let us know as soon as possible upon discovery of a potential security issue, and we'll make every + effort to quickly resolve the issue. +- Provide us a reasonable amount of time to resolve the issue before any disclosure to the public or + a third-party. We may publicly disclose the issue before resolving it, if appropriate. +- Make a good faith effort to avoid privacy violations, destruction of data, and interruption or + degradation of our service. Only interact with accounts you own or with explicit permission of the + account holder. +- If you would like to encrypt your report, please use the PGP key with long ID + `0xDE6887086F892325FEC04CC0D847525B6931381F` (available in the public keyserver pool). While researching, we'd like to ask you to refrain from: @@ -16,6 +24,9 @@ While researching, we'd like to ask you to refrain from: # We want to help you! -If you have something that you feel is close to exploitation, or if you'd like some information regarding the internal API, or generally have any questions regarding the app that would help in your efforts, please email us at https://bitwarden.com/contact and ask for that information. As stated above, Bitwarden wants to help you find issues, and is more than willing to help. +If you have something that you feel is close to exploitation, or if you'd like some information +regarding the internal API, or generally have any questions regarding the app that would help in +your efforts, please email us at https://bitwarden.com/contact and ask for that information. As +stated above, Bitwarden wants to help you find issues, and is more than willing to help. Thank you for helping keep Bitwarden and our users safe! diff --git a/package.json b/package.json index 015508e55..8cd77c3c9 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "publish:mac": "npm run build:dist && npm run clean:dist && electron-builder --mac -p always", "publish:win": "npm run build:dist && npm run clean:dist && electron-builder --win --x64 --ia32 -p always -c.win.certificateSubjectName=\"8bit Solutions LLC\"", "prettier": "prettier --write .", - "prepare": "husky install", + "prepare": "husky", "test": "jest --testPathIgnorePatterns=.integration.spec.ts", "test:watch": "jest --watch --testPathIgnorePatterns=.integration.spec.ts", "test:watch:all": "jest --watchAll --testPathIgnorePatterns=.integration.spec.ts",