Skip to content

Release JavaScript Azure KMS Storage v1.0.0#872

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

Release JavaScript Azure KMS Storage v1.0.0#872
stas-schaller wants to merge 21 commits intomasterfrom
release/storage/javascript/azure-kms/v1.0.0

Conversation

@stas-schaller
Copy link
Contributor

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

Summary

Release branch for v1.0.0 — initial release of the Azure Key Vault storage integration for the Keeper Secrets Manager JavaScript SDK.

Changes

New Features

  • Azure Key Vault storage (KSM-706): encrypt/decrypt KSM config files with Azure Key Vault; supports RSA keys, AzureSessionConfig credential config, and environment-variable-based DefaultAzureCredential

Bug Fixes

  • README corrections (KSM-751): fixed copy-paste errors referencing Oracle instead of Azure in class names, constructor parameters, and product name
  • delete() / contains() (KSM-835): key in Object.keys(config) checked array indices instead of object property names, causing delete() to silently no-op and contains() to always return false; fixed to key in config

Maintenance

  • Upgraded pino to v10 to resolve CVE-2025-57319 (fast-redact, HIGH)
  • Upgraded jws to 3.2.3 to resolve CVE-2025-65945 (HIGH)
  • Upgraded @isaacs/brace-expansion to 5.0.1
  • Updated @keeper-security/secrets-manager-core dependency to v17.3.0
  • Removed committed SBOM files — generated fresh by CI/CD at publish time
  • Added Node.js setup step to SBOM generation job so Syft scans installed dependencies
  • Added build-only option to publish workflow; fixed SBOM name to include "javascript"

Breaking Changes

None.

Related Issues

  • KSM-706, KSM-751, KSM-835

Comment on lines +19 to +38
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sdk/javascript/packages/azure
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/azure/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 this issue, an explicit permissions block should be added to the workflow or at the job level to restrict GITHUB_TOKEN access in accordance with principle of least privilege. Since the job is only checking out code, installing dependencies, and running tests, it needs only read access to repository contents—contents: read—and does not require any write privileges. To implement the fix, add a permissions: block to the root of the workflow YAML (above jobs:) or within the job itself (recommended at the root for coverage of all jobs). No other imports, methods, or definitions are necessary; this is a direct configuration change within the workflow file.

Suggested changeset 1
.github/workflows/test.javascript.storage.azure.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.azure.kms.yml b/.github/workflows/test.javascript.storage.azure.kms.yml
--- a/.github/workflows/test.javascript.storage.azure.kms.yml
+++ b/.github/workflows/test.javascript.storage.azure.kms.yml
@@ -14,6 +14,8 @@
       - 'sdk/javascript/packages/azure/**'
   workflow_dispatch:
 
+permissions:
+  contents: read
 jobs:
   test:
     runs-on: ubuntu-latest
EOF
@@ -14,6 +14,8 @@
- 'sdk/javascript/packages/azure/**'
workflow_dispatch:

permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +78 to +106
needs: generate-sbom
if: ${{ github.event.inputs.publish == 'true' }}
environment: prod
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./sdk/javascript/packages/azure

steps:
- name: Get the source code
uses: actions/checkout@v3

- name: Retrieve secrets from KSM
id: ksmsecrets
uses: Keeper-Security/ksm-action@master
with:
keeper-secret-config: ${{ secrets.KSM_KSM_CONFIG }}
secrets: |
NScQiZwrHJFCPv1gL8TX6Q/field/password > env:NPM_TOKEN

- name: Install dependencies
run: npm install

- name: Build package
run: npm run build

- name: Publish package
run: npm publish

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

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 about 1 month ago

In general, fix this by adding an explicit permissions: section that grants only the minimal access required. For this workflow, neither job appears to need write access to repository contents, issues, or pull requests. They read the code (via actions/checkout) and interact with external services using separate secrets. Therefore, setting contents: read at the workflow level is an appropriate minimal starting point. If future changes require additional scopes, they can be added explicitly.

The best way to fix this without changing existing functionality is to add a workflow-level permissions: block directly under the name: (line 1). This will apply to both generate-sbom and publish-npm unless overridden per job. Use:

permissions:
  contents: read

No other code or configuration changes are needed. We do not need any imports or additional methods, since this is purely a YAML configuration change.


Suggested changeset 1
.github/workflows/publish.npm.storage.azure.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/publish.npm.storage.azure.kms.yml b/.github/workflows/publish.npm.storage.azure.kms.yml
--- a/.github/workflows/publish.npm.storage.azure.kms.yml
+++ b/.github/workflows/publish.npm.storage.azure.kms.yml
@@ -1,4 +1,6 @@
 name: Publish Azure Storage to NPM
+permissions:
+  contents: read
 on:
   workflow_dispatch:
     inputs:
