Skip to content

Commit 6fb89be

Browse files
authored
feat(docs): update contract examples (#2489)
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent f76aa50 commit 6fb89be

29 files changed

+526
-393
lines changed
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
schemaVersion: v1
2-
31
# Require both a container image reference and a CycloneDX SBOM with the attestation happening in Azure Devops Pipeline
4-
materials:
5-
- type: CONTAINER_IMAGE
6-
name: image
7-
output: true
2+
apiVersion: chainloop.dev/v1
3+
kind: Contract
4+
metadata:
5+
name: azure-pipeline
6+
description: Require both a container image reference and a CycloneDX SBOM with the attestation happening in Azure Devops Pipeline
7+
spec:
8+
materials:
9+
- type: CONTAINER_IMAGE
10+
name: image
11+
output: true
812

9-
- type: SBOM_CYCLONEDX_JSON
10-
name: sbom
13+
- type: SBOM_CYCLONEDX_JSON
14+
name: sbom
1115

12-
runner:
13-
type: "AZURE_PIPELINE"
16+
runner:
17+
type: "AZURE_PIPELINE"
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Require both a container image reference and a CycloneDX SBOM with the attestation happening in GitHub actions
2-
schemaVersion: v1
2+
apiVersion: chainloop.dev/v1
3+
kind: Contract
4+
metadata:
5+
name: github
6+
description: Require both a container image reference and a CycloneDX SBOM with the attestation happening in GitHub actions
7+
spec:
8+
materials:
9+
- type: CONTAINER_IMAGE
10+
name: image
11+
output: true
312

4-
materials:
5-
- type: CONTAINER_IMAGE
6-
name: image
7-
output: true
13+
- type: SBOM_CYCLONEDX_JSON
14+
name: sbom
815

9-
- type: SBOM_CYCLONEDX_JSON
10-
name: sbom
11-
12-
runner:
13-
type: "GITHUB_ACTION"
16+
runner:
17+
type: "GITHUB_ACTION"
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
schemaVersion: v1
2-
31
# Require both a container image reference and a CycloneDX SBOM with the attestation happening in Gitlab
4-
materials:
5-
- type: CONTAINER_IMAGE
6-
name: image
7-
output: true
2+
apiVersion: chainloop.dev/v1
3+
kind: Contract
4+
metadata:
5+
name: gitlab
6+
description: Require both a container image reference and a CycloneDX SBOM with the attestation happening in Gitlab
7+
spec:
8+
materials:
9+
- type: CONTAINER_IMAGE
10+
name: image
11+
output: true
812

9-
- type: SBOM_CYCLONEDX_JSON
10-
name: sbom
13+
- type: SBOM_CYCLONEDX_JSON
14+
name: sbom
1115

12-
runner:
13-
type: "GITLAB_PIPELINE"
16+
runner:
17+
type: "GITLAB_PIPELINE"
Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
schemaVersion: v1
2-
materials:
3-
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#45-profile-5-vex
4-
- type: CSAF_VEX
5-
name: vex-disclosure
6-
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#43-profile-3-informational-advisory
7-
- type: CSAF_INFORMATIONAL_ADVISORY
8-
name: informational-advisory
9-
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#44-profile-4-security-advisory
10-
- type: CSAF_SECURITY_ADVISORY
11-
name: security-advisory
12-
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#42-profile-2-security-incident-response
13-
- type: CSAF_SECURITY_INCIDENT_RESPONSE
14-
name: security-incident-response
1+
apiVersion: chainloop.dev/v1
2+
kind: Contract
3+
metadata:
4+
name: contract
5+
description: Contract for CSAF advisories and VEX
6+
spec:
7+
materials:
8+
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#45-profile-5-vex
9+
- type: CSAF_VEX
10+
name: vex-disclosure
11+
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#43-profile-3-informational-advisory
12+
- type: CSAF_INFORMATIONAL_ADVISORY
13+
name: informational-advisory
14+
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#44-profile-4-security-advisory
15+
- type: CSAF_SECURITY_ADVISORY
16+
name: security-advisory
17+
# Refs: https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#42-profile-2-security-incident-response
18+
- type: CSAF_SECURITY_INCIDENT_RESPONSE
19+
name: security-incident-response
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Empty Chainloop contract valid for a workflow run in a Azure Pipeline
2-
schemaVersion: "v1"
32
# See https://docs.chainloop.dev/reference/operator/contract#runner-context
4-
runner:
5-
type: "AZURE_PIPELINE"
3+
apiVersion: chainloop.dev/v1
4+
kind: Contract
5+
metadata:
6+
name: azure-pipeline
7+
description: Empty Chainloop contract valid for a workflow run in a Azure Pipeline
8+
spec:
9+
runner:
10+
type: "AZURE_PIPELINE"
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# Empty Chainloop contract valid for any runner type
2-
schemaVersion: "v1"
2+
apiVersion: chainloop.dev/v1
3+
kind: Contract
4+
metadata:
5+
name: generic
6+
description: Empty Chainloop contract valid for any runner type
7+
spec:
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Empty Chainloop contract valid for a workflow run in a Github Action
2-
schemaVersion: "v1"
32
# See https://docs.chainloop.dev/reference/operator/contract#runner-context
4-
runner:
5-
type: "GITHUB_ACTION"
3+
apiVersion: chainloop.dev/v1
4+
kind: Contract
5+
metadata:
6+
name: github
7+
description: Empty Chainloop contract valid for a workflow run in a Github Action
8+
spec:
9+
runner:
10+
type: "GITHUB_ACTION"
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Empty Chainloop contract valid for a workflow run in a Gitlab pipeline
2-
schemaVersion: "v1"
32
# See https://docs.chainloop.dev/reference/operator/contract#runner-context
4-
runner:
5-
type: "GITLAB_PIPELINE"
3+
apiVersion: chainloop.dev/v1
4+
kind: Contract
5+
metadata:
6+
name: gitlab
7+
description: Empty Chainloop contract valid for a workflow run in a Gitlab pipeline
8+
spec:
9+
runner:
10+
type: "GITLAB_PIPELINE"
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
schemaVersion: v1
2-
materials:
3-
- type: HELM_CHART
4-
name: helm-chart
1+
apiVersion: chainloop.dev/v1
2+
kind: Contract
3+
metadata:
4+
name: contract
5+
description: Contract for Helm chart attestation
6+
spec:
7+
materials:
8+
- type: HELM_CHART
9+
name: helm-chart
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
schemaVersion: v1
2-
materials:
3-
- type: SARIF
4-
name: static-output
1+
apiVersion: chainloop.dev/v1
2+
kind: Contract
3+
metadata:
4+
name: sarif
5+
description: Contract for SARIF static analysis output
6+
spec:
7+
materials:
8+
- type: SARIF
9+
name: static-output

0 commit comments

Comments
 (0)