Skip to content

Commit aa8a96d

Browse files
committed
Merge branch 'main' of https://github.com/bitwarden/sdk-internal into vault/pm-25821/cipher-admin-ops
2 parents 7dc66a5 + 4b0d128 commit aa8a96d

File tree

543 files changed

+11596
-2949
lines changed

Some content is hidden

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

543 files changed

+11596
-2949
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ rustflags = ["--cfg", "aes_armv8"]
66

77
[target.wasm32-unknown-unknown]
88
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
9-
runner = 'wasm-bindgen-test-runner'
9+
runner = 'cargo run -p wasm-bindgen-cli-runner --bin wasm-bindgen-test-runner'
1010

1111
# Enable support for 16k pages on Android, JNA is using these same flags
1212
# https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66

77
<!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. -->
88

9+
## 🚨 Breaking Changes
10+
11+
<!-- Does this PR introduce any breaking changes? If so, please describe the impact and migration path for clients.
12+
13+
If you're unsure, the automated TypeScript compatibility check will run when you open/update this PR and provide feedback.
14+
15+
For breaking changes:
16+
1. Describe what changed in the client interface
17+
2. Explain why the change was necessary
18+
3. Provide migration steps for client developers
19+
4. Link to any paired client PRs if needed
20+
21+
Otherwise, you can remove this section. -->
22+
923
## ⏰ Reminders before review
1024

1125
- Contributor guidelines followed

