-
-
Notifications
You must be signed in to change notification settings - Fork 211
Collect node bundled components in formulation #2087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
"GRADLE_", | ||
"NODE_", | ||
]; | ||
const envBlocklist = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To the best of my knowledge, this must exclude any secrets. Also manually tested by extracting one of the generated Sea binaries from here. Maybe further filtering might be required to be safe.
@@ -87,9 +87,12 @@ jobs: | |||
# Set the commands | |||
- cmd: | | |||
# Prepare workspace | |||
rm -rf ci contrib tools_config | |||
rm -rf ci test contrib tools_config devenv.* ADVANCED.md pyproject.toml renovate.json uv.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple unwanted files were getting included in the Sea binaries, since caxa wasn't filtering them all by default. To identify this, execute the binary once with --help
and then navigate to $TMPDIR/caxa/applications/cdxgen/<rand>/0
directory.
.github/workflows/binary-builds.yml
Outdated
Remove-Item contrib -Recurse -Force | ||
Remove-Item tools_config -Recurse -Force | ||
npm install --omit=dev --no-package-lock --no-audit --no-fund --no-progress | ||
|
||
# Generate sbom (imprecise) | ||
node bin/cdxgen.js -t js --exclude "**/test/**" -o sbom-postbuild-js.cdx.json --include-formulation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we build Windows binaries using npm and without a lock file, the generated SBOM is slightly imprecise since it will be based on the pnpm lockfile.
pnpm install --config.strict-dep-builds=true --virtual-store-dir node_modules/pnpm --prod --package-import-method copy --frozen-lockfile | ||
|
||
# Generate sbom | ||
node bin/cdxgen.js -t js -t jar -t ruby --exclude "**/test/**" -o sbom-postbuild.cdx.json --include-formulation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we bundle atom and binary plugins, I have added more types to the generated sbom.
fa71996
to
3c85226
Compare
3c85226
to
b33f0c8
Compare
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
I don't see the NodeJS Runtime anywhere in the SBOM -- is this because your example is from an intermediate version? |
@malice00 I can see the below.
Regarding dotfiles, it is from the listFiles function, which gets the list directly from git. There is already an sbom that gets attached to the releases. The slim version has |
You're right, must have missed it. lgtm |
Also bundle sbom in the generated sea binaries
Fixes #2086
Fixes #2074
Sample sbom with formulation that gets attached to a sea binary
sbom-postbuild-js.cdx.json