Skip to content

Release JavaScript AWS KMS Storage v1.0.0#875

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

Release JavaScript AWS KMS Storage v1.0.0#875
maksimu merged 1 commit intomasterfrom
release/storage/javascript/aws-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-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.
  • 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-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 5 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.
@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
@socket-security
Copy link
Copy Markdown

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

@stas-schaller stas-schaller force-pushed the release/storage/javascript/aws-kms/v1.0.0 branch from 0c8b15e to fe77624 Compare April 7, 2026 18:31
Initial release of the AWS KMS storage backend for the KSM JavaScript
SDK with pre-publish bug fixes, CVE remediations, and workflow hardening.

Bug fixes:
- KSM-846: rethrow KMS errors in encryptBuffer/decryptBuffer and saveConfig
- KSM-839: fix delete() skipping keys with falsy values
- KSM-836: correct in operator usage in contains(); normalize method visibility
- fix getBytes() returning undefined for zero-length Uint8Array

Maintenance:
- upgrade @aws-sdk/client-kms to 3.975.0 (GHSA-6475-r3vj-m8vf)
- upgrade pino to v10 (CVE-2025-57319)
- upgrade @isaacs/brace-expansion to 5.0.1
- update npm publish workflow: Node.js 24, Syft v1.32.0, new KSM config secret, ksm-action SHA 560d170b
- harden CI: pin action SHAs, add permissions blocks, persist-credentials: false
@stas-schaller stas-schaller force-pushed the release/storage/javascript/aws-kms/v1.0.0 branch from fe77624 to 03a4e75 Compare April 7, 2026 18:38
@maksimu maksimu merged commit b723066 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