Commit 5266c4b
feat(assail): downgrade flake.lock-only SupplyChain to Severity::Low (mechanical fix) (#73)
## Summary
When \`flake.nix\` declares inputs without inline \`narHash\`, without
\`rev\` pinning, and without a sibling \`flake.lock\`, the standard
remediation is a single \`nix flake update\` invocation that generates
the lockfile with narHash for every transitive input.
The fix is mechanical, so the finding does not belong in the same
severity tier as e.g. an unsigned binary fetch or a tamperable URL.
Downgrade from \`Severity::High\` to \`Severity::Low\` and embed the fix
command directly in the description.
The detector still triggers — the finding is real and worth surfacing —
but it no longer dominates High-severity noise in scan reports.
## Motivation
Across the 51 Track C panic-attack issues, missing \`flake.lock\`
accounts for ~45 findings (e.g. \`julia-ecosystem#6\` carries 45 of
these in the vendored monorepo). All are mechanically closable. Estate
context: the Nix-mirror campaign closure (\`standards#149\`,
\`hypatia#289\`) confirmed \`flake.lock\` generation is the canonical
fix.
## Changes
- \`src/assail/analyzer.rs\` (\`analyze_config\`): switch
\`Severity::High\` → \`Severity::Low\` for the unpinned-flake case;
append the suggested fix command to the description.
- 3 regression tests:
- \`flake_without_lock_is_low_severity\` — unpinned flake produces Low +
suggestion
- \`flake_with_narhash_has_no_finding\` — inline narHash suppresses
- \`flake_with_rev_pins_has_no_finding\` — rev pinning suppresses
## Test plan
- [x] \`cargo test --lib flake_\` — all 3 new tests pass locally
- [ ] CI green
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b2e58a9 commit 5266c4b
1 file changed
Lines changed: 68 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4293 | 4293 | | |
4294 | 4294 | | |
4295 | 4295 | | |
| 4296 | + | |
| 4297 | + | |
| 4298 | + | |
| 4299 | + | |
| 4300 | + | |
| 4301 | + | |
4296 | 4302 | | |
4297 | 4303 | | |
4298 | 4304 | | |
4299 | 4305 | | |
4300 | 4306 | | |
4301 | | - | |
| 4307 | + | |
4302 | 4308 | | |
4303 | 4309 | | |
4304 | | - | |
| 4310 | + | |
| 4311 | + | |
4305 | 4312 | | |
4306 | 4313 | | |
4307 | 4314 | | |
| |||
7787 | 7794 | | |
7788 | 7795 | | |
7789 | 7796 | | |
| 7797 | + | |
| 7798 | + | |
| 7799 | + | |
| 7800 | + | |
| 7801 | + | |
7790 | 7802 | | |
7791 | 7803 | | |
7792 | 7804 | | |
| |||
7805 | 7817 | | |
7806 | 7818 | | |
7807 | 7819 | | |
| 7820 | + | |
| 7821 | + | |
| 7822 | + | |
| 7823 | + | |
| 7824 | + | |
| 7825 | + | |
| 7826 | + | |
| 7827 | + | |
| 7828 | + | |
| 7829 | + | |
| 7830 | + | |
| 7831 | + | |
| 7832 | + | |
| 7833 | + | |
| 7834 | + | |
| 7835 | + | |
| 7836 | + | |
| 7837 | + | |
| 7838 | + | |
| 7839 | + | |
| 7840 | + | |
| 7841 | + | |
| 7842 | + | |
| 7843 | + | |
| 7844 | + | |
| 7845 | + | |
| 7846 | + | |
| 7847 | + | |
| 7848 | + | |
| 7849 | + | |
| 7850 | + | |
| 7851 | + | |
| 7852 | + | |
| 7853 | + | |
| 7854 | + | |
| 7855 | + | |
| 7856 | + | |
| 7857 | + | |
| 7858 | + | |
| 7859 | + | |
| 7860 | + | |
7808 | 7861 | | |
7809 | 7862 | | |
7810 | 7863 | | |
| |||
7891 | 7944 | | |
7892 | 7945 | | |
7893 | 7946 | | |
| 7947 | + | |
| 7948 | + | |
| 7949 | + | |
| 7950 | + | |
| 7951 | + | |
| 7952 | + | |
| 7953 | + | |
| 7954 | + | |
| 7955 | + | |
| 7956 | + | |
| 7957 | + | |
| 7958 | + | |
| 7959 | + | |
7894 | 7960 | | |
7895 | 7961 | | |
7896 | 7962 | | |
0 commit comments