Skip to content

Polish pass — CI hygiene gates, Rust CI, doc tone#38

Merged
AndrewAltimit merged 2 commits intomainfrom
polish/review-fixes
Apr 21, 2026
Merged

Polish pass — CI hygiene gates, Rust CI, doc tone#38
AndrewAltimit merged 2 commits intomainfrom
polish/review-fixes

Conversation

@AndrewAltimit
Copy link
Copy Markdown
Owner

Summary

Closes the specific gaps surfaced by an end-to-end review. Small edits only — no feature work, no scope change.

  • Wire CI hygiene gates that were dead code. tools/ci/check_detection_pairing.py, check_no_committed_drivers.py, and check_no_real_tenants.py exist and pass locally, but no workflow invoked them. CLAUDE.md claimed they were CI-enforced. They are now.
  • Add Rust CI. cargo build --workspace + cargo test --workspace -- --test-threads=1 in both main-ci.yml and pr-validation.yml. The workspace's tests were previously unchecked by CI.
  • Fix a pre-existing flaky crypto test. c2crypto::tests::tampered_ct_is_rejected used wire.pop(); wire.push('A') — a no-op ~1/64 runs. Replaced with a char guaranteed different.
  • Remove enumerated counts from .md docs ("308+ tests", "51 payloads, 7 channels", "17 CVE reproductions", "19 techniques", "5 pluggable transports", etc.). Qualitative phrasing reads more professional and doesn't rot. Technical invariants (port numbers, event IDs, ESC identifiers, protocol byte-sizes) kept.
  • CVE Status column honesty pass. Four thinnest entries in cves/README.md reworded to describe scope accurately (e.g., Pwn2Own BerlinTrigger from Pwn2Own Berlin writeup).
  • New tools/rust/crypto/DESIGN.md explaining why C2 uses X25519+ChaCha20-Poly1305 while sleep-masks use RC4/XOR (research-accurate, not confidentiality). Linked from CLAUDE.md.

Notes / held for review

  • The Equation Group-inspired framing in tools/framework/ was deliberately left alone — matches an existing preference.
  • Docker lab smoke test was on the plan but skipped: needs Docker availability on the self-hosted runner verified first.
  • cargo test on CI runs single-threaded because several crates share EXPLOIT_LAB_ACTIVE env state across tests and race in parallel. This is a workspace-wide testing-hygiene smell worth addressing later (mutex guard, or temp_env crate) but out of scope here.

Test plan

  • CI turns green on push (main-ci) — including the new Repo Hygiene and Rust Build/Test steps.
  • PR Validation workflow passes (same checks as main-ci, PR-gated).
  • python3 tools/ci/check_detection_pairing.py reports PASS locally.
  • python3 tools/ci/check_no_committed_drivers.py reports PASS locally.
  • python3 tools/ci/check_no_real_tenants.py reports PASS locally.
  • cd tools/rust && cargo test --workspace -- --test-threads=1 passes locally.
  • python3 reports/databricks-apps-assessment/build.py succeeds and produces the dashboard.
  • Spot-check tools/rust/crypto/DESIGN.md reads accurately for the C2 channel vs sleep-mask distinction.
  • Spot-check cves/README.md — thin-stub Status column entries no longer imply full exploits.

Diff: 10 files, +197 / −23 lines. One new file (DESIGN.md). No deletions.

Generated with Claude Code

AI Agent Bot and others added 2 commits April 21, 2026 07:43
CI gates that CLAUDE.md claimed were enforced but weren't:
  * Wire check_detection_pairing, check_no_committed_drivers, and
    check_no_real_tenants into both main-ci.yml and pr-validation.yml
    as a "Repo hygiene" step. All three pass against current repo state.
  * Add cargo build --workspace + cargo test --workspace to both
    workflows with --test-threads=1 (several crates manipulate
    EXPLOIT_LAB_ACTIVE inside tests and race under parallel execution).

Pre-existing flake found while adding Rust CI:
  * c2crypto::tests::tampered_ct_is_rejected used wire.pop()/push('A')
    which was a no-op ~1/64 runs when the final base64 char was 'A'.
    Replace with a char guaranteed to be different.

Doc tone — enumerated counts removed from .md files, kept in code:
  * README.md: drop "308+ tests", "51 payloads, 7 channels",
    "17 CVE reproductions", "19 techniques", "5 pluggable transports",
    "15 individual exploit modules", "20 EDR GUIDs", "22-entry symbol
    allowlist", "11 named gap advisories". Replaced with qualitative
    phrasing. Port numbers, event IDs, ESC identifiers, and protocol
    byte-sizes kept — those are technical invariants, not marketing.
  * tools/llm-attacks/README.md: 53-payload claim (stale) dropped.
  * tools/forensic-analysis/README.md and tools/browser-ext-attacks/
    README.md: minor count cleanup.

cves/README.md Status column:
  * Four thin-stub entries (CVE-2025-2857, -4918, -5959, -2796) reworded
    to honestly describe what the dir contains vs. what it could imply.

Rust crypto design doc (new):
  * tools/rust/crypto/DESIGN.md explains why the C2 channel uses
    X25519 + ChaCha20-Poly1305 + HKDF-SHA256 while sleep-mask and
    amsi-patchless use RC4/XOR (research-accurate, not confidentiality).
    Linked from CLAUDE.md.

Local validation: all three hygiene checks PASS, full Rust workspace
tests pass single-threaded, Python pytest 44 passed 3 skipped,
dashboard build succeeds, both workflow YAMLs parse.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Rust build step added in the previous commit emits proc-macro .so
files into tools/rust/target/release/deps/ — legitimate cargo output,
not committed binaries. The secret-and-binary scan was matching them
and failing the job.

Broaden the exclusion list from './.venv/*' and './.git/*' to also
cover '*/target/*' and '*/.venv/*' (the latter catches nested venvs
inside reports/). The same exclusion is added to the large-file check
in pr-validation.yml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AndrewAltimit AndrewAltimit merged commit 57fe2f2 into main Apr 21, 2026
2 checks passed
@AndrewAltimit AndrewAltimit deleted the polish/review-fixes branch April 21, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant