Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ebb1509
cyclonedx cli validate sbom
mpreyskurantov May 25, 2026
5411141
sha256sum / checksum
mpreyskurantov Jun 3, 2026
e2aab28
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jun 4, 2026
16d2046
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jun 5, 2026
73369e3
CYCLONEDX_CLI: WIN -> LINUX (after #33854)
mpreyskurantov Jun 5, 2026
76ef292
CYCLONEDX_CLI: WIN -> LINUX, v2, exe || true (after #33854)
mpreyskurantov Jun 5, 2026
aaffe18
SBOM package(s) flow (like for NPM package(s))
mpreyskurantov Jun 5, 2026
0da90d6
SBOM package(s) optimized flow only (no NPM package(s))
mpreyskurantov Jun 5, 2026
7614d05
revert "continue-on-error: true"
mpreyskurantov Jun 8, 2026
935e8e2
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jun 8, 2026
6cf243a
Revert "SBOM package(s) optimized flow only (no NPM package(s))"
mpreyskurantov Jun 8, 2026
eb2326f
*.sbom.json -> *.cdx.json
mpreyskurantov Jun 8, 2026
525e50b
dx-make-sbom with hashes
mpreyskurantov Jun 8, 2026
3ed1bf0
hasSbom for tgz
mpreyskurantov Jun 8, 2026
5519d6c
build-hashed
mpreyskurantov Jun 9, 2026
b223804
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jun 10, 2026
f036feb
validate via action
mpreyskurantov Jun 10, 2026
d8cb985
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jun 16, 2026
c29251a
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jun 17, 2026
8f9a65f
DevExpress/github-actions/validate-sbom + commit hash
mpreyskurantov Jun 17, 2026
6bb3327
publish scoped sboms instantly (without changing scope)
mpreyskurantov Jun 20, 2026
2212238
packages/sbom/pnpm-lock.yaml: the lockfile contains entries that the …
mpreyskurantov Jun 21, 2026
0486532
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jul 3, 2026
2329597
Merge remote-tracking branch 'origin(upstream)/26_1' into 26_1-sbom-v…
mpreyskurantov Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ github.ref_name == github.event.repository.default_branch && secrets.NX_CLOUD_ACCESS_TOKEN || '' }}
NX_SKIP_NX_CACHE: ${{ contains(github.event.pull_request.labels.*.name, 'skip-cache') && 'true' || 'false' }}
CYCLONEDX_CLI_VERSION: 0.32.0
CYCLONEDX_CLI_LINUX_X64_SHA256: 454879e6a4a405c8a13bff49b8982adcb0596f3019b26b0811c66e4d7f0783e1

jobs:
build:
Expand Down Expand Up @@ -70,7 +72,35 @@ jobs:
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN";
pnpm nx build sbom;

- name: Upload SBOM artifacts
- name: Install CycloneDX CLI
if: ${{ github.event_name == 'push' || github.event.inputs.SBOM == 'true' }}
shell: bash
run: |
tool_dir="$RUNNER_TEMP/cyclonedx-cli"
mkdir -p "$tool_dir"
curl -fsSL "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${{ env.CYCLONEDX_CLI_VERSION }}/cyclonedx-linux-x64" -o "$tool_dir/cyclonedx"
echo "${{ env.CYCLONEDX_CLI_LINUX_X64_SHA256 }} $tool_dir/cyclonedx" | sha256sum -c -
chmod +x "$tool_dir/cyclonedx"
echo "$tool_dir" >> "$GITHUB_PATH"
Comment thread
mpreyskurantov marked this conversation as resolved.

