-
-
Notifications
You must be signed in to change notification settings - Fork 226
feat: sbom generation ubuntu and nix packages #1973
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
Open
samrose
wants to merge
10
commits into
develop
Choose a base branch
from
sbom-create
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,968
−67
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6e1342a
feat: sbom generation ubuntu and nix packages
samrose 6367ec0
fix: https://cwe.mitre.org/data/definitions/23.html issue
samrose 87fb5c5
fix: update nixpkgs version for sbomnix
samrose 7d1d1d2
fix: flake lock
samrose 5bd4d2f
feat: cleanup and tests
samrose 2e97fa8
fix: restore package
samrose d035a38
feat: read manifest for paths and create/upload sbom
samrose a881715
fix: Added the security assumption comment to Generate() and a refere…
samrose 842b630
fix: remove sbom create at this point
samrose dfa1fd5
chore: clean up and rm old stage 1 sbom creation
samrose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: supabase/postgres
Length of output: 301
🏁 Script executed:
Repository: supabase/postgres
Length of output: 7876
🏁 Script executed:
Repository: supabase/postgres
Length of output: 88
🏁 Script executed:
# Check the build-ami action for SBOM handling cat .github/actions/build-ami/action.ymlRepository: supabase/postgres
Length of output: 3139
🏁 Script executed:
# Check the Packer config for SBOM download provisioner cat stage2-nix-psql.pkr.hclRepository: supabase/postgres
Length of output: 2515
🏁 Script executed:
# Check nix-provision.sh for SBOM generation cat scripts/nix-provision.shRepository: supabase/postgres
Length of output: 2615
🏁 Script executed:
Repository: supabase/postgres
Length of output: 43
🏁 Script executed:
Repository: supabase/postgres
Length of output: 43
🏁 Script executed:
# Check the main playbook that's being run cat ansible/playbook.ymlRepository: supabase/postgres
Length of output: 6889
🏁 Script executed:
Repository: supabase/postgres
Length of output: 43
🏁 Script executed:
Repository: supabase/postgres
Length of output: 43
🏁 Script executed:
Repository: supabase/postgres
Length of output: 85
🏁 Script executed:
Repository: supabase/postgres
Length of output: 523
🏁 Script executed:
Repository: supabase/postgres
Length of output: 872
🏁 Script executed:
Repository: supabase/postgres
Length of output: 450
🏁 Script executed:
Repository: supabase/postgres
Length of output: 23564
🏁 Script executed:
# Now let's check the build-ami.nix to see if it generates the SBOM file cat nix/packages/build-ami.nixRepository: supabase/postgres
Length of output: 5465
🏁 Script executed:
Repository: supabase/postgres
Length of output: 226
🏁 Script executed:
Repository: supabase/postgres
Length of output: 7502
The SBOM file (
nix-sbom.spdx.json) is not currently generated or made available in the workflow.Between the
Build AMIstep and theUpload SBOMstep, there is no mechanism to generate or download the SBOM file. The build-ami action runs Packer provisioning throughstage2-nix-psql.pkr.hclandnix-provision.sh, which invokes an Ansible playbook, but none of these steps producenix-sbom.spdx.jsonin the workflow runner's working directory. There is no step to copy the file from the EC2 instance back to the workflow.A SBOM generator tool exists in the repository at
nix/packages/sbom/, but it is not integrated into the build pipeline. The conditional check at line 208 will always fail, and the upload will always be skipped with a warning.Integrate SBOM generation into the build pipeline (either by adding a provisioner step in the Packer config or by calling the sbom tool after the AMI build), or if SBOM is not required, remove the incomplete upload step entirely. If SBOM is critical for compliance, fail the workflow when the file is missing rather than just warning.
🤖 Prompt for AI Agents