mohammed_elghanam_hawkeye
v1.0.11
Published
**By Mohammed Elghanam**
Readme
🛡️ Hawkeye - JavaScript/Node.js Security Analyzer
By Mohammed Elghanam
A lightweight CLI tool to detect security vulnerabilities, bad practices, and code smells in JavaScript/Node.js projects.
📌 Table of Contents
✨ Features
- 🔍 Security Scans: Detect
eval(), unsafe regex, and other vulnerabilities. - 📊 Interactive Dashboard: Visualize results with severity levels.
- ⚙️ Custom Rules: Toggle rules via
hawkeye.config.json. - 🚦 CI/CD Ready: Integrates with GitHub Actions, Travis CI.
🚀 Installation
```bash
npm install -D mohammed_elghanam_hawkeye
# or
yarn add -D mohammed_elghanam_hawkeye⚡ Usage
npx hawkeye init # Initialize the project
npx hawkeye analyze # Analyze the code for issues
npx hawkeye dashboard # Open the dashboard to view results🔧 Configuration
You can configure Hawkeye behavior by editing the hawkeye.config.json file.
This file allows you to control what parts of your code are scanned and which rules to activate.🔍 Fields:
{
"projectName": "my-project",
"include": ["src", "lib"],
"exclude": ["node_modules", "test"],
"rules": {
"noEval": true,
"noConsoleLog": true,
"noFunctionConstructor": true,
"noInnerHTML": true,
"noDocumentWrite": true,
"noSetTimeoutString": true,
"noSetIntervalString": true,
"noUnguardedStorage": true,
"noGlobalVar": true,
"noEmptyCatch": true
}
}🎯 Why this configuration?
This file gives developers full control over the analysis process. For example, if you're only interested in detecting eval() usage and don't want to test for console.log, you can set:
"rules": {
"noEval": true,
"noConsoleLog": false
}🤝 Contributing
Fork the repository
Create feature branch (git checkout -b feat/amazing-feature)
Commit changes (git commit -m 'Add amazing feature')
Push to branch (git push origin feat/amazing-feature)
Open Pull Request
See our Contribution Guide for details.📜 License
MIT © 2025 Mohammed Elghanam✉️ Contact
GitHub: https://github.com/MohammedElghanam
Email: [email protected]
Project Link: https://github.com/MohammedElghanam/MOHAMMED_ELGHANAM_HAWKEYE