StackGuardian / StackGuardian/tirith
refactor(core): replace `eval()` in the final-expression parser
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 165
- Forks
- 42
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 11
Description
eval_expression is evaluated with Python eval() (#172). Replace with a small parser
(ast.literal_eval is not enough — it needs boolean operators over evaluator ids) or a
whitelist-based ast walk. Security hygiene that must land before community-contributed policies
("policies from git", "policy packs").
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the eval_expression entry point and review issue #172 for the current Python eval() behavior. Define the allowed expression forms, including boolean operators over evaluator ids, and ensure the replacement cannot execute arbitrary code. Done means community-contributed policies can be evaluated without eval().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100