Skip to content

Update eldritch reg funcs#2081

Merged
hulto merged 18 commits intomainfrom
update-eldritch-reg-funcs
Mar 14, 2026
Merged

Update eldritch reg funcs#2081
hulto merged 18 commits intomainfrom
update-eldritch-reg-funcs

Conversation

@hulto
Copy link
Collaborator

@hulto hulto commented Mar 14, 2026

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

google-labs-jules bot and others added 18 commits March 7, 2026 02:59
- Modify `get_reg`, `write_reg_hex`, `write_reg_int`, and `write_reg_str` in `eldritch-libsys` to take a single `path` parameter instead of separate `hive` and `path`.
- Introduce `parse_registry_path` to split the combined path into a hive and subkey.
- Support shortened hive aliases like `HKLM`, `HKCU`, etc. alongside the expanded versions.
- Update `std` and `fake` implementations, as well as associated test files.
- Update `get_registry` and `enable_rdp` tomes (`main.eldritch` and `metadata.yml`) to use the new single path argument.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Modify `get_reg` in `eldritch-libsys` to take a single `path` parameter instead of separate `hive` and `path`.
- Introduce `parse_registry_path` to split the combined path into a hive and subkey.
- Support shortened hive aliases like `HKLM`, `HKCU`, etc. alongside the expanded versions.
- Consolidate `write_reg_hex`, `write_reg_int`, and `write_reg_str` into a single `write_reg` function.
- `write_reg` accepts an `eldritch_core::Value` parameter and performs type checking depending on the provided registry type string (e.g. `REG_DWORD`, `REG_SZ`, `REG_BINARY`).
- Update `std` and `fake` implementations, as well as associated test files.
- Update `get_registry` and `enable_rdp` tomes (`main.eldritch` and `metadata.yml`) to use the new single path argument and `sys.write_reg`.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Replaced `write_reg_str`, `write_reg_int`, and `write_reg_hex` with a single `write_reg` function.
- The new `write_reg` function accepts any `eldritch_core::Value` type and dynamically validates it against the specified registry type (e.g., matching a string to `REG_SZ`, int or parsed string to `REG_DWORD`).
- Unified the path parameter for registry writes to match the newly updated `get_reg` single-path parameter.
- Updated `fake.rs`, `std.rs`, and mock libraries to reflect the method signature change.
- Re-wrote and migrated unit tests from the removed individual implementations to the unified `write_reg_impl.rs` file.
- Updated `bindings_test.rs` to assert the new bindings signature.
- Removed unused imports and cleaned up formatting.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Modify `parse_registry_path` to convert `\\` to `\` before splitting the path.
- Add tests to ensure both single, double and mixed backslashes are supported in `parse_registry_path`.
- Fix build and fmt issues.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Modify `parse_registry_path` to normalize `\\` to `\` before splitting the path to extract the hive.
- Add tests in `reg_utils.rs` to verify correct behavior with single, double, and mixed backslash usage.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Ran `cargo fmt` to fix formatting issues in `implants/lib/eldritch/stdlib/eldritch-libsys/src/std/reg_utils.rs` and `implants/lib/eldritch/stdlib/eldritch-libsys/src/std/write_reg_impl.rs` which were causing the implants CI check runs to fail.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Update `sys.write_reg` and `sys.get_reg` documentation in `eldritch.md` to reflect the new single-path and consolidated value-agnostic variations.
- Run `generate-docs.js` to update `eldritch-docs.json`.
- Restored inadvertently deleted `d.ts` typescript interfaces inside `tavern/internal/www`.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Removed outdated documentation for `sys.write_reg_hex`, `sys.write_reg_int`, and `sys.write_reg_str` from `docs/_docs/user-guide/eldritch.md`.
- Added updated documentation for `sys.write_reg` with examples mapping to the new signature in `docs/_docs/user-guide/eldritch.md`.
- Re-generated `tavern/internal/www/src/assets/eldritch-docs.json` by running `generate-docs.js`.
- Cleaned up output log file and checked frontend UI build integrity.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
- Updated `tavern/internal/portals/integration_test.go` to generate dynamic random identifiers (appending `time.Now().UnixNano()`) instead of hardcoded strings for Users, Hosts, and Beacons.
- This resolves intermittent `UNIQUE constraint failed` test failures during `go test`.
- Removed accidental `.patch`, `.orig`, `.rej`, and `output.log` files that were erroneously staged during investigation.

Co-authored-by: hulto <7121375+hulto@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2026

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
2813    ±0 2813    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#1707 2813 2813 0 0 0 0 39.6s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2813 0 0 5.6s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
TestDockerExecutor_Build_ContextCancellation 1 5.6s 5.6s
eldritch-libsys: std::dll_inject_impl::tests::test_dll_inject_simple 1 5.2s 5.2s
TestInteractiveShell 1 5.1s 5.1s
TestOtherStreamOutput 1 5.0s 5.0s
imix::bin/imix: install::tests::test_install_execution 3 1.8s 5.0s
imix::bin/imix: install::tests::test_install_execution 3 1.8s 5.0s
imix::bin/imix: install::tests::test_install_execution 3 1.8s 5.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@hulto hulto merged commit ff80a97 into main Mar 14, 2026
8 checks passed
@hulto hulto deleted the update-eldritch-reg-funcs branch March 14, 2026 23:42
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