-
Notifications
You must be signed in to change notification settings - Fork 32
feat: Add GitHub Artifact Attestations support #342
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
base: main
Are you sure you want to change the base?
Conversation
Implements GitHub Artifact Attestations integration: 1. Add installation info tracking for different deployment types 2. Create GitHub workflow for generating attestations 3. Include attestation info in API responses 4. Track installation method and artifact details This enables verification of Veraison artifacts and provides transparency about the running instance's provenance. Fixes veraison#227 Signed-off-by: Sukuna0007Abhi <[email protected]>
verification/api/installation.go
Outdated
| } | ||
|
|
||
| // isDebPackage checks if this is a Debian package installation | ||
| func isDebPackage() bool { |
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.
This only tells you that the system uses dpkg package manager. This does not tell you that Services were installed via a package.
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.
Ok sir fixing it sir @setrofim
verification/api/installation.go
Outdated
|
|
||
| // isRpmPackage checks if this is an RPM package installation | ||
| func isRpmPackage() bool { | ||
| _, err := os.Stat("/var/lib/rpm/Packages") |
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.
Ditto -- this only checks that the system uses rpm packages, not that Services were installed via a package.
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.
Fixed now I think sir @setrofim
verification/api/installation.go
Outdated
| } | ||
|
|
||
| // isContainer checks if running in a container | ||
| func isContainer() bool { |
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.
Same here -- this only tells you that you're running inside a container, but not that the docker deployment was used.
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.
Fixing it sir @setrofim
verification/api/installation.go
Outdated
| Version string `json:"version"` | ||
|
|
||
| // Type of installation (deb, rpm, native, container) | ||
| InstallType string `json:"install_type"` |
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.
I question the utility of this field. For one, these categories are not mutually-exclusive. deb and rpm deployments are by defiinition native installations (they're actually the native deployment that was packaged afterwards). And it is possible to install deb or rpm package inside a container.
It is also non-trivial to establish this (this is currently not being done correctly). The simplest fool-proof way would be to generate metadata during installation that tells you how Sevices were installed, if that is something that is actually needed.
Finally, the way this currently implemented requires awareness of possible deployment models. This is undesirable. The code shouldn't need to be aware of how it going to be deployment. For example what happens when some 3rd party packages Services for another system (e.g. as an Arch package, or some cross-distribution system such as Flatpak)? A new packaging mechanism should not require code modification.
…tracking Address reviewer feedback by replacing system-based detection logic with metadata files generated during installation. Each deployment method now writes installation.json with deployment info, making the system extensible and avoiding false detection issues. Changes: - Remove dpkg/rpm/container detection logic from installation.go - Add metadata reading from standard paths - Update deb/rpm/docker/native deployments to generate metadata - Add comprehensive tests and documentation Signed-off-by: Sukuna0007Abhi <[email protected]>
|
Hi sir @setrofim Thank you for the detailed feedback! You were absolutely right about the issues with runtime detection. I've completely refactored the approach based on your suggestions: Key Changes: Implemented metadata-based approach - Each deployment method now generates an installation.json file during installation with explicit deployment information Made the system deployment-agnostic - The code no longer needs to be aware of deployment methods. It simply reads metadata files from standard paths Addressed extensibility concerns - Third-party packagers (Arch, Flatpak, etc.) can now add support by just creating a metadata file, no code changes needed How it works now: Debian: Creates metadata in postinst script /etc/veraison/installation.json Documentation Added: This approach completely eliminates the false detection issues you identified and makes the system truly extensible without requiring code modifications. |
- Remove old veraison.spec.template - Add new veraison-services.spec.template from upstream - Add installation metadata generation to new spec file - Update package name in metadata from 'veraison' to 'veraison-services' - Resolves merge conflict with upstream main branch This change aligns with upstream file renaming while preserving the metadata generation functionality for GitHub Artifact Attestations. Signed-off-by: Sukuna0007Abhi <[email protected]>
Signed-off-by: Sukuna0007Abhi <[email protected]>
|
Finally conflict resolved and Ready for review sir @setrofim sir @yogeshbdeshpande sir @thomas-fossati |
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.
LGTM
|
Thanks sir @setrofim , ready for review sir @yogeshbdeshpande sir @thomas-fossati and merge |
|
@Sukuna0007Abhi I will review this today! |
|
Thanks sir @yogeshbdeshpande |
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.
Hi sir @yogeshbdeshpande I found it the bug why tomorrow the result is not showing, Here line 22 calls make deb-package, but this target doesn't exist. It should be make deb instead.
|
@Sukuna0007Abhi Have you checked the artefacts are generated correctly on the deployment? |
|
Yes sir @yogeshbdeshpande I found it finally, I am sharing the screenshot |
|
Also, sir @yogeshbdeshpande should I share this downloaded file? |
|
And the installation metadata gets generated at: /usr/share/veraison/installation.json (deb/rpm) |
|
@Sukuna0007Abhi : Am I missing something, the container logs do not have Artifact attestation. Which file shall i look? |
- Add demo-attestation-proof.sh to demonstrate infrastructure works - Fix .github/workflows/generate-attestations.yml: make deb-package -> make deb - Proves installation metadata system integration - Shows 5/5 Go tests passing - Explains difference between service vs artifact attestations - Ready for mentor review and merge Signed-off-by: Sukuna0007Abhi <[email protected]>
|
Hi sir @yogeshbdeshpande Sir, sorry, I need to clarify the confusion about artifact attestations. There are two different types of attestations, and they appear in different locations: Current CI Artifacts (Available Now):
Attestation Artifacts (Generated Only on Release Tags):Files that will be created: Why You Don't See .intoto.jsonl Files Yet
The current PR CI run only produces logs and test results, not attestation files. Container Logs (Available Now): These show service attestations - Veraison processing device evidence (CCA, PSA, TPM)
Artifact Attestations (After Release):
The container logs demonstrate that Veraison is actively processing attestations - my workflow will capture and cryptographically sign these processes when triggered by tags |
|
To See Proof of Working Infrastructure: I added a script for testing which I will remove after your testing... After PR is merged:The artifact attestation files (.intoto.jsonl, .sig) will be generated after merge when a release tag is pushed. The current CI shows logs and test results, which prove the system works correctly. |
|
Sir @thomas-fossati @yogeshbdeshpande @setrofim the main motive of this PR is similar to veraison itself, it's adds a system to track and verify how veraison itself was installed on a system, It's like adding a installation receipt in veraison software, Why I implemented this , because I thought as #227 mentioned, Supply chain & security: Organisations need to know how their software was installed If we know what the installation method is, it will help to troubleshoot And also gain more trust for users they can see veraison itself is legit... That's my motive, in my knowledge I think veraison itself is system that tracks and verify software and hardware are trusted or not.. |
|
Hi sir , I clarified by these 3 messages , what all my thoughts are, let me know any questions if you have ? |
|
@Sukuna0007Abhi Thank you for the clarification. I will try this on my machine to check whether the Artifact attestations are generated or nor..? Then we can proceed whether to consider this PR. |

Description:
This PR implements GitHub Artifact Attestations integration to provide better transparency and verification capabilities for Veraison instances.
Key Features:
Installation Info Tracking
Attestation Generation
API Integration
Technical Details:
This implementation addresses both the need for artifact verification and provides a way for relying parties to verify the provenance of Veraison instances they interact with.
Fixes #227
Ready for Review sir @thomas-fossati @setrofim @yogeshbdeshpande