Skip to content

Release JavaScript Oracle KMS Storage v1.0.0#873

Open
stas-schaller wants to merge 25 commits intomasterfrom
release/storage/javascript/oracle-kms/v1.0.0
Open

Release JavaScript Oracle KMS Storage v1.0.0#873
stas-schaller wants to merge 25 commits intomasterfrom
release/storage/javascript/oracle-kms/v1.0.0

Conversation

@stas-schaller
Copy link
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.102.2
  • oci-vault v2.103.0

Bug Fixes

  • 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.
  • Normalize 5 methods from private to public to match Azure and AWS: contains(), isEmpty(), deleteAll(), readStorage(), saveStorage().

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

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 4 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.
satish-metron and others added 17 commits March 10, 2026 12:25
* Bump version

* fix: resolve DOM Clobbering CVE-2024-43788 (#689)

* fix: resolve DOM Clobbering CVE-2024-43788

* Upgrade JavaScript tests GHA to use Node 20

* fixed moduleResolution in tsconfig
updated all dependencies

* Added Oracle KMS support to KSM JavaScript SDK.

* fixed markdown syntax

* fixed encryption issue and exception handling for get key details functionality

---------

Co-authored-by: Ivan Dimov <78815270+idimov-keeper@users.noreply.github.com>
Co-authored-by: satish_chandra <metron_satish@safebreach.com>
…CVE-2025-13465

- Updates oci-keymanagement from 2.122.0 to 2.124.0
- Updates jws from 3.2.2 to 3.2.3 (via jsonwebtoken)
- Updates lodash from 4.17.21 to 4.17.23 (via jsonwebtoken)
- Resolves HIGH severity CVE-2025-65945 (CVSS 7.5) - jws HMAC signature bypass
- Resolves MEDIUM severity CVE-2025-13465 (CVSS 6.9) - lodash prototype pollution
Adds existsSync and readFileSync mocks to fix Oracle SDK configuration loading
@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
…thod visibility (KSM-838)

Fix contains() which incorrectly used `key in Object.keys(config)` — this checks
numeric array indices and always returns false for real config key strings. Corrected
to `key in config` which checks object property names directly.

Also normalize 5 methods from private to public to match Azure and AWS: contains(),
isEmpty(), deleteAll(), readStorage(), saveStorage(). None of these packages are
published yet, so this is a clean alignment.

Add regression tests for contains() to prevent recurrence.
…setup-node in publish, npm ci, --ignore-scripts, .npmrc auth
…-values

KSM-841: fix delete() skipping keys with falsy values in Oracle storage
…BOM GHA false positives

- Upgrade actions/checkout, setup-node to v6 (SHA-pinned); upload-artifact to v7
- Bump node-version from 20 to 24 in all three jobs
- Syft v1.18.1 → v1.32.0 (Manifest CLI v0.31.0 max), Manifest CLI v0.18.3 → v0.31.0
- Disable github-action-workflow-usage-cataloger and github-actions-usage-cataloger
  in Syft config — eliminates GHA false positives from SBOM
- Fix retention-days: 90 → 10 (repo maximum)
- Add permissions: contents: read at workflow and job level
- Set persist-credentials: false on all checkout steps
- Use manifest (PATH) instead of /tmp/bin/manifest (hardcoded)
…gth Uint8Array

When an empty Uint8Array was stored, it was encoded as an empty base64
string (""). On retrieval, the falsy check (if bytesString) treated ""
as absent, returning undefined instead of Uint8Array(0). Fix replaces
truthy check with strict !== undefined guard.

KSM-852
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.

2 participants