tag-publish 1.5.0.dev0__tar.gz → 1.5.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/PKG-INFO +3 -2
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/README.md +2 -1
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/pyproject.toml +1 -1
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/publish.py +7 -6
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/LICENSE +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/__init__.py +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/cli.py +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/configuration.py +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/lib/__init__.py +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/lib/docker.py +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/lib/oidc.py +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/new.py +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/py.typed +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/schema.json +0 -0
- {tag_publish-1.5.0.dev0 → tag_publish-1.5.0.dev2}/tag_publish/versions.yaml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tag-publish
|
|
3
|
-
Version: 1.5.0.
|
|
3
|
+
Version: 1.5.0.dev2
|
|
4
4
|
Summary: Tools used to publish Python packages, Docker images and Helm charts for GitHub tag and branch
|
|
5
5
|
License: FreeBSD
|
|
6
6
|
License-File: LICENSE
|
|
@@ -305,7 +305,8 @@ By default, the last line of the `SECURITY.md` file will be published (`docker`)
|
|
|
305
305
|
#### SBOM attestation
|
|
306
306
|
|
|
307
307
|
By default (`sbom: True`), once the image is pushed, tag-publish generates a CycloneDX SBOM with
|
|
308
|
-
[syft](https://github.com/anchore/syft)
|
|
308
|
+
[syft](https://github.com/anchore/syft) from the local image (without downloading it again from the
|
|
309
|
+
registry) and attaches it to every published tag as a keyless
|
|
309
310
|
[cosign](https://github.com/sigstore/cosign) attestation (`cosign attest-blob`) on the registry.
|
|
310
311
|
|
|
311
312
|
The publishing job requires the `packages: write` permission (to push the image and the
|
|
@@ -262,7 +262,8 @@ By default, the last line of the `SECURITY.md` file will be published (`docker`)
|
|
|
262
262
|
#### SBOM attestation
|
|
263
263
|
|
|
264
264
|
By default (`sbom: True`), once the image is pushed, tag-publish generates a CycloneDX SBOM with
|
|
265
|
-
[syft](https://github.com/anchore/syft)
|
|
265
|
+
[syft](https://github.com/anchore/syft) from the local image (without downloading it again from the
|
|
266
|
+
registry) and attaches it to every published tag as a keyless
|
|
266
267
|
[cosign](https://github.com/sigstore/cosign) attestation (`cosign attest-blob`) on the registry.
|
|
267
268
|
|
|
268
269
|
The publishing job requires the `packages: write` permission (to push the image and the
|
|
@@ -100,7 +100,7 @@ include = [
|
|
|
100
100
|
]
|
|
101
101
|
requires-python = ">=3.11"
|
|
102
102
|
dependencies = ["PyYAML<7,>=6", "security-md<2,>=1", "githubkit<1,>=0.17.1", "githubkit-schemas<27,>=26"]
|
|
103
|
-
version = "1.5.0.
|
|
103
|
+
version = "1.5.0.dev2"
|
|
104
104
|
|
|
105
105
|
[project.optional-dependencies]
|
|
106
106
|
pypi = ["requests<3,>=2", "twine<7,>=6", "id<2,>=1"]
|
|
@@ -324,7 +324,7 @@ def docker(
|
|
|
324
324
|
images_full += new_images_full
|
|
325
325
|
|
|
326
326
|
if image_config.get("sbom", tag_publish.configuration.DOCKER_IMAGE_SBOM_DEFAULT):
|
|
327
|
-
_publish_sbom(new_images_full)
|
|
327
|
+
_publish_sbom(new_images_full, f"{image_config['name']}:{tag_src}")
|
|
328
328
|
|
|
329
329
|
print("::endgroup::")
|
|
330
330
|
except subprocess.CalledProcessError as exception:
|
|
@@ -335,16 +335,17 @@ def docker(
|
|
|
335
335
|
return True
|
|
336
336
|
|
|
337
337
|
|
|
338
|
-
def _publish_sbom(images: list[str]) -> None:
|
|
338
|
+
def _publish_sbom(images: list[str], local_image: str) -> None:
|
|
339
339
|
"""
|
|
340
340
|
Publish the SBOM of the pushed images as a keyless cosign attestation.
|
|
341
341
|
|
|
342
|
-
The CycloneDX SBOM is generated with syft on the
|
|
343
|
-
|
|
344
|
-
tag with `cosign attest-blob`.
|
|
342
|
+
The CycloneDX SBOM is generated with syft on the local image, exactly the same
|
|
343
|
+
content as what has just been pushed but without downloading it again from the
|
|
344
|
+
registry, and it is then attached to every published tag with `cosign attest-blob`.
|
|
345
345
|
|
|
346
346
|
Arguments:
|
|
347
347
|
images: The published image references, host/name:tag
|
|
348
|
+
local_image: The source image reference in the local Docker daemon
|
|
348
349
|
|
|
349
350
|
"""
|
|
350
351
|
tag_publish.download_application("anchore/syft", extra="docker")
|
|
@@ -353,7 +354,7 @@ def _publish_sbom(images: list[str]) -> None:
|
|
|
353
354
|
with tempfile.TemporaryDirectory() as folder:
|
|
354
355
|
sbom_filename = Path(folder) / "sbom.cdx.json"
|
|
355
356
|
subprocess.run(
|
|
356
|
-
["syft",
|
|
357
|
+
["syft", f"docker:{local_image}", f"--output=cyclonedx-json={sbom_filename}"],
|
|
357
358
|
check=True,
|
|
358
359
|
)
|
|
359
360
|
for image in images:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|