Skip to content

Release JavaScript Oracle KMS Storage v1.0.0#873

Merged
maksimu merged 1 commit intomasterfrom
release/storage/javascript/oracle-kms/v1.0.0
Apr 7, 2026
Merged

Release JavaScript Oracle KMS Storage v1.0.0#873
maksimu merged 1 commit intomasterfrom
release/storage/javascript/oracle-kms/v1.0.0

Conversation

@stas-schaller
Copy link
Copy Markdown
Contributor

@stas-schaller stas-schaller commented Nov 21, 2025

Release of @keeper-security/secrets-manager-oracle-kv v1.0.0

Oracle Cloud Key Management Service integration for secure storage of Keeper Secrets Manager configuration.

Dependencies:

  • @keeper-security/secrets-manager-core v17.3.0
  • oci-keymanagement v2.124.0
  • oci-common v2.124.0

Bug Fixes

  • KSM-866: Fix inverted checksum verification in decryptBuffer()verifyDecryption() returns true when checksums match (valid data), but the caller threw on true, rejecting valid data and passing corrupted data. Negated the condition. Regression tests use real zlib.crc32 computation to prove both valid and corrupted paths.
  • KSM-870: Fix wrong CRC algorithm in verifyDecryption() — replaced @aws-crypto/crc32c (CRC-32C/Castagnoli) with Node.js built-in zlib.crc32 (CRC-32/IEEE) to match the algorithm Oracle KMS actually uses for plaintextChecksum; also fix type mismatch where strict equality between number and string always returned false even with the correct algorithm. Remove @aws-crypto/crc32c dependency (no longer needed).
  • KSM-838: Fix contains()key in Object.keys(config) checked numeric array indices and always returned false for real config keys. Corrected to key in config. Add regression tests.
  • KSM-841: Fix delete() — truthy check if (config[key]) silently skipped deletion of keys with falsy values ("", 0). Corrected to if (key in config). Add regression tests.
  • KSM-848: Fix encryption/decryption error propagation — encryptBuffer() and decryptBuffer() in utils.ts returned empty values (Buffer.alloc(0) / "") on Oracle OCI KMS failure instead of rethrowing, silently discarding authentication failures, invalid key IDs, and permission errors; saveConfig() also caught and discarded errors without rethrowing; both layers now rethrow, making saveString(), saveBytes(), saveObject(), and changeKey() propagate Oracle KMS failures as expected; changeKey()'s rollback path (key and crypto client restoration) is now reachable; removed vestigial blob.length > 0 guards in saveConfig() and createConfigFileIfMissing().
  • KSM-852: Fix getBytes() — falsy check if (bytesString) treated an empty base64 string ("", produced by saving a zero-length Uint8Array) as absent, returning undefined instead of Uint8Array(0). Corrected to if (bytesString !== undefined). Add regression tests.
  • KSM-857: Replace fast-crc32c with @aws-crypto/crc32cfast-crc32c native C++ addon segfaults on ARM64 and was incorrectly listed in devDependencies, causing MODULE_NOT_FOUND for consumers. Replaced with @aws-crypto/crc32c (pure JS, AWS-maintained, no native addon).
  • Normalize 5 methods from private to public to match Azure and AWS: contains(), isEmpty(), deleteAll(), readStorage(), saveStorage().

Code Quality (KSM-869)

  • Replace console.error with logger.error() in encryptBuffer() and decryptBuffer()
  • Standardize error message casing to "Oracle KMS Storage"
  • Remove 3 unused production dependencies (crc-32, node-fetch, oci-vault) — reduces install size and attack surface
  • Add oci-common as explicit dependency (previously transitive via oci-vault)
  • Remove unused Babel devDependencies (@babel/core, @babel/preset-env, @babel/preset-typescript, babel-jest, @types/node-fetch)
  • Fix broken eslint.config.mjs glob pattern (src/*.ts}src/**/*.ts)

Documentation (KSM-869)

  • CHANGELOG: Add entries for KSM-866, KSM-838, KSM-841, KSM-852, KSM-857
  • README: Capitalize "oracle" → "Oracle" throughout, replace bankAccount with password field type, remove debug console.log statements, fix heading casing

Maintenance

  • Fix jest TypeScript configuration — add tsconfig.test.json with @types/jest types and update jest.config.js to pass the test tsconfig to ts-jest, resolving LSP errors in test files.

Closes https://keeper.atlassian.net/browse/KSM-705
Closes https://keeper.atlassian.net/browse/KSM-838
Closes https://keeper.atlassian.net/browse/KSM-841
Closes https://keeper.atlassian.net/browse/KSM-848
Closes https://keeper.atlassian.net/browse/KSM-852
Closes https://keeper.atlassian.net/browse/KSM-857
Closes https://keeper.atlassian.net/browse/KSM-866
Closes https://keeper.atlassian.net/browse/KSM-869
Closes https://keeper.atlassian.net/browse/KSM-870

Comment thread .github/workflows/publish.npm.storage.oracle.kms.yml Fixed
Comment thread .github/workflows/publish.npm.storage.oracle.kms.yml Fixed
Comment on lines +19 to +38
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sdk/javascript/packages/oracle
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache-dependency-path: sdk/javascript/packages/oracle/package-lock.json

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix this problem, add a permissions: block either at the root of the workflow file (which will apply to all jobs) or at the jobs.test level if additional jobs are added in the future with different requirements. The minimal required permission for this workflow is likely contents: read, as the workflow only checks out code and runs tests. Add this block immediately after the workflow name: and before on: (for workflow-wide settings), or at the same indentation level as runs-on: inside the test job block.

No new methods, imports, or definitions are required.

Suggested changeset 1
.github/workflows/test.javascript.storage.oracle.kms.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/test.javascript.storage.oracle.kms.yml b/.github/workflows/test.javascript.storage.oracle.kms.yml
--- a/.github/workflows/test.javascript.storage.oracle.kms.yml
+++ b/.github/workflows/test.javascript.storage.oracle.kms.yml
@@ -1,4 +1,6 @@
 name: Test JavaScript Storage - Oracle KMS
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Test JavaScript Storage - Oracle KMS
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Nov 21, 2025

Comment thread .github/workflows/publish.npm.storage.oracle.kms.yml Fixed
Comment thread .github/workflows/publish.npm.storage.oracle.kms.yml Fixed
@stas-schaller stas-schaller force-pushed the release/storage/javascript/oracle-kms/v1.0.0 branch from 4b5b8eb to cbf95a1 Compare March 10, 2026 16:26
Comment thread .github/workflows/publish.npm.storage.oracle.kms.yml Fixed
Comment thread .github/workflows/publish.npm.storage.oracle.kms.yml Fixed
Comment thread .github/workflows/publish.npm.storage.oracle.kms.yml Fixed
Comment thread .github/workflows/test.cli.yml Fixed
Initial release of the Oracle KMS storage backend for the KSM
JavaScript SDK with pre-publish bug fixes, CVE remediations, and
workflow hardening.

Bug fixes:
- KSM-870: use CRC-32 (IEEE) for checksum verification
- KSM-857: replace fast-crc32c with @aws-crypto/crc32c
- KSM-848: rethrow KMS errors in encryptBuffer/decryptBuffer/saveConfig
- KSM-841: fix delete() skipping keys with falsy values
- KSM-838: correct in operator usage in contains(); normalize method visibility
- fix inverted checksum verification logic in decryptBuffer
- fix getBytes() returning undefined for zero-length Uint8Array

Maintenance:
- upgrade oci-common + oci-keymanagement 2.124.0 → 2.127.0 (CVE-2026-4800 High, CVE-2026-2950 Medium lodash via jsonwebtoken)
- upgrade oci-keymanagement to 2.124.0 (CVE-2025-65945, CVE-2025-13465)
- upgrade pino to v10 (CVE-2025-57319)
- upgrade @isaacs/brace-expansion to 5.0.1
- remove unused deps: crc-32, node-fetch, oci-vault; add explicit oci-common
- standardize license to MIT; update README examples
- update npm publish workflow: Node.js 24, Syft v1.32.0, new KSM config secret, ksm-action SHA 560d170b
@stas-schaller stas-schaller force-pushed the release/storage/javascript/oracle-kms/v1.0.0 branch from 8726b69 to 129e514 Compare April 7, 2026 18:40
@maksimu maksimu merged commit de856e7 into master Apr 7, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants