Skip to content

Commit 26fd0d8

Browse files
committed
Re-added php and ruby to the SBOM
Signed-off-by: Roland Asmann <[email protected]>
1 parent 62405ac commit 26fd0d8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/binary-builds.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ jobs:
7676
arch: arm64
7777
runner: windows-11-arm
7878
# Set musl configurations
79-
- image: debian:11
79+
- image: php:8.4-bookworm
8080
libc-suffix: ''
8181
node-download-url: https://nodejs.org/dist/
8282
prepare: |
8383
apt update
8484
apt install -y curl
8585
- libc: musl
86-
image: alpine:3.16
86+
image: php:8.4-alpine3.21
8787
libc-suffix: -musl
8888
node-download-url: https://raw.githubusercontent.com/appthreat/nodejs-unofficial-builds/main/dists/
8989
prepare: |
@@ -95,7 +95,7 @@ jobs:
9595
pnpm install:prod --config.node-linker=hoisted
9696
9797
# Generate sbom
98-
node bin/cdxgen.js -t jar -t js -o sbom-postbuild.cdx.json --include-formulation
98+
node bin/cdxgen.js -t jar -t js -t php -t ruby -o sbom-postbuild.cdx.json --include-formulation
9999
100100
# Produce cdxgen binary
101101
pnpm --package=@appthreat/caxa dlx caxa --input . --output cdxgen -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js"
@@ -129,7 +129,7 @@ jobs:
129129
pnpm install:prod --config.node-linker=hoisted
130130
131131
# Generate sbom
132-
node bin/cdxgen.js -t jar -t js -o sbom-postbuild.cdx.json --include-formulation
132+
node bin/cdxgen.js -t jar -t js -t php -t ruby -o sbom-postbuild.cdx.json --include-formulation
133133
134134
# Produce cdxgen binary
135135
pnpm --package=@appthreat/caxa dlx caxa --input . --output cdxgen.exe -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js"
@@ -168,6 +168,9 @@ jobs:
168168
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
169169
with:
170170
node-version: ${{ matrix.node }}
171+
- name: Install composer
172+
uses: shivammathur/setup-php@v2
173+
if: ${{ matrix.os == 'darwin' }}
171174
- name: Get user info
172175
id: user_info
173176
if: ${{ matrix.os == 'linux' }}
@@ -199,6 +202,9 @@ jobs:
199202
# Install pnpm
200203
npm install --global pnpm
201204
205+
# Install composer
206+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
207+
202208
# Build
203209
${{ matrix.cmd }}
204210

lib/cli/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6081,7 +6081,9 @@ export function createPHPBom(path, options) {
60816081
if (DEBUG_MODE) {
60826082
console.log("About to invoke composer --version");
60836083
}
6084-
const versionResult = safeSpawnSync("composer", ["--version"]);
6084+
const versionResult = safeSpawnSync("composer", ["--version"], {
6085+
shell: isWin,
6086+
});
60856087
if (versionResult.status !== 0 || versionResult.error) {
60866088
console.error(
60876089
"No composer version found. Check if composer is installed and available in PATH.",

0 commit comments

Comments
 (0)