- name: Validate SBOMs
if: ${{ github.event_name == 'push' || github.event.inputs.SBOM == 'true' }}
shell: bash
run: |
shopt -s nullglob
sbom_files=(packages/sbom/dist/*.sbom.json)

Comment on lines +139 to +141
Comment on lines +138 to +141
Comment on lines +139 to +141
if [ ${#sbom_files[@]} -eq 0 ]; then
echo "No SBOM files found in packages/sbom/dist"
exit 1
fi

for file in "${sbom_files[@]}"; do
echo "Validating $file"
cyclonedx validate --input-file "$file" --input-format json --fail-on-errors
done

- name: Upload SBOMs
if: ${{ github.event_name == 'push' || github.event.inputs.SBOM == 'true' }}
uses: actions/upload-artifact@v7
with:
Expand Down
96 changes: 90 additions & 6 deletions .github/workflows/packages_publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ env:
NX_SKIP_NX_CACHE: true
FILTER: ${{ github.event_name == 'workflow_dispatch' && inputs.filter || '' }}
SET_TIMESTAMP_VERSION: ${{ inputs.tag == 'daily' }}
CYCLONEDX_CLI_VERSION: 0.32.0
CYCLONEDX_CLI_LINUX_X64_SHA256: 454879e6a4a405c8a13bff49b8982adcb0596f3019b26b0811c66e4d7f0783e1

jobs:
build:
Expand Down Expand Up @@ -59,20 +61,46 @@ jobs:
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN";
pnpm nx build sbom;

- name: Install CycloneDX CLI
shell: bash
run: |
tool_dir="$RUNNER_TEMP/cyclonedx-cli"
mkdir -p "$tool_dir"
curl -fsSL "https://github.com/CycloneDX/cyclonedx-cli/releases/download/v${{ env.CYCLONEDX_CLI_VERSION }}/cyclonedx-linux-x64" -o "$tool_dir/cyclonedx"
echo "${{ env.CYCLONEDX_CLI_LINUX_X64_SHA256 }} $tool_dir/cyclonedx" | sha256sum -c -
chmod +x "$tool_dir/cyclonedx"
echo "$tool_dir" >> "$GITHUB_PATH"

- name: Validate SBOMs
shell: bash
run: |
shopt -s nullglob
sbom_files=(packages/sbom/dist/*.cdx.json)

if [ ${#sbom_files[@]} -eq 0 ]; then
echo "No SBOM files found in packages/sbom/dist"
exit 1
fi

for file in "${sbom_files[@]}"; do
echo "Validating $file"
cyclonedx validate --input-file "$file" --input-format json --fail-on-errors
done

- name: Build artifacts package
run: pnpm run make-artifacts-package

- name: Upload SBOM artifact
- name: Upload SBOMs
uses: actions/upload-artifact@v7
with:
name: sbom
name: sbom-packages
path: packages/sbom/dist
retention-days: 7

- name: Upload packages
uses: actions/upload-artifact@v7
with:
name: packages
name: npm-packages
path: artifacts/npm/*.tgz
retention-days: 2

Expand All @@ -94,10 +122,17 @@ jobs:
- name: Get sources
uses: actions/checkout@v6

- name: Download artifacts
- name: Download packages
uses: actions/download-artifact@v8
with:
name: packages
name: npm-packages
path: npm-packages

- name: Download SBOMs
uses: actions/download-artifact@v8
with:
name: sbom-packages
path: sbom-packages

- name: Use Node.js
uses: actions/setup-node@v6
Expand All @@ -117,13 +152,49 @@ jobs:
PACKAGE: ${{ matrix.package }}
run: |
SCOPE=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]');
PACKAGE_DIR=$(pnpm --silent run change-package-scope --tgz $PACKAGE.tgz --scope $SCOPE)
PACKAGE_DIR=$(pnpm --silent run change-package-scope --tgz npm-packages/$PACKAGE.tgz --scope $SCOPE)
echo "packageDir=$PACKAGE_DIR" >> "$GITHUB_OUTPUT";
cd $PACKAGE_DIR;
pnpm pkg get name | tr -d '"' | sed -r 's/(.*)/name=\1/' >> "$GITHUB_OUTPUT";
pnpm pkg get version | tr -d '"' | sed -r 's/(.*)/version=\1/' >> "$GITHUB_OUTPUT";
pnpm pkg get version | tr -d '"' | sed -r 's/([0-9]+\.[0-9]+).*/majorVersion=\1/' >> "$GITHUB_OUTPUT";

- name: Build SBOM package
id: scopedSbomPackage
env:
PACKAGE_NAME: ${{ steps.scopedPackage.outputs.name }}
PACKAGE_VERSION: ${{ steps.scopedPackage.outputs.version }}
run: |
UNSCOPED_PACKAGE_NAME=$(echo "$PACKAGE_NAME" | sed -r 's#^@[^/]+/##');
SBOM_FILE="sbom-packages/$UNSCOPED_PACKAGE_NAME.cdx.json";

# if [ ! -f "$SBOM_FILE" ]; then
# echo "No SBOM found for $UNSCOPED_PACKAGE_NAME"
# echo "hasSbom=false" >> "$GITHUB_OUTPUT";
# exit 0;
# fi

SCOPE=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]');
SBOM_PACKAGE_NAME="$UNSCOPED_PACKAGE_NAME-sbom";
SBOM_PACKAGE_DIR="sbom-package/$SBOM_PACKAGE_NAME";
SBOM_TGZ_DIR="sbom-package-tgz";
PACKAGE_LICENSE=$(node -p "require('./package.json').license");
PACKAGE_AUTHOR=$(node -p "require('./package.json').author");
Comment thread
mpreyskurantov marked this conversation as resolved.
Outdated
Comment thread
mpreyskurantov marked this conversation as resolved.
Outdated

