Post-incident forensics and impact analysis for development teams
Stop guessing what caused your production incidents. Traversion analyzes your Git history to identify suspicious commits, assess pull request risks, and provide actionable insights for faster incident resolution.
When production breaks, you need answers fast:
- Which recent changes could have caused this?
- What was risky about that deployment?
- Who should we involve in the investigation?
- What patterns led to this incident?
Traditional Git tools show what changed, but not why it might be problematic. Traversion analyzes commits using risk factors to highlight the most likely culprits.
# Install globally
npm install -g traversion
# Analyze an incident from 2 hours ago
trav incident --time "2 hours ago" --hours 24
# Analyze a risky PR before merging
trav pr microsoft/vscode/1234 --comment
# Start web interface for team use
npm start
Quickly identify suspicious commits around incident time:
trav incident --time "2023-12-01T15:30:00Z" --hours 48 --files "server.js,database.js"
Risk Scoring Based On:
- Off-hours deployments (weekends, nights)
- Configuration and infrastructure changes
- Large or widespread code changes
- Vague commit messages ("fix", "update")
- Changes to affected files
- Database migrations and schema changes
Assess risk before merging:
trav pr owner/repo/123 --comment
Analyzes:
- File change patterns and risk areas
- Deployment complexity and testing needs
- Scope and potential blast radius
- Automated risk scoring and recommendations
Perfect for team incident response:
npm start # Visit http://localhost:3335
- Visual incident timeline analysis
- PR risk assessment dashboard
- Team-friendly reports and recommendations
- No technical Git knowledge required
๐จ INCIDENT FORENSICS REPORT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Incident Time: 2023-12-01T15:30:00Z
๐
Analysis Window: 24 hours
๐ Suspicious Commits: 3
๐ฏ TOP SUSPECTS:
1. ๐จ a1b2c3d4 hotfix: update database connection timeout
๐ค john.doe | โฐ 12/01/2023, 2:15:00 PM
๐ Risk: 85% | Files: 2 | +15/-3
๐ท๏ธ Off-hours deployment, Configuration changes, Urgent/fix commit
2. โ ๏ธ e5f6g7h8 refactor user authentication module
๐ค jane.smith | โฐ 12/01/2023, 11:30:00 AM
๐ Risk: 65% | Files: 8 | +234/-156
๐ท๏ธ Security changes, Large code changes
๐ก RECOMMENDATIONS:
๐ด INVESTIGATION: Start with commit a1b2c3d4 - highest risk score
๐ด ROLLBACK: Consider rolling back 1 high-risk commit if safe
๐ก CONFIG: Configuration changes detected - verify environment variables
๐ PULL REQUEST ANALYSIS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐จ PR #1234: Implement user session management
๐ค Author: contributor
๐ Risk Score: 72%
๐ Changes: +445 -123 (12 files)
๐ IMPACT ASSESSMENT:
Scope: Medium - affects multiple components
Complexity: Medium-High - security changes
Risk Areas: Security, Configuration, Database
๐งช TESTING RECOMMENDATIONS:
โข Security regression testing
โข Authentication/authorization testing
โข Full regression testing
โข Performance testing
๐ก RECOMMENDATIONS:
๐ด REVIEW: High-risk PR - require multiple senior reviewers
๐ด SECURITY: Require security team review for auth changes
๐ก PROCESS: Add detailed description explaining security implications
- Node.js 18+
- Git repository
- GitHub token (optional, for PR analysis)
npm install -g traversion
# Or run locally
git clone https://github.com/your-org/traversion
cd traversion
npm install
# Set GitHub token for PR analysis (optional)
export GITHUB_TOKEN=your_github_token
# Configure custom risk patterns (optional)
export TRAVERSION_CONFIG=/path/to/config.json
Command | Description | Example |
---|---|---|
trav incident |
Analyze incident timeline | trav incident --time "2 hours ago" |
trav pr |
Analyze pull request | trav pr owner/repo/123 --comment |
trav analyze |
Analyze specific commits | trav analyze --commits "abc123,def456" |
trav forensics |
Interactive incident mode | trav forensics |
trav incident [options]
-t, --time <time> Incident time (ISO string or "X hours ago")
-h, --hours <hours> Hours to look back (default: 24)
-f, --files <files> Comma-separated affected files
trav pr <owner>/<repo>/<number> [options]
--comment Post analysis as PR comment
When production breaks, immediately run:
trav incident --time "30 minutes ago" --hours 24
Get a ranked list of suspicious commits to investigate first.
Before merging high-risk PRs:
trav pr your-org/your-repo/456 --comment
Automatically comment with risk assessment and testing recommendations.
Add Traversion analysis to your PR template or CI pipeline to surface risks that human reviewers might miss.
Use historical incidents to train teams on pattern recognition and investigation techniques.
Commits are scored (0-1.0) based on:
Timing Factors (0.2)
- Weekend/off-hours deployments
- Holiday deployments
Change Factors (0.4)
- Configuration files (
config
,env
,.yml
) - Database changes (
migration
,schema
,.sql
) - Infrastructure (
Dockerfile
,k8s/
,deploy/
) - Security code (
auth
,login
,security
) - Large changesets (>500 lines)
Context Factors (0.4)
- Urgent keywords (
hotfix
,critical
,emergency
) - Vague commit messages
- Changes to incident-affected files
- Multiple files modified
Evaluates:
- File change patterns - What types of files were modified
- Scope analysis - How many components are affected
- Complexity assessment - Database, security, infrastructure changes
- Testing requirements - What types of testing are needed
- Deployment risks - Potential issues during rollout
- name: Analyze PR Risk
run: |
npx traversion pr ${{ github.repository }}/${{ github.event.number }} --comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
trav incident --time "1 hour ago" --json | curl -X POST -H 'Content-type: application/json' --data @- YOUR_WEBHOOK_URL
// When incident detected
const analysis = await traversion.analyzeIncident(new Date(), 24, affectedFiles);
await alertManager.send(`Top suspect: ${analysis.suspiciousCommits[0].shortHash}`);
Create traversion.config.js
:
export default {
riskPatterns: {
'Payment System': /payment|billing|stripe|paypal/i,
'User Data': /user|profile|account|personal/i,
'Critical API': /api\/(auth|payment|user)/i
},
riskWeights: {
offHours: 0.3,
largeChanges: 0.4,
configChanges: 0.5
},
excludeFiles: ['*.test.js', '*.spec.js', 'docs/']
};
export default {
notifications: {
highRisk: ['security-team@company.com'],
database: ['dba-team@company.com'],
infrastructure: ['devops-team@company.com']
}
};
- Historical incident pattern learning
- Team-specific risk factor weighting
- Anomaly detection for unusual patterns
- Jira incident linking
- PagerDuty integration
- DataDog/NewRelic correlation
- Slack incident bot
We welcome contributions! See CONTRIBUTING.md for guidelines.
git clone https://github.com/your-org/traversion
cd traversion
npm install
npm test
npm run dev
src/forensics/
- Core analysis algorithmssrc/integrations/
- GitHub, Slack, etc. integrationssrc/cli/
- Command-line interfacesrc/web/
- Web interface for teams
MIT License - see LICENSE for details.
- ๐ Documentation
- ๐ฌ GitHub Discussions
- ๐ Report Issues
- ๐ง Support: support@traversion.dev
Stop playing detective with your incidents. Let Traversion do the investigating.
๐ Made with โค๏ธ for development teams who deserve better incident response.