Skip to content

Add baseline anti-cheat guards - #24

Open
rafael81 wants to merge 4 commits into
javelin-anticheat:mainfrom
rafael81:feat/basic-anti-cheat-issue-2
Open

Add baseline anti-cheat guards#24
rafael81 wants to merge 4 commits into
javelin-anticheat:mainfrom
rafael81:feat/basic-anti-cheat-issue-2

Conversation

@rafael81

@rafael81 rafael81 commented May 12, 2026

Copy link
Copy Markdown

/claim #2
/claim #4

Summary

  • keep AntiCheat.cpp buildable and preserve the Windows debugger, suspicious-process, and optional CRC32 executable integrity checks
  • add the missing Python monitor with debugger detection, Windows process scanning, and optional JAVELIN_EXPECTED_SHA256 script integrity checks
  • document C++/Python run steps and expected integrity hash setup
  • add regression tests for process detection, guarded exits, and Python script integrity behavior
  • include short visual demo assets in the README

Demo

Anti-cheat demo

Validation

$ python3 -m unittest discover -s tests
............
----------------------------------------------------------------------
Ran 12 tests in 0.002s

OK

$ c++ -std=c++17 -Wall -Wextra -pedantic AntiCheat.cpp -o /tmp/javelin-anticheat-check

$ /tmp/javelin-anticheat-check
[Javelin AntiCheat] Windows-only checks skipped on this platform.

$ git diff --check

Windows-specific process and debugger APIs are implemented behind _WIN32; the local compile check verifies the non-Windows CI-safe path from this environment.

This PR was prepared with AI assistance and manually reviewed before submission.

@rafael81
rafael81 force-pushed the feat/basic-anti-cheat-issue-2 branch from 483b689 to 822ba77 Compare May 12, 2026 15:49
@rafael81

Copy link
Copy Markdown
Author

Follow-up update: I added a short MP4 demo asset alongside the existing GIF so the PR directly satisfies the Algora demo-video guideline.

New asset:

Re-ran validation after the update:

  • python3 -m unittest discover -s tests
  • c++ -std=c++17 -Wall -Wextra -pedantic AntiCheat.cpp -o /tmp/javelin-anticheat-check && /tmp/javelin-anticheat-check
  • git diff --check

This remains AI-assisted and manually reviewed.

@rafael81

rafael81 commented May 12, 2026

Copy link
Copy Markdown
Author

Follow-up hardening commit pushed: 64b5a74.

This keeps the existing behavior but makes the Python Windows process scan more robust by:

  • splitting tasklist CSV parsing into a tested helper,
  • returning an empty process list if tasklist is unavailable or fails, so the monitor does not crash during startup,
  • adding regression coverage for CSV parsing and scan failure handling.

Re-ran validation after the update:

  • python3 -m unittest discover -s tests
  • c++ -std=c++17 -Wall -Wextra -pedantic AntiCheat.cpp -o /tmp/javelin-anticheat-check && /tmp/javelin-anticheat-check
  • git diff --check

This follow-up was AI-assisted and manually reviewed.

@rafael81

Copy link
Copy Markdown
Author

Follow-up integrity commit pushed: 75424f5.

This completes the Python side of #4 while keeping the original #2 scope intact:

  • adds optional JAVELIN_EXPECTED_SHA256 script integrity verification,
  • exits with the guarded integrity code on missing/malformed/mismatched configured hashes,
  • documents the expected-hash setup flow,
  • adds regression coverage for no-env, matching hash, mismatch, and integrity-driven guarded exits.

Re-ran validation after the update:

  • python3 -m unittest discover -s tests -> 12 tests passed
  • c++ -std=c++17 -Wall -Wextra -pedantic AntiCheat.cpp -o /tmp/javelin-anticheat-check
  • /tmp/javelin-anticheat-check
  • git diff --check

The PR body now includes /claim #4 in addition to /claim #2. This follow-up was AI-assisted and manually reviewed.

@rafael81

Copy link
Copy Markdown
Author

@algora-pbc /claim #4

@rafael81

Copy link
Copy Markdown
Author

@algora-pbc /claim #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant