fix: support OpenBSD#3
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughOpenBSD support is added to platform handling, CI, and soundness workflows, and one reader test input is adjusted. The status text now lists OpenBSD among supported platforms. ChangesOpenBSD support and workflow updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
67-76: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winMake the OpenBSD job's token scope explicit.
This job executes repository code in the guest, but it currently inherits whatever the repository default
GITHUB_TOKENpermissions are. Add a job-levelpermissions:block so this job cannot silently widen if the repo default changes later.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 67 - 76, The openbsd job currently relies on inherited GITHUB_TOKEN defaults, so its repository access scope is implicit. Add an explicit job-level permissions block on the openbsd job in the workflow to lock down token access, and keep the scope minimal so future repository default changes cannot silently broaden it.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 107-113: The cloud-init setup in the workflow is copying the
entire workspace into the OpenBSD guest, which can bring the checkout credential
along with the .git directory. Update the actions/checkout step to use
persist-credentials: false, and adjust the Prepare cloud-init copy in the same
job so the repo transfer excludes .git unless the guest explicitly needs it. Use
the Checkout and Prepare cloud-init steps in the workflow to locate the fix.
- Around line 70-71: The CI workflow currently uses mutable references for the
OpenBSD container image and the checkout action, so update the workflow to pin
both dependencies to immutable versions. In the workflow definition that sets
the container image and the step using actions/checkout, replace the tag-based
image reference and the v6 action ref with a specific image digest and the full
commit SHA for the checkout action, keeping the existing job structure and
symbol locations unchanged.
In @.github/workflows/soundness.yml:
- Around line 12-20: The workflow is using the mutable swift:latest image in
both the reusable workflow input and the documentation job, so update the
soundness workflow to use the same pinned Swift release and digest in both
places. Replace the container image values referenced by
api_breakage_check_container_image and the documentation job’s container.image
with an immutable Swift tag plus digest so both checks stay consistent over
time.
- Around line 22-31: Both checkout steps are still using a floating
actions/checkout version and are leaving persisted credentials enabled. Update
the two checkout uses in the workflow to a full commit SHA for actions/checkout,
and set persist-credentials to false in both the repository checkout and the
documentation checker checkout so the workflow is fully pinned and does not
retain credentials.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 67-76: The openbsd job currently relies on inherited GITHUB_TOKEN
defaults, so its repository access scope is implicit. Add an explicit job-level
permissions block on the openbsd job in the workflow to lock down token access,
and keep the scope minimal so future repository default changes cannot silently
broaden it.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 44f408c6-5353-4d15-b6ec-4a9b90900d47
📒 Files selected for processing (5)
.github/workflows/ci.yml.github/workflows/soundness.ymlREADME.mdSources/ZipArchive/System+directory.swiftTests/ZipArchiveTests/ZipArchiveReaderTests.swift
Summary
Why
swift-zip-archivealready uses portable POSIX and Swift System APIs, but itsDIR *compatibility alias did not include OpenBSD. Continuous testing keeps that ABI support from regressing.The reusable soundness workflow currently fetches its documentation helper from
main, where swiftlang/github-workflows#291 passes quoted.spi.ymltarget names to SwiftPM. This PR disables only that reusable subjob and runs the same official helper at an explicit known-good revision, so documentation validation remains enabled and reproducible.Testing
cannot find type 'DIR' in scopeswift test: 91 tests passed locally after both fixesSummary by CodeRabbit
ZipArchive.