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

Generate in-toto attestations from policy results #77

Open
lulf opened this issue Feb 15, 2023 · 2 comments
Open

Generate in-toto attestations from policy results #77

lulf opened this issue Feb 15, 2023 · 2 comments

Comments

@lulf
Copy link
Contributor

lulf commented Feb 15, 2023

Generating in-toto attestations from seedwing policy based on policy and the evaluation results could be useful to later verify that a particular build/artifact met the policy requirements at the time.

@danbev
Copy link
Contributor

danbev commented Apr 24, 2023

The following is a suggestion what this attestation might look like which follows the format of in-toto predicates like SPDX, SLSA Provenance, CycloneDX etc.


Predicate type: Seedwing Policy

Type URI: https://seedwing.io/policy/v0.1

Version: 0.1

Purpose

The purpose of this predicate is to provide proof that a policy rule has been
evaluated.

Prerequisites

The in-toto attestation framework and a Seedwing Policy Engine.

Model

This is a predicate type that fits within the larger Attestation framework.

Schema

TODO:

Parsing Rules

TODO:

Fields

The predicate contains a JSON-encoded Seeding Policy Engine Result.

The subject contains whatever rule/pattern that was evaluated.

Example

{
  // Standard attestation fields:
  "_type": "https://in-toto.io/Statement/v0.1",
  "subject": [{
    "name": "some_pattern_name",
    "digest": { "sha256": "4fec91ebb3dd2ed2f3a620c97acde9fd5805cf0895a651bc6d294bf6e3f0faa83"
  }],

  // Predicate:
  "predicateType": "https://seedwing.io/policy/v0.1"
  "predicate": {
    "evaluationResult": {}
  }
}

Changelog and Migrations

Not applicable for this initial version.

@danbev
Copy link
Contributor

danbev commented Apr 25, 2023

I'm trying to think a use case for this but failing to think of one.

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

No branches or pull requests

2 participants