Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 1.57 KB

File metadata and controls

66 lines (52 loc) · 1.57 KB

Contributing to VulnHunter

Thank you for your interest in contributing to VulnHunter! We welcome contributions from the community.

Getting Started

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/albraa911sa-lgtm/vuln-hunter.git
  3. Install dependencies: npm install
  4. Compile: npm run compile

Development Workflow

  1. Create a feature branch: git checkout -b feature/your-feature
  2. Make your changes
  3. Test thoroughly
  4. Commit with clear messages
  5. Push and create a Pull Request

Adding New Vulnerability Rules

To add a new detection rule, edit src/scanner/vulnerabilityRules.ts:

{
    id: 'YOUR-001',
    name: 'New Vulnerability',
    description: 'What this vulnerability does',
    cwe: 'CWE-XXX',
    owasp: 'A0X:2021 – Category',
    languages: ['javascript', 'typescript'],
    severity: 'HIGH',
    baseSeverity: 7.0,
    category: 'Category',
    patterns: [
        'dangerous-pattern-1',
        'dangerous-pattern-2'
    ],
    falsePositivePatterns: [
        'safe-pattern-1'
    ],
    skipComments: true,
    recommendation: 'How to fix this vulnerability',
    attackVector: 'How attackers exploit this',
    impact: 'What happens when exploited',
    tags: ['tag1', 'tag2']
}

Code Style

  • Use TypeScript strict mode
  • Follow existing code patterns
  • Add comments for complex logic
  • Update README if adding features

Testing

Before submitting PR:

  • Run npm run compile successfully
  • Test your changes in Extension Host (F5)
  • Verify no console errors

Questions?

Open an issue or join our discussions!