Skip to content

usr/libexec/helper-scripts: add vbox-ova-reproducible-normalize - #69

Closed
assisted-by-ai wants to merge 1 commit into
masterfrom
move-vbox-ova-reproducible-normalize
Closed

usr/libexec/helper-scripts: add vbox-ova-reproducible-normalize#69
assisted-by-ai wants to merge 1 commit into
masterfrom
move-vbox-ova-reproducible-normalize

Conversation

@assisted-by-ai

Copy link
Copy Markdown

Relocate derivative-maker's VirtualBox .ova reproducibility normalizer (formerly help-steps/vbox-ova-reproducible-normalize) into the helper-scripts package, where the other Python helpers live (usr/libexec/helper-scripts/).

It rewrites the VBoxManage export-generated random disk/machine/image UUIDs, MACs, wall-clock lastStateChange, and the VMDK descriptor's CID/ddb.uuid.image/ddb.comment, then repacks the OVA tar deterministically (fixed mtime/mode/owner) from SOURCE_DATE_EPOCH + a per-image salt, so two independent frozen builds produce a bit-identical .ova. Invoked by derivative-maker's pbuilder-chroot-script-export-vbox-vm (updated in org-ai-assisted/derivative-maker#72).

Unrelated to the open Wayland-menu PR #67.

Relocate derivative-maker's VirtualBox .ova reproducibility normalizer (formerly
help-steps/vbox-ova-reproducible-normalize) into the helper-scripts package, where the other Python
helpers live (usr/libexec/helper-scripts/). It rewrites the export-generated random disk/machine/image
UUIDs, MACs, wall-clock lastStateChange, VMDK CID/ddb.uuid.image/ddb.comment, and repacks the OVA tar
deterministically from SOURCE_DATE_EPOCH + a per-image salt, so a build-twice produces a bit-identical
.ova. Invoked by derivative-maker's pbuilder-chroot-script-export-vbox-vm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@assisted-by-ai, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b380812-6f06-45cd-8993-25b599b88673

📥 Commits

Reviewing files that changed from the base of the PR and between 30cb90f and 7d247b4.

📒 Files selected for processing (1)
  • usr/libexec/helper-scripts/vbox-ova-reproducible-normalize
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch move-vbox-ova-reproducible-normalize

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.

try:
tar.extractall(workdir, filter="data")
except TypeError:
tar.extractall(workdir)
import os
import re
import struct
import sys
assisted-by-ai pushed a commit to org-ai-assisted/derivative-maker that referenced this pull request Jul 29, 2026
The dispatch input still offered virtualbox while the workflow itself documented that the
.ova leg aborts: the export calls helper-scripts vbox-ova-reproducible-normalize, which is
not in the pinned gitlink (aef07569), so dm-prepare-release dies after a ~50 minute build.
Verified against the merged tree rather than assumed -- the ai branch bump that added the
normalizer was later undone by the gitlink refresh onto upstream master, so the blocker is
still live.

Offering a choice that deterministically fails is worse than not offering it. Restore it
once org-ai-assisted/helper-scripts#69 lands and the gitlink is bumped.

Also drops the stale EXPERIMENT BRANCH framing from the multi-target comment.

Bumps initializer-dist for the atomic locale.conf replacement.

Reported by CodeRabbit on #81.

Generated with assistance from Claude Code.
@assisted-by-ai

Copy link
Copy Markdown
Author

Superseded by #78: this branch is merged into ai, which is now the single branch for this repo per the git skill (one branch named ai, one PR).

Merged clean, no changes to the content.

assisted-by-ai pushed a commit that referenced this pull request Jul 29, 2026
…llback

CodeQL on PR #78: 1 high (py/tarslip) + 1 note (py/unused-import), both in
this file, which arrived via the merge of #69.

extractall(filter="data") is safe, but the 'except TypeError' fallback for
interpreters predating that argument extracted with NO validation at all, so
a member named '../x' or an absolute path escaped the temporary directory.
The fallback now validates every member: the resolved path must stay inside
the destination, and a link member is refused outright -- an OVA is a flat
archive of .ovf/.vmdk/.mf files, so a link is never legitimate.

Verified each hostile member type is refused ('../escaped.txt', '/abs.txt',
and a symlink to /etc/passwd) and that a benign archive still yields its
members.

Also drops the unused 'sys' import.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

3 participants