EOF
@@ -1,4 +1,6 @@
name: Publish Azure Storage to NPM
permissions:
contents: read
on:
workflow_dispatch:
inputs:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +13 to +86
runs-on: ubuntu-latest
steps:
- name: Get the source code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install package dependencies
run: npm install
working-directory: ./sdk/javascript/packages/azure

- name: Install Syft
run: |
echo "Installing Syft v1.18.1..."
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /tmp/bin v1.18.1
echo "/tmp/bin" >> $GITHUB_PATH

- name: Install Manifest CLI
run: |
echo "Installing Manifest CLI v0.18.3..."
curl -sSfL https://raw.githubusercontent.com/manifest-cyber/cli/main/install.sh | sh -s -- -b /tmp/bin v0.18.3

- name: Create Syft configuration
run: |
cat > syft-config.yaml << 'EOF'
package:
search:
scope: all-layers
cataloger:
enabled: true
java:
enabled: false
python:
enabled: false
nodejs:
enabled: true
EOF

- name: Generate and upload SBOM
env:
MANIFEST_API_KEY: ${{ secrets.MANIFEST_TOKEN }}
run: |
JAVASCRIPT_SDK_DIR="./sdk/javascript"

# Get version from package.json
echo "Detecting Azure Storage version..."
if [ -f "${JAVASCRIPT_SDK_DIR}/packages/azure/package.json" ]; then
VERSION=$(grep -o '"version": "[^"]*"' "${JAVASCRIPT_SDK_DIR}/packages/azure/package.json" | cut -d'"' -f4)
echo "Detected version: ${VERSION}"
else
VERSION="1.0.0"
echo "Could not detect version, using default: ${VERSION}"
fi

echo "Generating SBOM with Manifest CLI..."
/tmp/bin/manifest sbom "${JAVASCRIPT_SDK_DIR}/packages/azure" \
--generator=syft \
--name=keeper-secrets-manager-javascript-storage-azure-kms \
--version=${VERSION} \
--output=spdx-json \
--file=azure-storage-sbom.json \
--api-key=${MANIFEST_API_KEY} \
--publish=true \
--asset-label=application,sbom-generated,nodejs,azure-storage \
--generator-config=syft-config.yaml

echo "SBOM generated and uploaded successfully: azure-storage-sbom.json"
echo "---------- SBOM Preview (first 20 lines) ----------"
head -n 20 azure-storage-sbom.json

publish-npm:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

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 about 1 month ago

In general, the fix is to define an explicit permissions: block that restricts the GITHUB_TOKEN to the minimal scope needed. For this workflow, neither job appears to need repository write access: they check out code, install dependencies, run build and publish to external services, and upload SBOMs via Manifest’s API, all without writing back to the GitHub repository. Therefore, using contents: read (and no write permissions) is sufficient.

The best minimal fix without changing functionality is to add a top-level permissions: block just under the name: or on: section in .github/workflows/publish.npm.storage.azure.kms.yml. This applies to all jobs that don’t override it. We set:

permissions:
  contents: read

No additional imports or methods are required, as this is a configuration-only change in the workflow file. Concretely, insert the permissions: block between the on: section and the jobs: section (i.e., after line 9 and the blank line 10, or directly on a new line after line 10), preserving indentation.

Suggested changeset 1
.github/workflows/publish.npm.storage.azure.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/publish.npm.storage.azure.kms.yml b/.github/workflows/publish.npm.storage.azure.kms.yml
--- a/.github/workflows/publish.npm.storage.azure.kms.yml
+++ b/.github/workflows/publish.npm.storage.azure.kms.yml
@@ -8,6 +8,9 @@
         default: true
         type: boolean
 
+permissions:
+  contents: read
+
 jobs:
   generate-sbom:
     runs-on: ubuntu-latest
EOF
@@ -8,6 +8,9 @@
default: true
type: boolean

permissions:
contents: read

jobs:
generate-sbom:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
satish-metron and others added 20 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 Azure kms support to KSM javascript sdk

* Removed tsconfig from gitignore, moved rimraf to dev dependencies

* Fixed issues in builing process due to type erros in @azure/msal-node

* Fixed issues related  encryption wiping out credentials if failed.

---------

Co-authored-by: Ivan Dimov <78815270+idimov-keeper@users.noreply.github.com>
Co-authored-by: satish_chandra <metron_satish@safebreach.com>
- Updates jws from 3.2.2 to 3.2.3 (via jsonwebtoken)
- Resolves HIGH severity vulnerability (CVSS 7.5)
- Fixes improper HMAC signature verification in auth0/node-jws
@stas-schaller stas-schaller force-pushed the release/storage/javascript/azure-kms/v1.0.0 branch from 2e7332e to 0373e29 Compare March 10, 2026 16:26
…-835)

Object.keys(config) returns an array, so `key in Object.keys(config)`
checks numeric indices and always returns false for real config keys.
Replace with `key in config` to check property names on the object.

Adds regression tests for both methods.
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