This PR delivers a global security hardening pass across active modules (review, AMC, exam, results/statistics), and adds automated security checks to prevent regressions.#37
Merged
Conversation
…curity checks" -m "Replace unsafe eval-based score expressions with AST-restricted safe evaluator." -m "Add secure ZIP extraction guards (path traversal, symlink, file count and size limits)." -m "Introduce CI and local security checks (Bandit, pip-audit, require_POST guard, forbidden-call scanner)." -m "Include supporting security tooling and config files for global hardening workflow.
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.
Changes
@require_POSTon high-risk write/process views in review, AMC, exam, results, and preparation flows touched in this branch.eval(...)usage for score/stat formula paths with a restricted safe evaluator..github/workflows/security-checks.ymlscripts/security_check.shscripts/check_require_post.pyscripts/check_forbidden_calls.pypip-audit) in CI.Testing
py_compileon modified security-related Python modulesKnown Follow-up (Out of Scope)
@exam_permission_required+ strict exam-scoped lookups) will be handled in a separate branch.Checklist