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

Log public signing key thumbprint and signed step payload #2853

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

jordandcarter
Copy link
Contributor

@jordandcarter jordandcarter commented Jun 27, 2024

Description

To aid debugging signing verification failures this PR introduces a new flag --debug-signing which will log to both agent and job logs the step payload as it is signed and verified. This will allow asserting the payloads match when tracking down the verification failures. This is intended for development debugging purposes. ⚠️ Using --debug-signing will log the step payloads in full to the job logs when uploading steps, this could leak secrets to those with access to the build and thus the job logs.

Context

Updates go-pipeline to v0.10.0

Changes

  • When using --debug the thumbprint of a public key will be logged when signing or verifying steps
  • buildkite-agent start
    • --debug-signing Enable debug logging for pipeline signing. This can potentially leak secrets to the logs as it prints each step in full before signing. Requires debug logging to be enabled [$BUILDKITE_AGENT_DEBUG_SIGNING]
  • buildkite-agent pipeline upload
    • --debug-signing Enable debug logging for pipeline signing. This can potentially leak secrets to the logs as it prints each step in full before signing. Requires debug logging to be enabled [$BUILDKITE_AGENT_DEBUG_SIGNING]
  • buildkite-agent tool sign
    • --debug-signing Enable debug logging for pipeline signing. This can potentially leak secrets to the logs as it prints each step in full before signing. Requires debug logging to be enabled [$BUILDKITE_AGENT_DEBUG_SIGNING]

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good!

agent/verify_job.go Outdated Show resolved Hide resolved
clicommand/pipeline_upload.go Outdated Show resolved Hide resolved
@jordandcarter jordandcarter marked this pull request as ready for review June 30, 2024 22:49
@jordandcarter jordandcarter requested a review from DrJosh9000 June 30, 2024 22:49
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@jordandcarter jordandcarter merged commit aa55778 into main Jul 2, 2024
1 check passed
@jordandcarter jordandcarter deleted the debug-signature branch July 2, 2024 03:34
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

Successfully merging this pull request may close these issues.

2 participants