Skip to content

Commit 188f126

Browse files
committed
Merge branch 'main' of github.com:bitwarden/contributing-docs into ps/migrations
# Conflicts: # docs/getting-started/server/database/mssql/index.md
2 parents e91c759 + 440bf8a commit 188f126

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6091
-3189
lines changed

Diff for: .env.example

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
HTTPS=true
2+
3+
# Generate via ./scripts/generate-certs, or mkcert
4+
# (see: https://docusaurus.io/docs/cli#enabling-https)
5+
SSL_CRT_FILE=ssl.crt
6+
SSL_KEY_FILE=ssl.key

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+32-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1-
## Objective
1+
## 🎟️ Tracking
22

3-
<!--Describe what the purpose of this PR is.-->
3+
<!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. -->
4+
5+
## 📔 Objective
6+
7+
<!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. -->
8+
9+
## ⏰ Reminders before review
10+
11+
- Contributor guidelines followed
12+
- All formatters and local linters executed and passed
13+
- Written new unit and / or integration tests where applicable
14+
- Protected functional changes with optionality (feature flags)
15+
- Used internationalization (i18n) for all UI strings
16+
- CI builds passed
17+
- Communicated to DevOps any deployment requirements
18+
- Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
19+
team
20+
21+
## 🦮 Reviewer guidelines
22+
23+
<!-- Suggested interactions but feel free to use (or not) as you desire! -->
24+
25+
- 👍 (`:+1:`) or similar for great changes
26+
- 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info
27+
- ❓ (`:question:`) for questions
28+
- 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed
29+
issue and could potentially benefit from discussion
30+
- 🎨 (`:art:`) for suggestions / improvements
31+
- ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention
32+
- 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt
33+
- ⛏ (`:pick:`) for minor or nitpick changes

Diff for: .github/renovate.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": ["github>bitwarden/renovate-config"],
4-
"enabledManagers": ["github-actions", "npm"],
4+
"enabledManagers": ["github-actions", "npm", "nvm"],
55
"packageRules": [
66
{
77
"groupName": "gh minor",

Diff for: .github/workflows/build.yml

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
1-
---
21
name: Build
32

43
on:
54
push:
65
paths-ignore:
76
- ".github/workflows/**"
87
workflow_dispatch:
9-
inputs: {}
10-
11-
defaults:
12-
run:
13-
shell: bash
148

159
jobs:
1610
lint:
1711
name: Build
1812
runs-on: ubuntu-22.04
13+
1914
steps:
20-
- name: Checkout repo
21-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
15+
- name: Check out repo
16+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2217

2318
- name: Set up Node
2419
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2520
with:
2621
cache: "npm"
2722
cache-dependency-path: "**/package-lock.json"
28-
node-version: "18"
2923

3024
- name: Build
3125
run: |

Diff for: .github/workflows/lint.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
1-
---
21
name: Lint
32

43
on:
54
push:
65
paths-ignore:
76
- ".github/workflows/**"
87
workflow_dispatch:
9-
inputs: {}
10-
11-
defaults:
12-
run:
13-
shell: bash
148

159
jobs:
1610
lint:
1711
name: Lint
1812
runs-on: ubuntu-22.04
13+
1914
steps:
20-
- name: Checkout repo
21-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
15+
- name: Check out repo
16+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2217

2318
- name: Set up Node
2419
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2520
with:
2621
cache: "npm"
2722
cache-dependency-path: "**/package-lock.json"
28-
node-version: "18"
2923

30-
- name: Run linter and spellcheck
24+
- name: Lint and spellcheck
3125
run: |
3226
npm ci
3327
npm run lint

Diff for: .github/workflows/scan.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Scan
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "main"
8+
pull_request_target:
9+
types: [opened, synchronize]
10+
11+
jobs:
12+
check-run:
13+
name: Check PR run
14+
uses: bitwarden/gh-actions/.github/workflows/check-run.yml@main
15+
16+
sast:
17+
name: SAST scan
18+
runs-on: ubuntu-22.04
19+
needs: check-run
20+
permissions:
21+
contents: read
22+
pull-requests: write
23+
security-events: write
24+
25+
steps:
26+
- name: Check out repo
27+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
with:
29+
ref: ${{ github.event.pull_request.head.sha }}
30+
31+
- name: Scan with Checkmarx
32+
uses: checkmarx/ast-github-action@92b6d52097badece63efe997ffe75207010bb80c # 2.0.29
33+
env:
34+
INCREMENTAL:
35+
"${{ contains(github.event_name, 'pull_request') && '--sast-incremental' || '' }}"
36+
with:
37+
project_name: ${{ github.repository }}
38+
cx_tenant: ${{ secrets.CHECKMARX_TENANT }}
39+
base_uri: https://ast.checkmarx.net/
40+
cx_client_id: ${{ secrets.CHECKMARX_CLIENT_ID }}
41+
cx_client_secret: ${{ secrets.CHECKMARX_SECRET }}
42+
additional_params: |
43+
--report-format sarif \
44+
--filter "state=TO_VERIFY;PROPOSED_NOT_EXPLOITABLE;CONFIRMED;URGENT" \
45+
--output-path . ${{ env.INCREMENTAL }}
46+
47+
- name: Upload Checkmarx results to GitHub
48+
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
49+
with:
50+
sarif_file: cx_result.sarif
51+
52+
quality:
53+
name: Quality scan
54+
runs-on: ubuntu-22.04
55+
needs: check-run
56+
permissions:
57+
contents: read
58+
pull-requests: write
59+
60+
steps:
61+
- name: Check out repo
62+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
63+
with:
64+
fetch-depth: 0
65+
ref: ${{ github.event.pull_request.head.sha }}
66+
67+
- name: Scan with SonarCloud
68+
uses: sonarsource/sonarcloud-github-action@e44258b109568baa0df60ed515909fc6c72cba92 # v2.3.0
69+
env:
70+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
args: >
74+
-Dsonar.organization=${{ github.repository_owner }} -Dsonar.projectKey=${{
75+
github.repository_owner }}_${{ github.event.repository.name }}

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
# Misc
1212
.DS_Store
13+
*.crt
14+
*.key
15+
*.pem
16+
.env
1317
.env.local
1418
.env.development.local
1519
.env.test.local

Diff for: .nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v20

Diff for: README.md

+18
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ npm start
2020
This command starts a local development server and opens up a browser window. Most changes are
2121
reflected live without having to restart the server.
2222

23+
### SSL
24+
25+
By default, `npm start` will attempt to start your local instance with SSL enabled using
26+
certificates referenced in your local dotfile (`.env`).
27+
28+
- copy the provided `.env.example` to `.env` and update the values as needed
29+
- (requires [OpenSSL](https://www.openssl.org/)) Generate your self-signed certs with
30+
`npm run setup:ssl` and follow the instructions.
31+
- Alternatively use [mkcert](https://github.com/FiloSottile/mkcert) to
32+
[generate and add certs to your trust store](https://docusaurus.io/docs/cli#enabling-https)
33+
- run `npm start`!
34+
35+
If the script fails to find your `.env` or the required values within, docusaurus will start
36+
normally without SSL.
37+
38+
If you need to explicitly develop without SSL, simply delete your `.env` file or use the command
39+
`npm start:insecure` instead.
40+
2341
## Build
2442

2543
```bash

Diff for: custom-words.txt

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
# it in a single (`) or multiline (```) code snippet instead, as they are automatically ignored
33
# by the spellchecker. Please keep the list sorted alphabetically.
44

5+
AndroidX
56
Bitwarden
7+
bitwardensecret
68
bytemark
79
clickjacking
810
CODEOWNERS
911
CQRS
12+
CTAP2
1013
dockerized
14+
F-Droid
1115
Gitter
16+
HKDF
1217
hotfix
1318
hotfixed
1419
hotfixes
@@ -21,6 +26,7 @@ jumpcloud
2126
keychain
2227
keypair
2328
keyserver
29+
Kubebuilder
2430
LDIF
2531
LLDB
2632
Mailcatcher
@@ -38,6 +44,7 @@ passcode
3844
passwordless
3945
pinentry
4046
PNSs
47+
precompiler
4148
proxied
4249
refactorings
4350
roadmap
@@ -54,6 +61,7 @@ signtool
5461
signup
5562
sprocs
5663
sqlcmd
64+
struct
5765
subprocessor
5866
toolset
5967
TOTP
@@ -62,4 +70,5 @@ Xcodes.app
6270
xmldoc
6371
Yellowpages
6472
Yubico
65-
YubiKey
73+
YubiKey
74+
YubiKeys

Diff for: docs/architecture/adr/0012-angular-filename-convention.md

-7
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,10 @@ At Bitwarden we also use a couple of more types:
4545
- `.request` - Api Request
4646
- `.response` - Api Response
4747
- `.type` - Enum
48-
- `.service.abstraction` - Abstract class for a service, used for DI, not all services needs an
49-
abstract class
5048

5149
The class names are expected to use the suffix as part of their class name as well. I.e. a service
5250
implementation will be named `FolderService`, a request model will be named `FolderRequest`.
5351

54-
In the event a service can't be fully implemented, an abstract class is created with the
55-
`Abstraction` suffix. This typically happens if the Angular and Node implementations have to differ
56-
for one reason or another. Traditionally interfaces would be used, but a TypeScript interface cannot
57-
be used to wire up dependency injection in JavaScript.
58-
5952
### Positive Consequences
6053

6154
- Since most of our code is written in Angular, we should use the Angular coding style guide.

Diff for: docs/architecture/adr/0018-feature-management.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ upon startup, login, when their local configuration is updated, and when sync ev
6262

6363
Contexts will be established that communicate to the API using supported clients. Said contexts will
6464
be available within the service provider for specific targeting as desired. Contexts will be
65-
established for the user, organization, and service account, with unique IDs for the entity as a key
66-
and other details as needed. Context attributes when needed can be marked as private to avoid
67-
spillover to the service provider, and the provider will be added if needed to the [subprocessor
68-
list][subprocessors] with respective communication should PII be used.
65+
established for the user, organization, and machine account (previously known as service account),
66+
with unique IDs for the entity as a key and other details as needed. Context attributes when needed
67+
can be marked as private to avoid spillover to the service provider, and the provider will be added
68+
if needed to the [subprocessor list][subprocessors] with respective communication should PII be
69+
used.
6970

7071
Compile-time configuration will be converted wherever possible to use the feature management service
7172
provider. SDK access to the service provider will be segmented by environment; some features may

0 commit comments

Comments
 (0)