Skip to content

Generate a SBOM for the Enterprise image#644

Merged
jviotti merged 1 commit intomainfrom
enterprise-sbom
Feb 24, 2026
Merged

Generate a SBOM for the Enterprise image#644
jviotti merged 1 commit intomainfrom
enterprise-sbom

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 16, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

@jviotti jviotti force-pushed the enterprise-sbom branch 23 times, most recently from 6c201b8 to f74ed28 Compare February 24, 2026 16:58
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti marked this pull request as ready for review February 24, 2026 17:21
@jviotti jviotti merged commit b0dba89 into main Feb 24, 2026
5 checks passed
@jviotti jviotti deleted the enterprise-sbom branch February 24, 2026 17:21
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 9 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="enterprise/scripts/sbom.js">

<violation number="1" location="enterprise/scripts/sbom.js:23">
P1: Avoid interpolating the untrusted `image` argument into shell commands executed via execSync; this enables command injection. Use execFile/execFileSync with an арг array to avoid shell parsing, or validate/sanitize `image` before use.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

execSync(`docker pull ${image}`, { stdio: [ "ignore", "inherit", "inherit" ] });
}

const container = execSync(`docker create ${image}`, { encoding: "utf-8" }).trim();
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Avoid interpolating the untrusted image argument into shell commands executed via execSync; this enables command injection. Use execFile/execFileSync with an арг array to avoid shell parsing, or validate/sanitize image before use.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At enterprise/scripts/sbom.js, line 23:

<comment>Avoid interpolating the untrusted `image` argument into shell commands executed via execSync; this enables command injection. Use execFile/execFileSync with an арг array to avoid shell parsing, or validate/sanitize `image` before use.</comment>

<file context>
@@ -0,0 +1,114 @@
+    execSync(`docker pull ${image}`, { stdio: [ "ignore", "inherit", "inherit" ] });
+  }
+
+  const container = execSync(`docker create ${image}`, { encoding: "utf-8" }).trim();
+  execSync(`docker cp ${container}:/usr/share/sourcemeta/one/npm-packages.spdx.json ${workdir}/npm.json`);
+  execSync(`docker cp ${container}:/usr/share/sourcemeta/one/vendor-packages.spdx.json ${workdir}/vendor.json`);
</file context>
Fix with Cubic

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.

1 participant