mkdir -p "$SBOM_PACKAGE_DIR" "$SBOM_TGZ_DIR";
cp "$SBOM_FILE" "$SBOM_PACKAGE_DIR/";
cd "$SBOM_PACKAGE_DIR";
node -e "const fs = require('fs'); const [name, version, license, author] = process.argv.slice(1); fs.writeFileSync('package.json', JSON.stringify({ name, version, license, author }, null, 2));" "$SBOM_PACKAGE_NAME" "$PACKAGE_VERSION" "$PACKAGE_LICENSE" "$PACKAGE_AUTHOR";
Comment thread
mpreyskurantov marked this conversation as resolved.
Outdated
npm pack --pack-destination "../../$SBOM_TGZ_DIR";
cd ../..;

SCOPED_SBOM_PACKAGE_DIR=$(pnpm --silent run change-package-scope --tgz "$SBOM_TGZ_DIR/$SBOM_PACKAGE_NAME-$PACKAGE_VERSION.tgz" --scope "$SCOPE");
echo "packageDir=$SCOPED_SBOM_PACKAGE_DIR" >> "$GITHUB_OUTPUT";
cd "$SCOPED_SBOM_PACKAGE_DIR";
pnpm pkg get name | tr -d '"' | sed -r 's/(.*)/name=\1/' >> "$GITHUB_OUTPUT";
pnpm pkg get version | tr -d '"' | sed -r 's/(.*)/version=\1/' >> "$GITHUB_OUTPUT";
pnpm pkg get version | tr -d '"' | sed -r 's/([0-9]+\.[0-9]+).*/majorVersion=\1/' >> "$GITHUB_OUTPUT";

# --ignore-scripts is required for publishing devextreme-angular which fails with error:
# 'Trying to publish a package that has been compiled by Ivy in full compilation mode.'
# Should be removed.
Expand All @@ -139,6 +210,19 @@ jobs:
pnpm publish --no-git-checks --quiet --ignore-scripts --tag $PACKAGE_VERSION_MAJOR-${{ inputs.tag }} --registry https://npm.pkg.github.com;
pnpm dist-tag add $PACKAGE_NAME@$PACKAGE_VERSION latest --registry=https://npm.pkg.github.com;

# --ignore-scripts - like above, should be removed, check if could be removed everywhere
- name: Publish SBOM to npm.pkg.github.com
working-directory: ${{ steps.scopedSbomPackage.outputs.packageDir }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_NAME: ${{ steps.scopedSbomPackage.outputs.name }}
PACKAGE_VERSION: ${{ steps.scopedSbomPackage.outputs.version }}
PACKAGE_VERSION_MAJOR: ${{ steps.scopedSbomPackage.outputs.majorVersion }}
run: |
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN";
pnpm publish --no-git-checks --quiet --ignore-scripts --tag $PACKAGE_VERSION_MAJOR-${{ inputs.tag }} --registry https://npm.pkg.github.com;
pnpm dist-tag add $PACKAGE_NAME@$PACKAGE_VERSION latest --registry=https://npm.pkg.github.com;

notify:
runs-on: devextreme-shr2
name: Send notifications
Expand Down
Loading