Repository navigation
Fix module release packaging and verifier ownership - #63
Conversation
Add a packaging test that builds with a dotted release host key and checks the archive still ships the compiled library alongside a matching modules.toml attestation. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The host key validation in both build scripts now accepts dots and requires the key to start and end with an alphanumeric character, so hostnames like `ubuntu-24.04` pass. Added package layout tests covering the Linux verifier handoff and rejection of archive traversal. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The module verifier now accepts --uid and --gid and drops privileges via setpriv before running the verifier binary, so archives are checked with the same ownership the host user will see. The distro test image installs util-linux for setpriv and passes the host ids through, and the verifier can reuse a prebuilt binary via --verifier-bin instead of always invoking cargo. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The package layout test now invokes build-module.sh from the extracted package root instead of the repository root, so it exercises the script shipped in the archive. verify-module.sh also converts a relative verifier binary path to an absolute one before changing directories, which previously caused the verifier lookup to fail. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test read the extracted library path from the wrong argument position, so it now uses index 7 to match the verifier invocation it builds. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…r skips cargo Remove the outdated tinybox 0.1.22 Ubuntu 24.04 tarball from release assets and extend the package layout test to stub a cargo binary and assert it is never invoked. This guards against the prebuilt verifier accidentally falling back to a source build. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The module verifier runs as an unprivileged uid via setpriv, but the temporary work directory was still owned by root, so the verifier could not write to it. Hand ownership to the target uid and gid before dropping privileges. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The package layout test now stubs chown alongside setpriv and records the order in which both are invoked, so it can verify the extracted workspace is handed to its owner before privileges are dropped. It also checks that chown receives the expected host uid, gid, and target directory. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
This review includes 5 billable files and costs up to $1.25. Or wait 32 minutes for your next included review. View limit details
Comment |
Tiny Sweeper reviewTiny Sweeper completed its review; deterministic results follow. State: Incomplete Review snapshot
Completeness: Incomplete Features
Tests
FindingsNo active actionable findings. Could not review: scripts/test-distro.sh, scripts/test-package-layout.py, scripts/verify-module.sh, tinysweeper/description Before merge
How this fits togetherflowchart LR
n0["...t_library_bytes_from_a_symlinked_checkout"]:::impacted
n1["decode"]:::impacted
n2["stderr"]:::impacted
n3["directory"]:::impacted
n0 -->|calls| n1
n0 -->|tests| n1
n0 -->|uses| n2
n0 -->|uses| n3
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: scripts/test-distro.sh, scripts/test-package-layout.py, scripts/verify-module.sh, tinysweeper/description.
$0.0078 · 480,324 in / 93,066 out · 94,464 cached (20%) · ladder/vectors-oai3, deepseek-v4.1-flash, · 423 embedded
critique: $0.0033 · 196,623 in / 49,256 out · 74,752 cached (38%) · deepseek-v4.1-flash
security: $0.0034 · 215,191 in / 28,143 out · 6,656 cached (3%) · deepseek-v4.1-flash,
tests: $0.0001 · 38,019 in / 596 out · 5,888 cached (15%) · deepseek-v4.1-flash
description: $0.0007 · 23,682 in / 11,744 out · 7,168 cached (30%) · deepseek-v4.1-flash
The v0.1.22 release exposed two packaging failures: Ubuntu host keys include a version dot that the archive builder rejected, and distro verification ran as root against a workspace mounted for another UID. This change accepts safe dotted host labels and passes the supplied workspace UID/GID to the verifier, transferring ownership only of its private extracted module directory before the privilege drop. TinyBus admission checks remain unchanged.\n\nValidation:
python3 scripts/test-package-layout.py(4/4);bash -n scripts/build-module.sh scripts/test-distro.sh scripts/verify-module.sh;git diff --check origin/main...HEAD. The test suite pins dotted archive naming/attestation, UID/GID handoff ordering, prebuilt-verifier use, and rejection of archive traversal. The shipped distro workflow will exercise real module loading under the workspace UID in the next release.\n\nNo Rust API or module contract changes. The v0.1.22 tag remains immutable; a 0.1.23 release follows this fix.