You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cosign/private/attest.bzl
+16-6Lines changed: 16 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,25 @@ cosign_attest(
31
31
```
32
32
33
33
via `bazel run :attest_spdx -- --repository=index.docker.io/org/test`
34
+
35
+
You can also omit the `repository` attribute and provide it at runtime.
36
+
```starlark
37
+
cosign_attest(
38
+
name = "attest_no_repo",
39
+
image = ":image",
40
+
predicate = "image.sbom.spdx.json",
41
+
type = "spdx",
42
+
)
43
+
```
44
+
Then run `bazel run :attest_no_repo -- --repository=index.docker.io/org/test`
34
45
"""
35
46
36
47
_attrs= {
37
48
"image": attr.label(allow_single_file=True, mandatory=True, doc="Label to an oci_image"),
38
49
"type": attr.string(values= ["slsaprovenance", "link", "spdx", "vuln", "custom"], mandatory=True, doc="Type of predicate. Acceptable values are (slsaprovenance|link|spdx|vuln|custom)"),
39
50
"predicate": attr.label(allow_single_file=True, mandatory=True, doc="Label to the predicate file. Only files are allowed. eg: sbom.spdx, in-toto.json"),
diff -u --ignore-space-change --strip-trailing-cr "$SBOM_PATH""$TEST_TMPDIR/download.sbom"|| (echo "FAIL: downloaded SBOM does not match the original"&&exit 1)
0 commit comments