New rule: detect git rebase -i / history rewriting
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Context
From Vincent's review on PR #12 — interactive rebase (git rebase -i HEAD~N) can squash commits and lose commit history.
What to catch
git rebase -i/git rebase --interactive- Possibly also
git commit --amend,git filter-branch,git reflog expire
Considerations
- Interactive rebase is extremely common in normal dev workflows (squashing before merge). High false-positive risk.
- Losing commit history is different from losing working code — severity should probably be
medium+warn, notblock. - May warrant its own category (
destructive_git_history_rewrite) rather than adding todestructive_git_working_tree_loss.
Origin
PR #12 review comment by @gewenyu99
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 with the linked context in PR #12 and inspect how existing destructive Git rules are structured. Decide the scope for interactive rebase and the possibly related commands, then define the category, severity, and warning behavior; this is done when the rule's false-positive policy and test cases are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100