Skip to content

Commit 664ba4c

Browse files
prabhuerinmcgill
authored andcommitted
adhoc changes (CycloneDX#1672)
* Update atom. Include cocoapods gem. Signed-off-by: Prabhu Subramanian <[email protected]> * Added thought logs for cocoapods Signed-off-by: Prabhu Subramanian <[email protected]> * Added thought logs for cocoapods Signed-off-by: Prabhu Subramanian <[email protected]> --------- Signed-off-by: Prabhu Subramanian <[email protected]> Signed-off-by: emcfins <[email protected]>
1 parent 017a828 commit 664ba4c

File tree

22 files changed

+227
-131
lines changed

22 files changed

+227
-131
lines changed

ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ RUN set -e; \
164164
&& echo 'extension=timezonedb.so' >> /etc/php.ini \
165165
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php \
166166
&& mv composer.phar /usr/local/bin/composer \
167-
&& gem install bundler \
167+
&& gem install bundler cocoapods \
168168
&& gem --version \
169169
&& bundler --version \
170170
&& cd /opt/cdxgen && corepack enable && corepack pnpm install --config.strict-dep-builds=true --prod --package-import-method copy && corepack pnpm cache delete \

ci/Dockerfile-bun

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ RUN set -e; \
130130
&& echo 'extension=timezonedb.so' >> /etc/php.ini \
131131
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php \
132132
&& mv composer.phar /usr/local/bin/composer \
133-
&& gem install bundler \
133+
&& gem install bundler cocoapods \
134134
&& gem --version \
135135
&& bundler --version \
136136
&& chmod a-w -R /opt \

ci/Dockerfile-deno

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ RUN set -e; \
161161
&& echo 'extension=timezonedb.so' >> /etc/php.ini \
162162
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php \
163163
&& mv composer.phar /usr/local/bin/composer \
164-
&& gem install bundler \
164+
&& gem install bundler cocoapods \
165165
&& gem --version \
166166
&& bundler --version \
167167
&& chmod a-w -R /opt \

ci/Dockerfile-ppc64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ RUN set -e; \
103103
&& echo 'extension=timezonedb.so' >> /etc/php.ini \
104104
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php \
105105
&& mv composer.phar /usr/local/bin/composer \
106-
&& gem install bundler \
106+
&& gem install bundler cocoapods \
107107
&& gem --version \
108108
&& bundler --version
109109
COPY . /opt/cdxgen

ci/Dockerfile-secure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ RUN set -e; \
174174
&& echo 'extension=timezonedb.so' >> /etc/php.ini \
175175
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php \
176176
&& mv composer.phar /usr/local/bin/composer \
177-
&& gem install bundler \
177+
&& gem install bundler cocoapods \
178178
&& gem --version \
179179
&& bundler --version \
180180
&& cd /opt/cdxgen && corepack enable && corepack pnpm config set global-bin-dir /opt/bin \

ci/base-images/debian/Dockerfile.ruby33

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
2020
&& ./tmp/install.sh && rm /tmp/install.sh \
2121
&& node -v \
2222
&& npm -v \
23-
&& gem install bundler \
23+
&& gem install bundler cocoapods \
2424
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
2525
&& rm -rf /var/lib/apt/lists/*
2626

ci/base-images/debian/Dockerfile.ruby34

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN apt-get update && apt-get install -qq -y --no-install-recommends curl bash b
1818
&& ./tmp/install.sh && rm /tmp/install.sh \
1919
&& node -v \
2020
&& npm -v \
21-
&& gem install bundler \
21+
&& gem install bundler cocoapods \
2222
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
2323
&& rm -rf /var/lib/apt/lists/*
2424

deno.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cyclonedx/cdxgen",
3-
"version": "11.2.0",
3+
"version": "11.2.1",
44
"exports": "./lib/cli/index.js",
55
"compilerOptions": {
66
"lib": ["deno.window"],
@@ -48,7 +48,7 @@
4848
"gen-types": "npx -p typescript tsc"
4949
},
5050
"imports": {
51-
"@appthreat/atom": "npm:@appthreat/[email protected].12",
51+
"@appthreat/atom": "npm:@appthreat/[email protected].13",
5252
"@appthreat/cdx-proto": "npm:@appthreat/[email protected]",
5353
"@babel/parser": "npm:@babel/parser@^7.26.7",
5454
"@babel/traverse": "npm:@babel/traverse@^7.26.7",
@@ -78,7 +78,7 @@
7878
"yoctocolors": "npm:yoctocolors@^2.1.1",
7979
"jest": "npm:jest@^29.7.0",
8080
"@jest/globals": "npm:@jest/globals@^29.7.0",
81-
"sequelize": "npm:sequelize@^6.37.3",
81+
"sequelize": "npm:sequelize@^6.37.6",
8282
"sqlite3": "npm:sqlite3@^5.1.7",
8383
"body-parser": "npm:body-parser@^2.0.1",
8484
"compression": "npm:compression@^1.7.5",

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cyclonedx/cdxgen",
3-
"version": "11.2.0",
3+
"version": "11.2.1",
44
"exports": "./lib/cli/index.js",
55
"include": ["*.js", "lib/**", "bin/**", "data/**", "types/**"],
66
"exclude": [

lib/cli/index.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5031,14 +5031,20 @@ export async function createCocoaBom(path, options) {
50315031
`${options.multiProject ? "**/" : ""}Podfile`,
50325032
options,
50335033
);
5034+
if (cocoaFiles.length > 1) {
5035+
thoughtLog(
5036+
`There are ${cocoaFiles.length} pod files. I will carefully process each one.`,
5037+
);
5038+
}
5039+
let excludeMessageShown = false;
50345040
for (const podFile of cocoaFiles) {
50355041
const projectPath = dirname(podFile);
50365042
const lockFile = `${podFile}.lock`;
5037-
if (!existsSync(lockFile)) {
5043+
if (!existsSync(lockFile) || options.deep) {
50385044
if (options.installDeps) {
50395045
executePodCommand(["install"], projectPath, options);
50405046
} else {
5041-
console.error(
5047+
console.log(
50425048
"No 'Podfile.lock' found and '--no-install-deps' is set -- A Podfile.lock is needed to parse dependencies!",
50435049
);
50445050
options.failOnError && process.exit(1);
@@ -5095,6 +5101,12 @@ export async function createCocoaBom(path, options) {
50955101
process.env.COCOA_EXCLUDED_TARGETS.split(",").forEach((excludedTarget) =>
50965102
usedTargets.delete(excludedTarget),
50975103
);
5104+
if (!excludeMessageShown) {
5105+
thoughtLog(
5106+
"Wait, the user wants me to exclude certain targets from this CocoaPods project. Perhaps they don't want dev and test projects included in the SBOM 🤔?",
5107+
);
5108+
excludeMessageShown = true;
5109+
}
50985110
}
50995111
let addedObjects = new Set();
51005112
for (const target of usedTargets) {
@@ -7713,7 +7725,7 @@ export async function createBom(path, options) {
77137725
);
77147726
} else {
77157727
thoughtLog(
7716-
`The user wants me to focus on a single type, '${projectType}'. Could there be an issue with auto-detection, or might they use another tool like cyclonedx-cli to merge all the generated BOMs later?`,
7728+
`The user wants me to focus on a single type, '${projectType}'.`,
77177729
);
77187730
}
77197731
}

0 commit comments

Comments
 (0)