redballoonsecurity / redballoonsecurity/ofrak
Represent features using primitive types and `IntEnum`/`StrEnum` instead of immutable `Enum`s for extensibility
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
What is the use case for the feature?
Adding new feature support to ofrak and ofrak_patch_maker should not require forking this repository to modify internal types or hacking together fake Enum member objects. We should use bare Enum when it's suitably internal and not intended to be extensible or it's possible to actually enumerate all possible options (endianness, memory permissions, etc. probably qualify here).
Example of Enums that shouldn't be
ElfSectionTypeElfProgramHeaderType- Every
Enuminofrak_type.architecture
Does the feature contain any proprietary information about another company's intellectual property?
No.
How would you implement this feature?
Changing "feature" Enums to inherit from StrEnum or IntEnum and update typedefs in consuming classes/methods to str or int.
Are you interested in implementing it yourself?
Yes.
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 by inventorying Enum definitions in ElfSectionType, ElfProgramHeaderType, and ofrak_type.architecture, then trace their consuming classes and methods. Determine which types need primitive-compatible extensibility and update the affected typedefs consistently. Done means new OFRAK and ofrak_patch_maker feature values can be added without modifying this repository or creating fake Enum members.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100