.github/renovate.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,22 @@
1515
"go": "1.21"
1616
},
1717
"packageRules": [
18+
{
19+
"groupName": "rust",
20+
"matchManagers": ["custom.regex", "dockerfile"],
21+
"matchDepNames": ["rust"]
22+
},
1823
{
1924
"matchManagers": ["cargo"],
2025
"matchUpdateTypes": ["minor", "patch"],
2126
"groupName": "pyo3 non-major",
2227
"matchPackageNames": ["/pyo3*/"]
2328
},
29+
{
30+
"matchManagers": ["cargo"],
31+
"groupName": "wasm-bindgen group",
32+
"matchPackageNames": ["/wasm-bindgen*/"]
33+
},
2434
{
2535
"groupName": "dockerfile minor",
2636
"matchManagers": ["dockerfile"],

.github/workflows/build-android.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
steps:
3535
- name: Checkout repo
3636
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37+
with:
38+
persist-credentials: false
3739

3840
- name: Install rust
3941
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # stable
@@ -54,7 +56,7 @@ jobs:
5456
run: cross build -p bitwarden-uniffi --release --target=${{ matrix.settings.target }}
5557

5658
- name: Upload artifact
57-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
59+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
5860
with:
5961
name: android-${{ matrix.settings.target }}
6062
path: ./target/${{ matrix.settings.target }}/release/libbitwarden_uniffi.so
@@ -78,12 +80,14 @@ jobs:
7880
with:
7981
fetch-depth: 0
8082
ref: ${{ github.event.pull_request.head.ref }}
83+
persist-credentials: false
8184

8285
- name: Checkout repo (Push or manual run)
8386
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8487
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
8588
with:
8689
fetch-depth: 0
90+
persist-credentials: false
8791

8892
- name: Install rust
8993
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # stable
@@ -102,7 +106,7 @@ jobs:
102106
java-version: 17
103107

104108
- name: Download Artifacts
105-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
109+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
106110

107111
- name: Move artifacts
108112
working-directory: crates/bitwarden-uniffi/kotlin/sdk/src/main/jniLibs
@@ -118,7 +122,7 @@ jobs:
118122
run: ./build-schemas.sh
119123

120124
- name: Setup gradle
121-
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
125+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
122126

123127
- name: Test build demo app
124128
working-directory: crates/bitwarden-uniffi/kotlin

.github/workflows/build-rust-crates.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
steps:
3939
- name: Checkout
4040
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
41+
with:
42+
persist-credentials: false
4143

4244
- name: Install rust
4345
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # stable
@@ -60,6 +62,8 @@ jobs:
6062
steps:
6163
- name: Checkout
6264
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
65+
with:
66+
persist-credentials: false
6367

6468
- name: Install rust
6569
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # stable

.github/workflows/build-swift.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout repo
2222
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
with:
24+
persist-credentials: false
2325

2426
- name: Get Package Version
2527
id: retrieve-version
@@ -38,6 +40,8 @@ jobs:
3840
steps:
3941
- name: Checkout repo
4042
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
43+
with:
44+
persist-credentials: false
4145

4246
- name: Install rust
4347
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # stable
@@ -81,14 +85,14 @@ jobs:
8185
cp -rf crates/bitwarden-uniffi/swift/BitwardenFFI.xcframework artifacts
8286
8387
- name: Upload BitwardenFFI.xcframework artifact
84-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
88+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
8589
with:
8690
name: BitwardenFFI-${{ env._VERSION }}-${{ steps.build.outputs.short-sha }}.xcframework
8791
path: artifacts
8892
if-no-files-found: error
8993

9094
- name: Upload BitwardenSdk sources
91-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
95+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
9296
with:
9397
name: BitwardenSdk-${{ env._VERSION }}-${{ steps.build.outputs.short-sha }}-sources
9498
path: crates/bitwarden-uniffi/swift/Sources/BitwardenSdk

.github/workflows/build-wasm-internal.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
- "hotfix-rc"
1010
workflow_dispatch:
1111

12+
permissions: {}
13+
1214
defaults:
1315
run:
1416
shell: bash
@@ -35,13 +37,15 @@ jobs:
3537
steps:
3638
- name: Checkout repo
3739
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40+
with:
41+
persist-credentials: false
3842

3943
- name: Set version (PR)
4044
if: ${{ github.event_name == 'pull_request' }}
4145
env:
4246
PR_HEAD_REF: "${{ github.event.pull_request.head.ref }}"
4347
run: |
44-
echo REF_NAME="$PR_HEAD_REF" >> $GITHUB_ENV
48+
echo REF_NAME="${PR_HEAD_REF}" >> $GITHUB_ENV
4549
echo SHA="${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
4650
4751
- name: Set env variables (Branch/Tag)
@@ -89,14 +93,11 @@ jobs:
8993
with:
9094
key: wasm-cargo-cache
9195

92-
- name: Install wasm-bindgen-cli
93-
run: cargo install wasm-bindgen-cli --version 0.2.105 --locked
94-
9596
- name: Build
9697
run: ./build.sh -r ${{ matrix.license_type.build_flags }}
9798

9899
- name: Upload artifact
99-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
100+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
100101
with:
101102
name: ${{ matrix.license_type.artifact_name }}
102103
path: ${{ github.workspace }}/crates/bitwarden-wasm-internal/${{ matrix.license_type.npm_folder }}/*
@@ -117,24 +118,53 @@ jobs:
117118
tenant_id: ${{ secrets.AZURE_TENANT_ID }}
118119
client_id: ${{ secrets.AZURE_CLIENT_ID }}
119120

120-
- name: Retrieve github PAT secrets
121-
id: retrieve-secret-pat
121+
- name: Get Azure Key Vault secrets
122+
id: get-kv-secrets
122123
uses: bitwarden/gh-actions/get-keyvault-secrets@main
123124
with:
124-
keyvault: "bitwarden-ci"
125-
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
125+
keyvault: gh-org-bitwarden
126+
secrets: "BW-GHAPP-ID,BW-GHAPP-KEY"
127+
128+
- name: Generate GH App token
129+
uses: actions/create-github-app-token@30bf6253fa41bdc8d1501d202ad15287582246b4 # v2.0.3
130+
id: app-token
131+
with:
132+
app-id: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }}
133+
private-key: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }}
134+
owner: bitwarden
135+
repositories: sdk-internal
136+
permission-actions: write
126137

127138
- name: Log out from Azure
128139
uses: bitwarden/gh-actions/azure-logout@main
129140

130141
- name: Trigger WASM publish
131142
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
132143
with:
133-
github-token: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
144+
github-token: ${{ steps.app-token.outputs.token }}
134145
script: |
135146
await github.rest.actions.createWorkflowDispatch({
136147
owner: 'bitwarden',
137148
repo: 'sdk-internal',
138149
workflow_id: 'publish-wasm-internal.yml',
139150
ref: 'main',
140151
})
152+
153+
trigger-breaking-change-check:
154+
name: Trigger client breaking change checks
155+
if: github.event_name == 'pull_request'
156+
needs: build
157+
permissions:
158+
contents: read
159+
pull-requests: write
160+
id-token: write
161+
uses: ./.github/workflows/detect-breaking-changes.yml
162+
secrets: inherit
163+
with:
164+
pr_number: ${{ github.event.number }}
165+
pr_head_sha: ${{ github.event.pull_request.head.sha }}
166+
pr_head_ref: ${{ github.event.pull_request.head.ref }}
167+
build_run_id: ${{ github.run_id }}
168+
client_repo: "bitwarden/clients"
169+
client_label: "typescript"
170+
client_workflow: "sdk-breaking-change-check.yml"

.github/workflows/check-powerset.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
steps:
2727
- name: Checkout
2828
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
persist-credentials: false
2931

3032
- name: Install rust
3133
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921 # stable

.github/workflows/cloc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout repo
1818
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
with:
20+
persist-credentials: false
1921

2022
- name: Set up cloc
2123
run: |

0 commit comments

Comments
 (0)