Skip to content
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

Add artifact signature information to the generated index #312

Merged
merged 6 commits into from
Sep 19, 2023

Conversation

maxgio92
Copy link
Member

@maxgio92 maxgio92 commented Jul 18, 2023

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area registry
/area build

What this PR does / why we need it:

This PR is needed to provide required information for consumers in order to verify OCI signatures of plugins officially distributed as OCI artifacts.

The registry.yaml index is consumed by current CI to generate the general Falco artifacts index https://github.com/falcosecurity/falcoctl/blob/gh-pages/index.yaml, which can be further consumed by falcoctl to verify artifacts (i.e. plugins) signatures.

Which issue(s) this PR fixes:

Fixes #306

Special notes for your reviewer:

Only one signin implementation is currently supported, which is based on cosign. When signatures are generated by cosign in keyless mode, can provide the OIDC issuer and certificate identity (see falcosecurity/falcoctl#305).

Furthermore, this PR adds black box and white box unit tests.

The same feature should be applied to the registry tool of the rules.

github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.34
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11
github.com/blang/semver v3.5.1+incompatible
github.com/falcosecurity/falcoctl v0.3.0-rc6
github.com/falcosecurity/falcoctl v0.5.2-0.20230707100440-5e6ce83dedba
Copy link
Member Author

Choose a reason for hiding this comment

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

Proposal: would we want to publish a pre-release?

Copy link
Contributor

Choose a reason for hiding this comment

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

We have 0.6.1 released now :)

@maxgio92 maxgio92 changed the title WIP: Add signatures to the generated index WIP: Add artifact signature information to the generated index Jul 19, 2023
@maxgio92 maxgio92 force-pushed the issue/306 branch 8 times, most recently from 716c61e to 8c543c3 Compare July 20, 2023 17:29
@maxgio92 maxgio92 changed the title WIP: Add artifact signature information to the generated index Add artifact signature information to the generated index Jul 20, 2023
@maxgio92 maxgio92 marked this pull request as ready for review July 20, 2023 17:30
@poiana poiana requested a review from leogr July 20, 2023 17:30
"github.com/falcosecurity/plugins/build/registry/pkg/registry"
)

func TestPluginToIndexEntrySignature(t *testing.T) {
Copy link
Member Author

Choose a reason for hiding this comment

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

These unit tests assert the minimum expectations from this feature.

registryName = "ghcr.io"
)

var _ = Describe("Update index", func() {
Copy link
Member Author

@maxgio92 maxgio92 Jul 20, 2023

Choose a reason for hiding this comment

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

These black box unit test provide the minimum expected behaviour with specifications of the index update from the registry manifest. It should be then extended.

@leogr
Copy link
Member

leogr commented Aug 10, 2023

Hey @maxgio92

I lost track of this. What's the status? Is this ready to be merged? 🤔

cc @jasondellaluce @LucaGuerra

PS I see some tests failing.

@maxgio92
Copy link
Member Author

Hi @leogr, sorry for the delay. The PR is ready to be reviewed.

@maxgio92 maxgio92 force-pushed the issue/306 branch 2 times, most recently from 3cb64a4 to bb81fd8 Compare August 24, 2023 16:14
@maxgio92
Copy link
Member Author

Hey @LucaGuerra, I've just rebased and upgraded falcoctl to v0.6.1

@LucaGuerra
Copy link
Contributor

Thank you Max!

I have performed a complete test of this patch by:

  1. signing all the artifacts with a separate PR
  2. updating an index file with this code
  3. using falcoctl to install all artifacts and testing signatures

and it worked 🎉

I think we can merge this 🚀

@poiana
Copy link
Contributor

poiana commented Sep 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leogr, maxgio92

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 166e0c0 into falcosecurity:master Sep 19, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add signatures to the generated index
4 participants