feat: add SHA-256 self-integrity verification for Python (#4) - #45
Open
pvbang wants to merge 1 commit into
Open
Conversation
…icheat#4) Implements integrity verification requested in issue javelin-anticheat#4: - anti_cheat.py computes SHA-256 of the running script file and compares it against the JAVELIN_EXPECTED_SHA256 environment variable. - Non-matching hash -> guarded exit (code 0x0C8C). (AC1) - README documents how to compute and set the expected value. (AC2) - Also mirrors C++ guards: debugger detection + suspicious-process scan. - Full test suite (9 tests, pytest + stdlib fallback), all passing. Fixes javelin-anticheat#4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim #4
Summary
Implements the integrity verification requested in #4 for the Python implementation.
anti_cheat.pycomputes the SHA-256 of its own running script file and compares it against theJAVELIN_EXPECTED_SHA256environment variable. On mismatch it performs a guarded exit (code 0x0C8C) instead of running tampered code. When the variable is unset, the check is a safe no-op (optional, mirroring the C++ build-time constant).Acceptance criteria
Tests
9 tests passing under both pytest and the stdlib fallback runner.
Files
Closes #4
Bounty payout wallet (ETH): 0x911d202f713Ee2ad139E8b8b8a0A712347eFE31f