ci: adopt fleet-standard CI (resolve clippy -D warnings + true MSRV 1.85) - #1
Merged
Conversation
Blocker A — clippy --all-targets --all-features -- -D warnings:
- Auto-fixed (cargo clippy --fix): cast_lossless (u32/u16 -> From),
manual_range_contains, redundant closures, single_char_pattern,
collapsible_if, unused imports.
- Root-cause: manual_checked_ops -> checked_div (anomalies.rs);
manual_let_else -> let...else (overlay.rs).
- Removed a provably-dead no-op line in parser.rs test helper
(pe[0x56] = if is_dll {0x22|0x20} else {0x22}; both branches == 0x22
and overwritten two lines later).
- Fleet [workspace.lints.clippy] recipe: correctness/suspicious deny,
unwrap_used/expect_used deny (parser keeps panic-free denies), and
pragmatic allows (module_name_repetitions, must_use_candidate,
missing_errors/panics_doc, cast_* , too_many_lines,
struct_excessive_bools, items_after_statements).
- Tests opt out of the panic denies via
#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))].
Blocker B — true MSRV: goblin 0.10 -> scroll_derive 0.13.x is
edition-2024 (needs 1.85). Declared rust-version 1.80 was false;
set to 1.85 (1.84 fails on scroll_derive, 1.85 builds).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Jobs (SHA-pinned actions; Swatinem/rust-cache after each toolchain step in compiling jobs): fmt (cargo fmt --check), clippy (--all-targets --all-features -D warnings), test (ubuntu/macos/windows matrix, --all-features), check-msrv (1.85.0, cargo build --all-features --locked), coverage (cargo llvm-cov, advisory/continue-on-error with a TODO -- ~94% at adoption), and cargo-deny (bans/licenses/sources + advisories). vet.yml left untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cover the previously-untested production paths across the workspace with real, behavior-validating tests: exec-pe-core: - strings::compute_entropy — empty/uniform/equiprobable/full-range distributions. - parser — a section-bearing PE (section fields + overlay detection), a PE with no optional header (entry/base/checksum fall back to zero), and a CodeView IMAGE_DEBUG_DIRECTORY carrying an RSDS PDB path. All are hand-built PEs whose ground truth is derivable from the construction and parsed by goblin. - rich_header — DanS found after a leading junk DWORD (scan-advance path) and a DanS-immediately-before-Rich header (empty-but-valid). The if-let None arm in the DanS scan is provably dead under the while-guard invariant, marked // cov:unreachable. - canonical_finding_tests — every remaining PeAnomaly variant maps to its documented canonical Finding (severity/category/code/note/mitre/evidence). exec-pe-analysis: - anomalies — describe_anomaly for the virtual-only / large-ratio / TLS / overlay variants; split a short-circuiting Rich-header assertion so both arms run. - overlay — assert the exact size substring the detector emits. Flip the coverage CI job from advisory (continue-on-error) to the fleet hard gate: fail on any uncovered production line (DA:n,0), honoring cov:unreachable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
anyhow <1.0.103 has an unsoundness (UB) in Error::downcast_mut after Error::context (memory-corruption). Patched in 1.0.103; bump to latest 1.0.104. Clears the cargo-deny advisories finding. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follows the anyhow lock bump; keeps the existing safe-to-run exemption posture at the patched version so cargo vet --locked passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove continue-on-error from the advisories job so a real RustSec advisory blocks CI instead of being informational-only. Tradeoff accepted: an upstream advisory-db load failure can now gate, but surfacing genuine advisories (e.g. RUSTSEC-2026-0190 anyhow, already bumped on this branch) is the priority. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves two pre-existing blockers so exec-pe-forensic can adopt the fleet-standard CI, then adds
ci.yml.Blocker A — clippy
-D warnings(clean)cargo clippy --fix):cast_lossless(u32/u16 →From),manual_range_contains, redundant closures,single_char_pattern,collapsible_if, unused imports.manual_checked_ops→checked_div(anomalies.rs);manual_let_else→let...else(overlay.rs).pe[0x56] = if is_dll { 0x22 | 0x20 } else { 0x22 }in a parser test helper — both branches equal0x22and the value is overwritten two lines later.[workspace.lints.clippy]recipe:correctness/suspiciousdeny,unwrap_used/expect_useddeny (this is an untrusted-input parser), plus the pragmatic allows (incl.too_many_lines,struct_excessive_bools,items_after_statements). Tests opt out via#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))].Blocker B — true MSRV
Declared
rust-versionwas1.80but false: goblin 0.10 → scroll_derive 0.13.x is edition-2024 (needs 1.85). Set to 1.85 — the honest floor. Verified:cargo +1.85.0 build --all-features --lockedpasses; 1.84 fails on scroll_derive (feature edition2024 is required).CI (
.github/workflows/ci.yml)SHA-pinned actions;
Swatinem/rust-cacheafter each toolchain step in compiling jobs. Jobs: fmt, clippy (--all-targets --all-features -D warnings), test (ubuntu/macos/windows matrix,--all-features), check-msrv (1.85.0,--locked), coverage (cargo llvm-cov, advisory/continue-on-error, ~94% at adoption — TODO to make a hard gate at 100%), cargo-deny (bans/licenses/sources + advisories).vet.ymlleft untouched.Local verification
--all-targets --all-features -- -D warnings: cleancargo fmt --check: cleancargo test --all-features: 181 passedcargo +1.85.0 build --all-features --locked: ok; 1.84 fails on scroll_derivecargo deny check bans licenses sources: ok🤖 Generated with Claude Code