StackGuardian / StackGuardian/tirith
Replace Tirith final_expression parser from eval() to a safer approach
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 165
- Forks
- 42
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 11
Description
Currently, the Tirith's final_expression expression is parsed by using Python's eval() function. Though we already have the eval() usage made as safe as possible, we still need to replace it with a safer approach like using a library.
An inspiration is to use:
https://github.com/pyparsing/pyparsing/blob/master/examples/simpleBool.py
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
Locate the code that parses the final_expression expression and trace its current eval() path. Review the linked pyparsing simpleBool example as a possible safer approach, then verify that supported expressions retain their behavior and that parsing no longer relies on eval().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100