Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
3ad1c63
build: ci-test profile and analyssa 0.7.0
BinFlip Oct 19, 2026
f5ce36a
feat(io): publish the binary codecs; ECMA signed compressed integers
BinFlip Oct 19, 2026
ea6c2f1
refactor(metadata): deterministic owner lists, Portable PDB sequence …
BinFlip Oct 19, 2026
3f11e1e
fix(assembly): branch operands are targets; decode handler entry points
BinFlip Oct 19, 2026
490145b
refactor(analysis): analyssa 0.7.0 types, SSA forms for typed referen…
BinFlip Oct 19, 2026
5d8c429
refactor(codegen): emit in SSA order with validated output (#288)
BinFlip Oct 19, 2026
56b686c
feat(cilassembly): change-set savepoints; cleanup keeps types metadat…
BinFlip Oct 19, 2026
34ca2b3
fix(emulation): record resource reads, compare overrides by parameters
BinFlip Oct 19, 2026
3d6c7b5
fix(deobfuscation): refused bodies as events, re-detection after byte…
BinFlip Oct 19, 2026
efcfa78
refactor: adapt the CLI, examples, formatting and fuzz targets
BinFlip Oct 19, 2026
801b2fd
test: harden the packer suites; BitMono 0.39.0 and 0.45.0; new Confus…
BinFlip Oct 19, 2026
9f3b309
test(samples): sample factory with a three-runtime oracle
BinFlip Oct 19, 2026
083f4e7
docs(changelog): record the unreleased changes
BinFlip Oct 19, 2026
e84b6cc
fix(metadata): read the stream directory and table headers as the CLR…
BinFlip Oct 20, 2026
94896c9
fix(cilassembly): write unassigned coded indices, never retarget dele…
BinFlip Oct 20, 2026
3a9552c
fix(metadata): read custom attributes and parameters by signature
BinFlip Oct 20, 2026
8822eb7
fix(validation): enforce only ECMA-335 rules and what the CLR refuses
BinFlip Oct 20, 2026
0428823
fix(analysis): resolve MemberRef and MethodSpec callees in the call g…
BinFlip Oct 20, 2026
5dbcbef
fix(deobfuscation): repair registry, BitMono tokens and locals, byte …
BinFlip Oct 20, 2026
8bad9c3
test: one testkit, and tests that fail instead of skipping
BinFlip Oct 20, 2026
759a44c
docs(changelog): condense the unreleased changes
BinFlip Oct 20, 2026
5aaeec4
fix: every corpus assembly loads and lifts, and writes keep what they…
BinFlip Oct 21, 2026
79e5c6a
test(samples): Portable PDB, section layout and oracle fixtures
BinFlip Oct 31, 2026
014f126
fix: every codec encodes back what it reads, and Portable PDBs load
BinFlip Oct 31, 2026
11bc6b6
test(it): PDB, ReadyToRun, resources and section coverage
BinFlip Oct 31, 2026
2d3d147
perf(bench): allocation counting and end-to-end workloads
BinFlip Oct 31, 2026
4c16cee
build(fuzz): one target per codec, replayed as regression tests
BinFlip Oct 31, 2026
dfc4e4e
fix(metadata): empty heaps, array ranks and enum underlying types
BinFlip Nov 15, 2026
06bc731
feat(resources): BAML and NRBF payloads in .resources streams
BinFlip Nov 15, 2026
b887501
refactor(analysis): follow analyssa's call, prefix and typed IR
BinFlip Nov 15, 2026
931bc73
refactor(deobfuscation): one work budget and one emulation limits type
BinFlip Nov 15, 2026
663055c
refactor(deobfuscation): passes read calls through the new IR
BinFlip Nov 15, 2026
a0eccd7
feat(unflattening): repair rewired edges instead of spilling to locals
BinFlip Nov 15, 2026
d718967
docs: examples compile and run as doc tests
BinFlip Nov 15, 2026
52e9f98
docs(changelog): condense the Unreleased section
BinFlip Nov 15, 2026
ac1257f
build(deps): update dependencies
BinFlip Nov 15, 2026
ace4bcc
perf(metadata): shared names, lazy lists and list-column runs
BinFlip Nov 21, 2026
598c6b4
fix(project): loader panics, confined dependency paths and strict mode
BinFlip Nov 21, 2026
8c283e6
fix(analysis): calli and jmp flow types, an exact or refused x86 lift
BinFlip Nov 21, 2026
e4bf1e9
fix(cilassembly): regenerate Portable PDBs on write, linear heap writes
BinFlip Nov 21, 2026
ddc39ef
fix(emulation): shared heap objects, checked hooks, delegates and str…
BinFlip Nov 21, 2026
5200817
fix(deobfuscation): seeds, per-instantiation caches and windowed bodies
BinFlip Nov 21, 2026
e1c2a26
refactor(deobfuscation)!: remove the LLM renamer
BinFlip Nov 21, 2026
2dddb4c
fix(formatting): ILAsm escaping, floats, general arrays and locals
BinFlip Nov 21, 2026
7eafe78
test: determinism, Portable PDB, heap and cleanup coverage
BinFlip Nov 21, 2026
254b8c6
refactor: every public type nameable, docs built with private items
BinFlip Nov 21, 2026
5ecd7ae
chore(release): 0.10.0
BinFlip Nov 21, 2026
1b93ae1
refactor(analysis): run analyssa's passes through PassEnv
BinFlip Nov 24, 2026
77b4363
build: resolve analyssa 0.7.0 from crates.io
BinFlip Nov 24, 2026
04ae6d8
refactor(deobfuscation)!: remove the unread target_obfuscator option
BinFlip Nov 24, 2026
808181f
docs(changelog): date 0.10.0, cite #290 and #291
BinFlip Nov 24, 2026
8d9594c
docs: fix broken and redundant links, a malformed table and an unused…
BinFlip Nov 24, 2026
3204ba7
fix: narrow integers compute as the int32 the evaluation stack holds
BinFlip Nov 24, 2026
0939e06
fix(constprop): copies only within one stack form, constants in their…
BinFlip Nov 24, 2026
6f959fc
test: differential test of mixed-width lifting, passes and code gener…
BinFlip Nov 24, 2026
457572b
docs(changelog): narrow integers, constant folding, differential test
BinFlip Nov 24, 2026
f1b47ea
build: analyssa 0.7.1
BinFlip Nov 24, 2026
83cfe82
test: name the type the differential sweep picks, for the 1.95 MSRV
BinFlip Nov 24, 2026
0fb7bd9
docs(changelog): 0.10.0 is built on analyssa 0.7.1
BinFlip Nov 24, 2026
218f7ac
build: test samples are checked out as the bytes they are
BinFlip Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 18 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,24 @@
#
# Capping here rather than only in the Makefile means the guard holds for anyone who runs
# cargo directly. Cargo's `[env]` does not override a variable that is already set, so the
# unit-test run — which is cheap per test and wants every core — opts back up to full
# parallelism by exporting `RUST_TEST_THREADS` itself; see the `test` target in the Makefile.
# test tiers, cheap per test and wanting every core, opt back up to full parallelism by
# exporting `RUST_TEST_THREADS` themselves; see the `test-*` targets in the Makefile.
# An explicit `-- --test-threads=N` also still wins, which is what `make test-doc` and CI use.
[env]
RUST_TEST_THREADS = "8"

# Test tiers, defined once and run by name from the Makefile, GitHub CI and GitLab (cargo
# aliases work where `make` does not, such as the Windows runner). Both use the `ci-test`
# profile (release with debug assertions and overflow checks) and the z3 feature.
#
# test-quick: the unit tests, the integration tests outside a `full` module, the fuzz
# regression replay and the allocation checks.
# test-full: every test: also the `full` modules (packer suites, runtime corpora, codegen
# validation), the lift verification sweep and the fuzz regression replay.
#
# The oracle tier is test-full with DOTSCOPE_REQUIRE_TOOLS=1 (`make test-oracle`).
# test-quick already ends in `--`, so harness arguments follow it directly
# (`cargo test-quick --nocapture`); a second `--` would make them a test-name filter.
[alias]
test-quick = "test --workspace --profile ci-test --features z3 --no-fail-fast --lib --bins --test it --test fuzz_regressions --test allocations -- --skip full::"
test-full = "test --workspace --profile ci-test --features z3 --no-fail-fast --lib --bins --tests"
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ yarn.lock text eol=lf
# Fuzz corpus and artifacts (treat as binary to avoid corruption)
fuzz/corpus/** binary
fuzz/artifacts/** binary

# Test samples are exact bytes: MANIFEST.toml hashes them and the PDBs embed and checksum
# their sources, so no checkout converts their line endings (last, to override the rules above)
dotscope/tests/samples/** -text
85 changes: 15 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,27 @@ jobs:
- name: Check compilation
run: cargo check --workspace --all-features

- name: Run tests (Linux - full)
# Test tiers are defined in .cargo/config.toml and the Makefile.
- name: Run tests (Linux - oracle tier)
if: runner.os == 'Linux'
run: cargo test --workspace --release --features z3 --lib --bins --tests --verbose
# The job installs the .NET SDK and Mono: a test that needs them fails rather than skips.
run: make test-oracle

- name: Run tests (macOS/Windows - skip expensive tests)
# macOS and Windows confirm the platform works; Linux carries the full coverage.
- name: Run tests (macOS/Windows - quick tier)
if: runner.os != 'Linux'
run: cargo test --workspace --release --features z3,skip-expensive-tests --lib --bins --tests --verbose
run: cargo test-quick

- name: Run doc tests (Linux only)
if: runner.os == 'Linux'
run: cargo test --workspace --release --doc --features z3 -- --test-threads=4

# Private items are documented, as `make doc` does: the docs link internal items
# (the loader traits, private helpers), and those links resolve only there.
- name: Check documentation
env:
RUSTDOCFLAGS: "-Dwarnings"
run: cargo doc -p dotscope --all-features --no-deps
run: cargo doc -p dotscope --all-features --no-deps --document-private-items

# Compiles and tests without the legacy-crypto feature (Linux only). Pinned to the declared
# MSRV so this job also guards `rust-version`; the workspace check covers the default-feature
Expand Down Expand Up @@ -135,69 +140,7 @@ jobs:
run: cargo check -p dotscope --no-default-features

- name: Run tests (no default features)
run: cargo test -p dotscope --no-default-features --release --lib --bins --tests --verbose

# Fuzzing on pushes to main or PRs targeting main
fuzzing:
name: Quick Fuzzing
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') ||
contains(github.event.head_commit.message, '[fuzz]')

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-fuzz
run: cargo install cargo-fuzz

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
key: fuzz-quick

- name: Build fuzz targets
run: cargo +nightly fuzz build --release
working-directory: dotscope/fuzz

# Every target gets the committed crash corpus. The inputs are PE-shaped, so they are
# directly meaningful to `cilobject`/`assemblyview` and act as structured starting material
# for the blob and body targets rather than starting them from scratch.
- name: Seed corpora from committed regressions
run: |
for t in cilobject assemblyview signatures customattributes methodbody emulation; do
mkdir -p "dotscope/fuzz/corpus/$t"
cp dotscope/tests/samples/fuzz-regressions/* "dotscope/fuzz/corpus/$t/" || true
done

- name: Run quick fuzz test
run: |
for t in cilobject assemblyview signatures customattributes methodbody emulation; do
echo "::group::fuzz $t"
timeout 60 cargo +nightly fuzz run "$t" --release -- \
-max_total_time=40 -timeout=25 -rss_limit_mb=2048 || true
echo "::endgroup::"
done
working-directory: dotscope/fuzz

- name: Check for crashes
run: |
found=0
for t in cilobject assemblyview signatures customattributes methodbody emulation; do
if [ -d "dotscope/fuzz/artifacts/$t" ] && [ "$(ls -A "dotscope/fuzz/artifacts/$t")" ]; then
echo "Fuzzing found crashes in $t:"
ls -la "dotscope/fuzz/artifacts/$t"
found=1
fi
done
if [ "$found" = "1" ]; then
exit 1
fi
run: cargo test -p dotscope --no-default-features --profile ci-test --lib --bins --tests

# Security audit on pushes to main or PRs targeting main
security:
Expand Down Expand Up @@ -258,8 +201,10 @@ jobs:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --workspace --features z3,skip-expensive-tests --lcov --output-path lcov.info --exclude dotscope-cli
- name: Generate code coverage (full tier)
env:
DOTSCOPE_REQUIRE_TOOLS: "1"
run: make test-coverage

- name: Upload to codecov.io
uses: codecov/codecov-action@v7
Expand Down
65 changes: 37 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ env:

jobs:
# Derive the version from the release tag and hold it against Cargo.toml, so a
# mistyped tag fails here rather than shipping under the wrong version.
# mistyped tag fails here rather than shipping under the wrong version. A release
# whose commit never landed on main fails here too, before anything is built.
version:
name: Resolve Version
runs-on: ubuntu-latest
Expand All @@ -24,6 +25,15 @@ jobs:
uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 0 # merge-base needs real history

# A GitHub release can be cut from any commit, including one that never
# landed on main. Releases are restricted to commits contained in main.
- name: Refuse releases not contained in main
run: |
git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
git merge-base --is-ancestor "$(git rev-parse HEAD)" refs/remotes/origin/main \
|| { echo "::error::release commit is not contained in main"; exit 1; }

- name: Resolve and verify version
id: version
Expand All @@ -44,7 +54,9 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Releasing v${VERSION}"

# Then ensure all tests pass
# The same checks as the Linux CI job: formatting, clippy, the oracle test tier
# (every test, external tools required), the doc tests, and the build without
# default features.
test:
name: Pre-Release Tests
runs-on: ubuntu-latest
Expand All @@ -66,6 +78,12 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: Warm up .NET SDK
run: |
dotnet --info
dotnet new console -n warmup -o ${{ runner.temp }}/warmup
dotnet build ${{ runner.temp }}/warmup

- name: Install Mono and Z3
run: |
sudo apt-get update
Expand All @@ -78,18 +96,17 @@ jobs:
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
env:
RUSTFLAGS: "-Dwarnings"
run: cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run tests
run: cargo test --release --lib --verbose
- name: Run tests (oracle tier)
run: make test-oracle

- name: Run doc tests
run: cargo test --release --doc
# Capped: each doc test links its own binary, and uncapped they exhaust memory.
run: cargo test --workspace --release --doc --features z3 -- --test-threads=4

- name: Check documentation
run: cargo doc --no-deps
- name: Run tests without default features
run: cargo test -p dotscope --no-default-features --profile ci-test --lib --bins --tests

# Build CLI binaries for all platforms and attach them to the release
build-cli:
Expand Down Expand Up @@ -162,7 +179,7 @@ jobs:
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
needs: [version, test]
needs: [version, test, build-cli, verify-docs]

permissions:
contents: read
Expand All @@ -173,16 +190,6 @@ jobs:
uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}
fetch-depth: 0 # merge-base needs real history

# A GitHub release can be cut from any commit, including one that never
# landed on main. Publishing is restricted to release tags that are
# actually contained in main.
- name: Refuse releases not contained in main
run: |
git fetch --no-tags origin +refs/heads/main:refs/remotes/origin/main
git merge-base --is-ancestor "$(git rev-parse HEAD)" refs/remotes/origin/main \
|| { echo "::error::release commit is not contained in main"; exit 1; }

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand All @@ -202,11 +209,12 @@ jobs:
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

# Verify documentation builds correctly
# Build the documentation the way docs.rs will (every feature, `--cfg docsrs`),
# with warnings denied: a broken link fails the release before it publishes.
verify-docs:
name: Verify Documentation
runs-on: ubuntu-latest
needs: [version, test]
needs: version

steps:
- name: Checkout code
Expand All @@ -220,8 +228,9 @@ jobs:
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Build documentation for docs.rs
run: |
cargo doc -p dotscope --no-deps --document-private-items
echo "Documentation builds successfully"
echo "Documentation will be automatically available at https://docs.rs/dotscope after publishing"
# docs.rs's cfg, with private items documented as `make doc` does: the docs link internal
# items, and those links resolve only there.
- name: Build documentation with docs.rs's cfg
env:
RUSTDOCFLAGS: "--cfg docsrs -Dwarnings"
run: cargo doc -p dotscope --all-features --no-deps --document-private-items
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dotscope/fuzz/artifacts/*
dotscope/fuzz/coverage/*
fuzz-*.log
.DS_Store
lcov.info
lcov.info
*.gguf
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ tests:
stage: test
dependencies: []
script:
- cargo test --release
# The full test tier (.cargo/config.toml).
- cargo test-full
parallel:
matrix:
- OS: linux
Expand Down
39 changes: 0 additions & 39 deletions .llvm-cov.toml

This file was deleted.

Loading
Loading