Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5fcdf03
fix: synchronize SessionManager and return snapshots instead of pointers
claude Oct 30, 2026
273f651
fix: replace desktop settings and cortex.ini atomically
claude Oct 30, 2026
37b6542
fix: never overwrite a project file that does not parse
claude Oct 30, 2026
4b8ecc9
test: baseline benchmarks and a ThreadSanitizer session check in CI
claude Oct 30, 2026
03c95b8
docs: Cortex 2.0 roadmap with the step 1 audit and baselines
claude Oct 30, 2026
e9cf1d8
feat: typed runtime event catalog with explicit gap reporting
claude Oct 30, 2026
b24520f
feat: shared investigation context in the runtime, readable over MCP
claude Oct 30, 2026
9a5f9fb
security: refuse a runtime whose process generation differs from the …
claude Oct 30, 2026
563d376
feat(desktop): share addresses with agents and show their knowledge
claude Oct 30, 2026
8a135bf
docs: shared investigation context, step 2 status
claude Oct 30, 2026
3b6c87d
feat: desktop state, breakpoint hits and the result contract in the r…
claude Oct 30, 2026
c2422c7
fix(desktop): bind per-target state to the process lifetime, share scans
claude Oct 30, 2026
78bcbb3
test: investigation context isolation E2E on two live targets
claude Oct 30, 2026
842ab76
docs: step 2 complete
claude Oct 30, 2026
c846d77
fix: refuse a patch revert that could corrupt the target
claude Oct 30, 2026
3547b66
feat: pointer path stability across processes, memory viewer captures
claude Oct 30, 2026
15626dc
test: demonstration actor and the scripted manual workflow
claude Oct 30, 2026
864c9f0
docs: demonstration A and step 3 status
claude Oct 30, 2026
038663e
chore: ignore Python bytecode caches
claude Oct 30, 2026
c949434
docs: roadmap gains multi-runtime support
claude Oct 30, 2026
7b37afd
test: manual demo accepts a read-modify-write store
claude Oct 30, 2026
8febd0b
feat: artifact providers for static analysis (PE, ASAR)
claude Oct 30, 2026
636c610
feat: Artifacts workspace in the desktop
claude Oct 30, 2026
8018442
docs: step 4a status, artifact tools and changelog
claude Oct 30, 2026
806640d
test: Electron fixture app built by esbuild and @electron/asar
claude Oct 31, 2026
815d834
feat: JavaScript, source map and Electron static analysis
claude Oct 31, 2026
36374a0
feat: Electron, Modules and Source position tabs in Artifacts
claude Oct 31, 2026
b98abf5
docs: step 4b status, source position tool
claude Oct 31, 2026
474a98a
test: C# fixture and a System.Reflection.Metadata oracle
claude Oct 31, 2026
9e3f229
feat: .NET metadata, CIL disassembly and ZIP containers
claude Oct 31, 2026
35cfc45
feat: .NET tab in Artifacts; .NET E2E against a fresh SDK build
claude Oct 31, 2026
2f689e6
docs: step 4c status, CIL tool
claude Oct 31, 2026
34726e8
refactor: share the CFG algorithm between live and offline analysis
claude Oct 31, 2026
a993736
feat: offline native code analysis and artifact annotations
claude Oct 31, 2026
49cf9d7
feat: Code tab in Artifacts; native analysis E2E against objdump
claude Oct 31, 2026
9f23909
docs: step 4d status, native code and annotation tools
claude Oct 31, 2026
fb016e8
ci: find objdump by its MSYS2 path; analyse kernel32.dll in the GUI s…
claude Nov 1, 2026
149f418
feat: evidence records with enforced classes, build comparison and ex…
claude Nov 1, 2026
7d80bdb
docs: evidence format, step 5 status
claude Nov 1, 2026
5a1c8f8
feat: investigations as an enforced journal with person approvals
claude Nov 1, 2026
b25ce70
docs: investigations, step 6 status
claude Nov 1, 2026
d371324
feat: process tree with Chromium/Electron roles
claude Nov 2, 2026
26d0441
feat: AI Investigation workspace and module+RVA navigation
claude Nov 2, 2026
e5e5370
docs: step 7 status, process tree tool
claude Nov 2, 2026
b7fe8ba
Step 8: external analysis engines (Ghidra headless, ILSpy) behind an …
claude Nov 2, 2026
422249e
analysis E2E: drop ILSpy's compiler-reserved RefSafetyRules line befo…
claude Nov 2, 2026
6fb2117
providers: resolve relative input paths before the engine runs in its…
claude Nov 2, 2026
3c725f9
Step 8: CDP live provider for Node.js/Electron (log breakpoints, no e…
claude Nov 2, 2026
0ec4293
providers: retry removing an engine's work folder after cancellation
claude Nov 2, 2026
ffcd147
Step 8: Vineflower provider for Java decompilation
claude Nov 4, 2026
53b2edf
docs: third-party wording for three engines
claude Nov 4, 2026
302d9b8
Ghidra provider: ELF x86-64 validated
claude Nov 4, 2026
b87d5fe
cortex_analysis_map: analysis RVAs to a live module matched by SHA-256
claude Nov 4, 2026
b668b18
Step 8: DAP live provider (Python via debugpy, .NET via netcoredbg)
claude Nov 4, 2026
59d9b6a
Step 8: JDWP live provider for Java; step 8 complete
claude Nov 4, 2026
ab9c7d4
CI: netcoredbg diagnostics on Windows; run the MCP E2E even if the DA…
claude Nov 4, 2026
87383da
GUI suite: retry the Live (CDP) attach until node's inspector listens
claude Nov 4, 2026
4097e06
netcoredbg: report the real attach error; its server serves one session
claude Nov 4, 2026
09928f6
DAP: allow 60 s for initialize/attach; report why initialize failed
claude Nov 4, 2026
dd3749b
netcoredbg on Windows: engine log and adapter output on a failed attach
claude Nov 5, 2026
82a7295
netcoredbg on Windows: run it with output to a file and its own log
claude Nov 5, 2026
bcfecf5
docs: .NET live (netcoredbg) validated on Linux only; Windows server-…
claude Nov 5, 2026
eb9c2a3
netcoredbg in stdio mode: Cortex starts it and speaks DAP over pipes
claude Nov 5, 2026
7d0b672
dap.h: document the netcoredbg stdio mode in the header comment
claude Nov 5, 2026
77eea1d
Step 10 (docs): README with recorded GIFs, CONTRIBUTING, SECURITY, te…
claude Nov 5, 2026
ff97945
docs: netcoredbg stdio mode validated in Windows CI
claude Nov 5, 2026
61074c2
Brand: new logo (transparent) and banner with light/dark variants
claude Nov 5, 2026
b8fda88
README: explain the two ways to use Cortex (desktop/CLI and MCP agent)
claude Nov 5, 2026
4c3c717
Step 9.1: the contract tests contracts.yml compiled by hand are CTest…
claude Nov 5, 2026
344924e
Step 9.2: libFuzzer harnesses for the file parsers (ASan + UBSan)
claude Nov 5, 2026
3de4fc2
Step 9.3: robustness E2E; fix three crashes it and the fuzzers found
claude Nov 5, 2026
c029b73
CI: ccache for the MinGW builds of the GUI test suite
claude Nov 5, 2026
6726542
Step 9.5: stale runtime tokens are removed and never used
claude Nov 5, 2026
cab1ea4
Step 9.6: fuzz the live protocols and the record stores; fix what it …
claude Nov 5, 2026
8ff02d0
Step 9.7: live baselines and Cortex vs Ghidra; fix a target crash and…
claude Nov 5, 2026
22ad636
docs: step 9 status with the Windows CI numbers
claude Nov 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Bug report
description: Something in Cortex does not work as documented.
labels: [bug]
body:
- type: markdown
attributes:
value: |
Security problems go through SECURITY.md, not here.
Only report problems seen on software you own or are authorized to analyze.
- type: input
id: version
attributes:
label: Cortex version or commit
placeholder: v1.0.1, or the commit / CI artifact
validations:
required: true
- type: input
id: platform
attributes:
label: Windows version and target architecture
placeholder: Windows 11 24H2, target x86
validations:
required: true
- type: dropdown
id: area
attributes:
label: Area
options:
- Desktop (scan, addresses, memory viewer)
- Debugger / breakpoints / traces
- Static analysis (inspect, artifacts)
- External engines (Ghidra, ILSpy, Vineflower)
- Live providers (CDP, debugpy, netcoredbg, JDWP)
- MCP server / agents
- Evidence, investigations, projects
- Install / portable bundle
- Other
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Ideally against the repository's test target or fixtures.
placeholder: |
1. cortex.exe mcp --pid ...
2. call ...
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected and actual behaviour
validations:
required: true
- type: textarea
id: logs
attributes:
label: Logs
description: Status line, MCP replies, cortex_denied_mutations.jsonl, cortex_debugger_events.jsonl. Remove private data first.
render: text
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/PdB333/cortex/security/advisories/new
about: Report vulnerabilities privately, not in a public issue.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Feature request
description: Propose a capability or an improvement.
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Requests to bypass anti-cheat, DRM, licence checks or access controls are out of scope and will be closed.
- type: textarea
id: problem
attributes:
label: What are you trying to do?
description: The investigation or workflow, and where Cortex gets in the way.
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposal
description: What Cortex should do. Say whether it only reads or also changes the target.
validations:
required: true
- type: textarea
id: validation
attributes:
label: How could it be validated?
description: A fixture, an owned program or a reference tool to compare against.
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Summary

<!-- What changed and why. -->

## Validation

<!-- Commands you ran and their result. Name the fixture or the owned program. -->

- [ ] `ctest` for the affected build(s)
- [ ] End-to-end suites for the touched area (see CONTRIBUTING.md)
- [ ] Windows x64 and x86 targets (CI)

## Safety

- [ ] Read-only paths still work without write authority
- [ ] Every change to a target needs the operator's authority and `mutation_permission`
- [ ] No test was skipped, disabled or loosened

## Limitations

<!-- What is not validated or not handled yet. Also recorded in the docs. -->
176 changes: 69 additions & 107 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,39 +114,10 @@ jobs:
shell: msys2 {0}
run: cmake --build build/p1-${{ matrix.arch }} --parallel 2

- name: Run existing CTest suite
- name: Run CTest suite (includes the action transaction and semantic plan tests)
shell: msys2 {0}
run: ctest --test-dir build/p1-${{ matrix.arch }} --output-on-failure

- name: Build action transaction tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2
tests/action_transaction_tests.cpp
core/action/action.cpp
core/events/events.cpp
-Icore
-o build/p1-${{ matrix.arch }}/cortex_action_transaction_tests.exe
-static -static-libgcc -static-libstdc++

- name: Run action transaction tests
shell: msys2 {0}
run: build/p1-${{ matrix.arch }}/cortex_action_transaction_tests.exe

- name: Build semantic plan tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/semantic_tools_tests.cpp
-Ibuild/p1-${{ matrix.arch }}/_deps/json-src/include
-o build/p1-${{ matrix.arch }}/cortex_semantic_tools_tests.exe
-static -static-libgcc -static-libstdc++

- name: Run semantic plan tests
shell: msys2 {0}
run: >-
build/p1-${{ matrix.arch }}/cortex_semantic_tools_tests.exe
core/api/routes_status.cpp

# ---- P2 Contracts (was .github/workflows/p2-contracts.yml)
p2-contracts:
name: p2-${{ matrix.arch }}
Expand Down Expand Up @@ -202,86 +173,10 @@ jobs:
path: build/p2-${{ matrix.arch }}/compile.log
if-no-files-found: warn

- name: Run core tests
- name: Run CTest suite (includes the MCP protocol, authority, pipe, schema, scheduler, bridge policy, request id and pagination tests)
shell: msys2 {0}
run: ctest --test-dir build/p2-${{ matrix.arch }} --output-on-failure

- name: Build and run MCP protocol tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/mcp_protocol_tests.cpp
-Ibuild/p2-${{ matrix.arch }}/_deps/json-src/include
-o build/p2-${{ matrix.arch }}/mcp_protocol_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_protocol_tests.exe

- name: Build and run MCP write-authority tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 -Icore tests/mcp_authority_tests.cpp
-Ibuild/p2-${{ matrix.arch }}/_deps/json-src/include
-o build/p2-${{ matrix.arch }}/mcp_authority_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_authority_tests.exe

- name: Build and run native pipe contract tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/mcp_pipe_protocol_tests.cpp
-o build/p2-${{ matrix.arch }}/mcp_pipe_protocol_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_pipe_protocol_tests.exe

- name: Build and run semantic execution contract tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/semantic_tools_tests.cpp
-Ibuild/p2-${{ matrix.arch }}/_deps/json-src/include
-o build/p2-${{ matrix.arch }}/semantic_tools_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/semantic_tools_tests.exe core/api/routes_status.cpp

- name: Build and run MCP schema tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/mcp_schema_tests.cpp
-Ibuild/p2-${{ matrix.arch }}/_deps/json-src/include
-o build/p2-${{ matrix.arch }}/mcp_schema_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_schema_tests.exe
&& c++ -std=c++17 -O2 tests/mcp_query_schema_tests.cpp
-Ibuild/p2-${{ matrix.arch }}/_deps/json-src/include
-o build/p2-${{ matrix.arch }}/mcp_query_schema_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_query_schema_tests.exe

- name: Build and run game-thread call scheduler tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/call_scheduler_tests.cpp core/call/call.cpp
-o build/p2-${{ matrix.arch }}/call_scheduler_tests.exe
-static -static-libgcc -static-libstdc++ -luser32
&& build/p2-${{ matrix.arch }}/call_scheduler_tests.exe
- name: Build and run MCP bridge policy tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/mcp_bridge_policy_tests.cpp
-o build/p2-${{ matrix.arch }}/mcp_bridge_policy_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_bridge_policy_tests.exe

- name: Build and run inherited request tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 tests/request_id_tests.cpp
-o build/p2-${{ matrix.arch }}/request_id_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/request_id_tests.exe
&& c++ -std=c++17 -O2 tests/pagination_tests.cpp
-o build/p2-${{ matrix.arch }}/pagination_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/pagination_tests.exe

# ---- P3 Probe Build (was .github/workflows/p3-probe-build.yml)
p3-probe-build:
name: probe-build-${{ matrix.arch }}
Expand Down Expand Up @@ -399,6 +294,73 @@ jobs:
- name: Run portable target model test
run: ./target_model_portable_tests

# The desktop frame loop, its workers and the debugger backend share one
# SessionManager; ThreadSanitizer fails this step on any data race.
- name: Session manager under ThreadSanitizer
run: >-
g++ -std=c++17 -g -O1 -Wall -Wextra -Werror -fsanitize=thread -pthread
-Icore tests/session_manager_tests.cpp core/target/session_manager.cpp
-o session_manager_tsan
&& setarch "$(uname -m)" -R env TSAN_OPTIONS=halt_on_error=1 ./session_manager_tsan

# The shared investigation context is written by pipe workers serving
# the desktop and agents at once.
- name: Investigation context under ThreadSanitizer
run: >-
sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends nlohmann-json3-dev
&& g++ -std=c++17 -g -O1 -Wall -Wextra -Werror -fsanitize=thread -pthread
-Icore tests/investigation_context_tests.cpp
core/context/investigation_context.cpp core/context/context_api.cpp
-o investigation_context_tsan
&& setarch "$(uname -m)" -R env TSAN_OPTIONS=halt_on_error=1 ./investigation_context_tsan

# ---- Fuzzing of the file parsers (step 9). Inputs are untrusted: every
# parser must survive malformed files without a crash, an out-of-bounds
# access or undefined behaviour (ASan + UBSan).
fuzz-parsers:
name: Fuzz file parsers
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

- name: Install clang and its sanitizer runtimes
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends clang-18 libclang-rt-18-dev ninja-build
# ASan needs fewer random mmap bits than recent runner kernels use.
sudo sysctl -w vm.mmap_rnd_bits=28

- name: Build the fuzzers (libFuzzer, ASan, UBSan)
run: |
cmake -S tests/fuzz -B build/fuzz -G Ninja -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18
cmake --build build/fuzz --parallel

- name: Replay the kept crash inputs and the seeds
run: |
cmake -S tests/fuzz -B build/fuzz-replay -G Ninja -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCORTEX_FUZZ_REPLAY=ON
cmake --build build/fuzz-replay --parallel
ctest --test-dir build/fuzz-replay --output-on-failure
python3 tests/fuzz/make_seeds.py build/fuzz-seeds
for harness in artifact pe_code text protocols stores; do build/fuzz-replay/fuzz_$harness build/fuzz-seeds/$harness; done

- name: Fuzz each harness for 60 s
run: |
mkdir -p build/fuzz-findings
for harness in artifact pe_code text protocols stores; do
mkdir -p build/fuzz-work/$harness
build/fuzz/fuzz_$harness -max_total_time=60 -max_len=65536 -timeout=10 -rss_limit_mb=2048 \
-artifact_prefix=build/fuzz-findings/$harness- build/fuzz-work/$harness build/fuzz-seeds/$harness
done

- name: Upload crashing inputs
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-findings
path: build/fuzz-findings
if-no-files-found: ignore

# ---- P4 Target Model (was .github/workflows/p4-target-model.yml)
p4-target-model:
name: target-model-${{ matrix.arch }}
Expand Down
Loading
Loading