Skip to content

Release JavaScript AWS KMS Storage v1.0.0#875

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

Release JavaScript AWS KMS Storage v1.0.0#875
stas-schaller wants to merge 27 commits intomasterfrom
release/storage/javascript/aws-kms/v1.0.0

Conversation

@stas-schaller
Copy link
Contributor

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

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

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

Dependencies:

  • @keeper-security/secrets-manager-core v17.3.0
  • @aws-sdk/client-kms v3.758.0

Bug Fixes

  • KSM-836: 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-839: Fix delete() — truthy check if (config[key]) silently skipped keys holding falsy values ("", 0, false, null). Corrected to key in config. Add regression tests.
  • KSM-846: Fix encryption/decryption error propagation — encryptBuffer() and decryptBuffer() in utils.ts returned empty values (Buffer.alloc(0) / "") on AWS 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 AWS 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-851: 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 getKeyDetails() from implicit public to private, aligning with all other JS KMS storage packages (Azure, GCP, Oracle).

Maintenance

  • Resolve transitive dependency vulnerabilities via npm audit fix — fixed 1 critical (fast-xml-parser), 3 high (minimatch), 1 medium (ajv). Grype rescan: 0 findings.

Closes https://keeper.atlassian.net/browse/KSM-703
Closes https://keeper.atlassian.net/browse/KSM-836
Closes https://keeper.atlassian.net/browse/KSM-839
Closes https://keeper.atlassian.net/browse/KSM-846
Closes https://keeper.atlassian.net/browse/KSM-851

Comment on lines +19 to +38
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sdk/javascript/packages/aws
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/aws/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 resolve the issue, an explicit permissions block should be added to limit the permissions granted to the workflow's jobs. The least-privilege starting point is typically contents: read, which allows jobs to clone and read the repository content but does not permit write operations. This block can be added either at the root level of the workflow, applying to all jobs, or just to the specific job. Since the workflow contains only one job (test), either location is acceptable, but best practice is to place it at the root for future extensibility. The modification involves editing .github/workflows/test.javascript.storage.aws.kms.yml by inserting the following block after the name: and before the on: section:

permissions:
  contents: read

No new imports, methods, or definitions are required beyond adding this block.

Suggested changeset 1
.github/workflows/test.javascript.storage.aws.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.aws.kms.yml b/.github/workflows/test.javascript.storage.aws.kms.yml
--- a/.github/workflows/test.javascript.storage.aws.kms.yml
+++ b/.github/workflows/test.javascript.storage.aws.kms.yml
@@ -1,4 +1,6 @@
 name: Test JavaScript Storage - AWS KMS
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Test JavaScript Storage - AWS KMS
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
satish-metron and others added 18 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 Support for KSM JS SDK to be able to use a key from AWS to encrypt local config

* Added rimraf to devDependencies.

* Fixed issue with KMS overwriting configuration file even wne encryption failed

---------

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

- Updates @smithy/config-resolver from 4.1.0 to 4.4.6
- Resolves LOW severity vulnerability (CVSS 3.7)
- Defense-in-depth enhancement for region parameter validation
- Adds npm install step to generate-sbom job
- Ensures Syft scans actual installed dependencies
- Resolves phantom @smithy/config-resolver@4.1.0 detection
@stas-schaller stas-schaller force-pushed the release/storage/javascript/aws-kms/v1.0.0 branch from 2b0abbc to 3f9e401 Compare March 10, 2026 16:26
…d visibility (KSM-836)

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 getKeyDetails() from implicit public to private, aligning it with all
other JS KMS storage packages (Azure, GCP, Oracle).

Add regression tests for contains() to prevent recurrence.
@socket-security
Copy link

socket-security bot commented Mar 12, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

…up-node in publish, npm ci, --ignore-scripts, .npmrc auth
…it fix

Ran npm audit fix to resolve 5 vulnerabilities (1 critical, 3 high, 1 medium)
in transitive dependencies: fast-xml-parser, minimatch, ajv via @aws-sdk/client-kms
and dev toolchain. Updated package-lock.json and yarn.lock. Grype rescan: 0 findings.
…-values

KSM-839: fix AwsKeyValueStore.delete() skipping keys with falsy values
…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)
… 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-851
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