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

Sign Containers #5

Closed
irongut opened this issue Jan 31, 2022 · 3 comments
Closed

Sign Containers #5

irongut opened this issue Jan 31, 2022 · 3 comments
Assignees
Labels
DevOps enhancement New feature or request

Comments

@irongut
Copy link
Owner

irongut commented Jan 31, 2022

Feature Request

GitHub recently added container signing to GitHub Actions, add the signing steps to the release workflow.

Additional Context

Safeguard your containers with new container signing capability in GitHub Actions
SigStore
Sample Workflow

Linked To

@irongut irongut added enhancement New feature or request DevOps labels Jan 31, 2022
@irongut irongut self-assigned this Jan 31, 2022
@github-actions
Copy link

github-actions bot commented May 2, 2022

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days.

@irongut
Copy link
Owner Author

irongut commented Jul 7, 2022

Cosign fails to sign the release:

Run cosign sign ghcr.io/irongut/editrelease:v1.2.0
Generating ephemeral keys...
Retrieving signed certificate...
        Note that there may be personally identifiable information associated with this signed artifact.
        This may include the email address associated with the account with which you authenticate.
        This information will be used for signing this artifact and will be stored in public transparency logs and cannot be removed later.
Successfully verified SCT...
tlog entry created with index: 2876421
Pushing signature to: ghcr.io/irongut/editrelease
/home/runner/work/_temp/785f9673-daf7-4da5-b572-15d3eef1f326.sh: line 2: ghcr.io/irongut/editrelease:latest@sha256:37ae60e4115c31bccdbb9ee7e8e1bb32384c1c77657b1f0e51bb4997d4c4ec3e: No such file or directory
Error: Process completed with exit code 127.

Problem appears to be multiple tags, see: actions/starter-workflows#1620

Workaround: actions/starter-workflows#1622

@irongut irongut closed this as completed Jul 7, 2022
@irongut
Copy link
Owner Author

irongut commented Jul 8, 2022

How to Verify Signature

  1. Install sigstore/cosign.
  2. Run: COSIGN_EXPERIMENTAL=1 cosign verify ghcr.io/irongut/editrelease:v1.2.0 (Linux)
$ COSIGN_EXPERIMENTAL=1 cosign verify ghcr.io/irongut/editrelease:v1.2.0

Verification for ghcr.io/irongut/editrelease:v1.2.0 --
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - Existence of the claims in the transparency log was verified offline
  - Any certificates were verified against the Fulcio roots.
[
    {
        "critical": {
            "identity": {
                "docker-reference": "ghcr.io/irongut/editrelease"
            },
            "image": {
                "docker-manifest-digest": "sha256:a68ecd1ac7ba32ca07bc03b069f250200cf9e532e9496872aa4a3cb1d82bb167"
            },
            "type": "cosign container image signature"
        },
        "optional": {
            "Bundle": {
                "SignedEntryTimestamp": "MEUCIHBJohar/9eLpPN1KoVdlwaFGp1GxDQPLWM7njiMjM/0AiEAoeLToERfpodMhlQnkJp9MblZ3Ys2vgQ8yQbia1owWF0=",
                "Payload": {
                    "body": "eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiJkNDlkY2YyODUyNDk2NTZkN2Y3NDIwMDA3Zjc4YmFjYTMwMjlhYTZjZGRmZDM3NWYxMzdmODgzNGMyMGQ5ZDU5In19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FWUNJUUNyS1ZIZmkzUDFqZ3E1MXR2Z0ptTUxJS0NCNFgyUnlha1l6YWl1V0pHcUNBSWhBSVdNUjFaM05MQTNWY1M3WWlEdE15T3ZGemZyMXhwNW5idld1RHFGanJ6byIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVUnlWRU5EUVhwVFowRjNTVUpCWjBsVlREY3hXbXBHVkRKNk5FMHpRMnhYT1RkNVR6VjJTbmxaVkZObmQwTm5XVWxMYjFwSmVtb3dSVUYzVFhjS1RucEZWazFDVFVkQk1WVkZRMmhOVFdNeWJHNWpNMUoyWTIxVmRWcEhWak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0S0xTMHRMUzFGVGtRZ1EwVlNWRWxHU1VOQlZFVXRMUzB0TFFvPSJ9fX19",
                    "integratedTime": 1657234760,
                    "logIndex": 2876511,
                    "logID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
                }
            },
            "Issuer": "https://token.actions.githubusercontent.com",
            "Subject": "https://github.com/irongut/EditRelease/.github/workflows/release-build.yml@refs/tags/v1.2.0"
        }
    },
    {
        "critical": {
            "identity": {
                "docker-reference": "ghcr.io/irongut/editrelease"
            },
            "image": {
                "docker-manifest-digest": "sha256:a68ecd1ac7ba32ca07bc03b069f250200cf9e532e9496872aa4a3cb1d82bb167"
            },
            "type": "cosign container image signature"
        },
        "optional": {
            "Bundle": {
                "SignedEntryTimestamp": "MEYCIQCSBs+GxYXzQpglAQ7Xvm6u3ZwwESImnSHFzonxA1aPnwIhAMEVHT4O+9DHuUfNmYQnBa1k6CBvEHrh1jU5yFTQBayc",
                "Payload": {
                    "body": "eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiJkNDlkY2YyODUyNDk2NTZkN2Y3NDIwMDA3Zjc4YmFjYTMwMjlhYTZjZGRmZDM3NWYxMzdmODgzNGMyMGQ5ZDU5In19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FVUNJUUQvK09GU1NwNXQyWUxzV3RFUllrcVc4QlRTZ2VTUlpBYjhoMzRrN09Gc3RBSWdRMXo1VkdjVy9SQmZqSnM2cGZBK0pPY2VUY2psOEk2cGRyM0E1dXhJS253PSIsInB1YmxpY0tleSI6eyJjb250ZW50IjoiTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVUnlha05EUVhwVFowRjNTVUpCWjBsVlkyeEpUamM1WVV4NU9VdFdjMFZpUVZONVVqaz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5dlNYTTFla2g0YjFFS2NXTXZjM0ZMUm5SRFNqazBNMmcwYUZWUFltWXpXSGxSUlhKUk1FWnlWMWQwVW1SWE5FTlZMMmxzWTNkVGR6MDlDaTB0TFMwdFJVNUVJRU5GVWxSSlJrbERRVlJGTFMwdExTMEsifX19fQ==",
                    "integratedTime": 1657234763,
                    "logIndex": 2876512,
                    "logID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
                }
            },
            "Issuer": "https://token.actions.githubusercontent.com",
            "Subject": "https://github.com/irongut/EditRelease/.github/workflows/release-build.yml@refs/tags/v1.2.0"
        }
    }
]

The docker-manifest-digest values should match the sha256 hash published on the packages page.

@irongut irongut pinned this issue Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant