Skip to content

github: workflows: require publicly verified release metadata - #12513

Merged
edsiper merged 6 commits into
masterfrom
release-metadata-public-verification
Oct 4, 2026
Merged

edsiper merged 6 commits into
masterfrom
release-metadata-public-verification

Conversation

@edsiper

@edsiper edsiper commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Official releases currently tolerate missing configuration metadata during staging and S3 promotion. This change requires both JSON variants, checks them against the exact immutable release image, and fails publication if users cannot anonymously download the validated artifacts.

Both JSON variants are also attached to each GitHub release, as requested, and their public GitHub URLs are checked after upload.

Changes

  • Generate regular and pretty metadata with docker run --rm --platform linux/amd64 <image>@<digest> -J, without a TTY. Require nonempty strict JSON, matching release version (one optional embedded v), Fluent Bit metadata and plugin catalogs, and equivalent variants. The processor catalog is required from 4.0; older supported metadata omits it. No JSON Schema standard $schema field is required.
  • Require staging artifact download/validation and explicit uploads of both filenames. Promotion regenerates from the pinned production image and compares it with staged metadata before retaining the validated files as a run artifact.
  • Publish the exact files to the packages bucket and anonymously verify https://packages.fluentbit.io/<version>/<filename>, comparing both JSON and exact bytes with the publication artifact. Bounded retries accommodate the documented hourly sync and transient errors; persistent failures identify the URL and repair steps.
  • Gate package, source, Windows/macOS and container publication and GitHub release reporting on public verification. Promote version, series and latest Linux tags from the pinned version-specific manifests.
  • Attach both files to every existing GitHub release step with unmatched-file failures and overwrite enabled. Anonymously verify https://github.com/fluent/fluent-bit/releases/download/v<version>/<filename> before documentation/version-update jobs proceed.
  • Require the same staging/image/public checks for packaging/update-repos.sh recovery with AWS_SYNC=true; its final dry run remains unchanged and it does not upload metadata.

Coverage: automatic tag staging, manual staging, manual official promotion, all existing release series (2.0, 2.1, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1), and manual package recovery. Nightly prereleases and PR/master development builds are outside the official-release guarantee. Official staging dispatch requires an explicit release version rather than defaulting to master.

Explicit overwrites and retained artifacts support safe reruns. Recovery documentation covers partial publication and expired artifacts. Partial failures can leave files/a release visible, but workflow success remains blocked. Independent cleanup jobs and action cleanup remain unchanged; manual temporary files have an EXIT cleanup trap.

Verification

Passed 20 focused tests, including a real local HTTP server: missing/empty/malformed JSON, wrong versions, missing catalogs/metadata, branch compatibility, mismatched variants, public 403/404, transient failures, successful anonymous downloads, public content/byte mismatches, GitHub URL layout, pinned generation and workflow dependency checks.

/tmp/fluent-bit-release-tools/venv/bin/python -m unittest discover -s .github/scripts/tests -p 'test_release_*.py' -v
/tmp/fluent-bit-release-tools/actionlint -shellcheck='' .github/workflows/call-build-images.yaml .github/workflows/staging-build.yaml .github/workflows/staging-release.yaml .github/workflows/test-release-metadata.yaml
bash -n packaging/update-repos.sh
git diff --check refs/remotes/origin/master...HEAD

Actionlint 1.7.12 passed. A focused CI workflow runs the tests and syntax checks. Real native Fluent Bit 5.1.3 -J output passed validation (741,821 bytes; all six root sections). The staging image digest was resolved with the actual Buildx template. Commit-prefix lint passed every commit and the exact six-commit PR range against freshly fetched master using the CI-style environment and an isolated lint clone.

End-to-end container execution was blocked by Docker daemon permissions (permission denied ... /var/run/docker.sock; passwordless sudo unavailable). Generation is covered by subprocess assertions and real native metadata validation. Native tests/integration plugin scenarios and Valgrind/Leaks are not applicable to this workflow/Python change and were not run. No production release was triggered.

Public evidence and rollout

Read-only probes on 2026-10-04 UTC returned HTTP 404 with S3 NoSuchKey for both expected v5.1.3 packages URLs. Python requests returned 403, including a control key URL: 403 alone does not establish a missing object. The GitHub v5.1.3 release API reported no assets, and both expected GitHub JSON URLs returned 404. The new verifier correctly failed against both locations:

python3 .github/scripts/release_metadata.py verify --version 5.1.3 --directory /tmp/fluent-bit-observed-metadata --attempts 1
python3 .github/scripts/release_metadata.py verify --version 5.1.3 --directory /tmp/fluent-bit-observed-metadata --github-repository fluent/fluent-bit --attempts 1

These identify historical gaps at the configured URLs, not a full historical audit. Old releases/artifacts, production infrastructure and bucket permissions were not modified. Public availability of newly published files requires the first actual release run; local success/failure behavior is verified.

No new secrets or broader ACLs are introduced. Existing scoped S3 access and public serving/sync/CDN configuration must cover these exact JSON keys. Maintenance tagging branches must adopt the helper/staging changes; promotion must use the updated default-branch workflow or an adopted maintenance copy. Old unchanged workflow refs cannot gain this guarantee through a master-only merge. Release-environment ref restrictions and serving/access repairs remain external configuration responsibilities.

Summary by CodeRabbit

  • Release Improvements
    • Versioned metadata files are validated and checked for consistency before publication.
    • Release workflows verify published metadata is available and matches the generated files; failures now stop the release process instead of being ignored.
    • Release assets include the corresponding metadata files.
  • Documentation
    • Added guidance on metadata versions, publication, verification, and recovery.

Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T00:17:57.668607Z c3d3285 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4807a85b-1f9b-4838-b140-bcda2c3078d8
📥 Commits

Reviewing files that changed from the base of the PR and between 6e43865 and c3d3285.

📒 Files selected for processing (9)
  • .github/scripts/release_metadata.py
  • .github/scripts/tests/test_release_metadata.py
  • .github/scripts/tests/test_release_workflows.py
  • .github/workflows/README.md
  • .github/workflows/call-build-images.yaml
  • .github/workflows/staging-build.yaml
  • .github/workflows/staging-release.yaml
  • .github/workflows/test-release-metadata.yaml
  • packaging/update-repos.sh

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds a tool to generate, validate, compare, and verify versioned Fluent Bit metadata. Build and release workflows use image digests to generate metadata, validate staged files, publish them to package and GitHub release locations, and verify public downloads.

Changes

Release metadata lifecycle

Layer / File(s) Summary
Metadata commands and validation
.github/scripts/release_metadata.py, .github/scripts/tests/test_release_metadata.py, .github/workflows/README.md
The new tool generates regular and pretty JSON metadata, validates versions and catalog structure, compares file pairs, and checks public files. Unit tests cover validation, generation, comparison, HTTP outcomes, and retries.
Build and stage metadata artifacts
.github/workflows/call-build-images.yaml, .github/workflows/staging-build.yaml, .github/scripts/tests/test_release_workflows.py, .github/workflows/README.md
Image builds resolve immutable digests for metadata generation. Staging validates and uploads the two versioned files explicitly, without ignoring download or upload failures.
Release validation and publication
.github/workflows/staging-release.yaml, .github/scripts/tests/test_release_workflows.py, .github/workflows/test-release-metadata.yaml, .github/workflows/README.md
The release workflow compares staged files with metadata generated from pinned staging images, publishes and verifies the files, and makes release jobs depend on schema publication. Linux image promotion uses selected digests. GitHub Releases attach both metadata files.
Recovery checks and operational guidance
packaging/update-repos.sh, .github/scripts/tests/test_release_workflows.py, .github/workflows/README.md
When AWS_SYNC is enabled, the repository update script compares and verifies staged metadata before syncing. The documentation describes recovery procedures, validation commands, and recorded URL probes.

Priority: ⬆️ High

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant StagingReleaseWorkflow
  participant StagingImageRegistry
  participant release_metadata.py
  participant StagingSchemaBucket
  participant ReleaseBucket
  participant GitHubRelease
  StagingReleaseWorkflow->>StagingImageRegistry: Resolve staging image digests
  StagingReleaseWorkflow->>release_metadata.py: Generate metadata from image digest
  StagingReleaseWorkflow->>StagingSchemaBucket: Download versioned metadata files
  StagingReleaseWorkflow->>release_metadata.py: Compare staged files with generated metadata
  StagingReleaseWorkflow->>ReleaseBucket: Upload validated metadata files
  StagingReleaseWorkflow->>release_metadata.py: Verify anonymous public downloads
  StagingReleaseWorkflow->>GitHubRelease: Attach versioned metadata files
Loading

Merge Risk: ⚪ Minimal · up to c3d32

No confirmed release-gate defect remains. The change is mergeable after normal checks; public availability should be confirmed during an actual release.

Security Architecture Review

Security architecture risk: 🔵 Low · up to c3d32

The change strengthens release metadata integrity and anonymous availability checks. However, manual recovery now requires GitHub assets that are created only after package publication succeeds, blocking that recovery route for some first-release failures. Production permissions and serving configuration remain unverified.

Retained concerns

  • Medium · reliability · observed: Manual AWS_SYNC recovery now verifies GitHub release assets before performing repository synchronization. For a first publication with failed APT or YUM package jobs, those assets cannot yet exist because GitHub release creation depends on those jobs succeeding. The verifier therefore terminates recovery before repository repair can begin. Base had no equivalent prerequisite. Bounded retries and support for repairing an existing release do not resolve this ordering conflict; an index-only failure does not necessarily trigger it.
Security review details

Security Blast Radius

  • inferred — The affected integrity boundary is the official release supply chain and its public consumers, rather than a tenant-scoped application. Public-response substitution alone cannot satisfy comparisons against retained files; controlling the staged image or release tooling would affect the reference itself and remains a trusted-producer dependency.

Trust Boundaries and Controls

  • observed — The verifier disables curl configuration, supplies no authentication headers or cookies, restricts redirects to HTTPS, bounds requests, and checks content and bytes. Generation executes a digest-pinned image without explicit credential forwarding, host mounts, or privileged mode. Manual recovery adds checks but no metadata upload or ACL operation.

Resilience and Maintainability Implications

  • observed — Fail-closed verification prevents progression on missing or mismatched metadata, but requiring downstream GitHub assets before manual package repair blocks the existing recovery route when first-release package publication fails. Repairing and rerunning CI remains distinct from this blocked manual route.

Hardening Proposals

  • proposed — Use phase-specific recovery prerequisites: preserve immutable-image and staged-metadata validation before package repair, then require GitHub asset verification after the release-producing phase. Preserve explicit authorization and a final verified-success condition without requiring a downstream result to initiate upstream repair.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.63% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 38 functions across 4 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: requiring public verification of release metadata in GitHub workflows.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 2.63% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 38 functions across 4 files. (5 skipped: 5 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@edsiper
edsiper merged commit a415d1b into master Oct 4, 2026
23 checks passed
@edsiper
edsiper deleted the release-metadata-public-verification branch October 4, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant