Repository navigation
Recognize Determinate Secure Packages as supported Nixpkgs inputs - #236
Conversation
Determinate Secure Packages flakes are re-exported Nixpkgs variants published on FlakeHub under the DeterminateSystems org, which means they'd otherwise get flagged for using an unsupported Git ref and for having a non-upstream owner. Exempt them from both checks when the input is a FlakeHub tarball for DeterminateSystems/secure-packages*. Matching on the name prefix rather than an explicit list means new channels work without a release. The age check still applies, since Secure Packages flakes receive a continuous stream of security updates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughThe package recognizes Determinate Secure Packages flakes hosted on FlakeHub. Qualifying tarball dependencies bypass supported-reference and owner checks while remaining subject to outdated checks. Tests cover valid, invalid, clean-lock, and dirty-lock cases. ChangesSecure Packages support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant FlakeLock
participant FlakeChecker
participant SecurePackages
FlakeLock->>FlakeChecker: provide original and locked tarball URLs
FlakeChecker->>SecurePackages: classify tarball URLs
SecurePackages-->>FlakeChecker: return Secure Packages status
FlakeChecker-->>FlakeLock: apply reference, owner, and age checks
Merge Risk: ⚪ Minimal · up to This PR adds recognition for Determinate Secure Packages Nixpkgs inputs and updates related tests; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/flake.rs (1)
90-109: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake Secure Packages classification affect an observable validation decision.
At Line 97,
secure_packagescan betrueonly forNode::Tarball. That branch returnsNonefor bothgit_refandownerat Line 101. The checks at Lines 107 and 133 therefore do not execute for a classified URL. ForNode::Repo,secure_packagesis alwaysfalseat Line 95.The new fixtures do not test the exemption. The clean tarball already bypasses both checks. The GitHub fixture remains flagged because every repository node sets
secure_packagestofalse.Confirm the intended policy. Then either remove this no-op state, or apply URL classification at a validation decision that can produce an observable exemption. Add an integration test for the selected behavior and for retained
Outdatedreporting.Also applies to: 135-135, 209-209, 265-282
🤖 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 `@src/flake.rs` around lines 90 - 109, Confirm the intended Secure Packages policy, then update the validation flow around the node classification and the checks near the ref/owner and age validations so secure-package URL classification produces an observable exemption rather than a no-op; otherwise remove the unused secure_packages state. Add integration coverage for the selected exemption behavior and ensure Outdated reporting remains unchanged.
🤖 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 `@README.md`:
- Around line 43-53: Update the validation flow in the `secure_packages`
handling within the `Node::Tarball` logic so recognized DeterminateSystems
Secure Packages flakes bypass the unsupported Git ref and non-upstream owner
checks even when `git_ref` and `owner` are `None`; preserve the age check, and
retain the documented README exemption and version bump.
- Line 51: Update the Secure Packages example in the README to use the
documented FIPS distribution name secure-packages-rolling-fips, or explicitly
identify secure-packages-26.05-fips as a future naming example while retaining
the other valid examples.
---
Nitpick comments:
In `@src/flake.rs`:
- Around line 90-109: Confirm the intended Secure Packages policy, then update
the validation flow around the node classification and the checks near the
ref/owner and age validations so secure-package URL classification produces an
observable exemption rather than a no-op; otherwise remove the unused
secure_packages state. Add integration coverage for the selected exemption
behavior and ensure Outdated reporting remains unchanged.
🪄 Autofix
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: 5255a56c-b0ea-459a-8f57-3395a1bb207d
⛔ Files ignored due to path filters (3)
Cargo.lockis excluded by!**/*.locktests/flake.clean.8.lockis excluded by!**/*.locktests/flake.dirty.2.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
Cargo.tomlREADME.mdsrc/flake.rssrc/main.rssrc/secure_packages.rs
The FIPS distribution is secure-packages-rolling-fips; there's no secure-packages-26.05-fips. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both FIPS distributions exist: secure-packages-rolling-fips and secure-packages-26.05-fips. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An issue that has recently emerged is that if you're using "Nixpkgs" as one of our Determinate Secure Packages variants (
secure-packages-*) then Flake Checker won't recognize those as Nixpkgs inputs. This PR updates FC's machinery to handle those.Testing
tests/flake.clean.8.lockcovers the FlakeHub form and is expected to be clean.tests/flake.dirty.2.lockpulls the same flake from GitHub and is still expected to produce both issues, since Secure Packages only comes from FlakeHub.src/secure_packages.rscover the name matching and both URL forms, including near misses (right name/wrong org, right host/wrong flake).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Release