1.0.2 • Published 8 months ago

guardrail-js v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago
  _____ _    _          _____  _____  _____          _____ _      
 / ____| |  | |   /\   |  __ \|  __ \|  __ \   /\   |_   _| |     
| |  __| |  | |  /  \  | |__) | |  | | |__) | /  \    | | | |     
| | |_ | |  | | / /\ \ |  _  /| |  | |  _  / / /\ \   | | | |     
| |__| | |__| |/ ____ \| | \ \| |__| | | \ \/ ____ \ _| |_| |____ 
 \_____|\____//_/    \_\_|  \_\_____/|_|  \_\_/    \_\_____|______|

šŸ›”ļø GuardRail.js

Your intelligent security co-pilot for Node.js applications

npm version License: MIT

🌟 Why GuardRail.js?

Think of GuardRail.js as your personal security guard, working 24/7 to protect your Node.js applications from vulnerabilities, attacks, and common security oversights. Just as a physical guardrail prevents vehicles from going off course, GuardRail.js keeps your application safely on track.

✨ Features

šŸ” Real-time Protection

  • SQL Injection Shield - Advanced protection against database attacks
  • XSS Guardian - Comprehensive Cross-Site Scripting prevention
  • CSRF Barrier - Robust Cross-Site Request Forgery protection

šŸš€ Automated Security

  • CI/CD Integration - Seamless GitHub Actions workflow
  • Dependency Scanning - Real-time vulnerability checking
  • Security Reports - Detailed, actionable insights

šŸ› ļø Developer Experience

  • Easy Setup - Get started in minutes
  • Clear Documentation - Comprehensive guides and examples
  • Active Community - Regular updates and support

šŸƒā€ā™‚ļø Quick Start

# Install GuardRail.js
npm install guardrail-js

# Initialize security pipeline
npx guardrail init

# Run security checks
npm run security:scan

šŸŽÆ Usage

const guardrail = require('guardrail-js');

// Initialize protection
guardrail.init({
  app: expressApp,
  level: 'strict',
  reporting: true
});

// Run security scan
const results = await guardrail.scan();

šŸ—ļø Project Architecture

guardrail-js/
ā”œā”€ā”€ .github/                     # GitHub specific configurations
│   ā”œā”€ā”€ workflows/               # GitHub Actions workflows
│   │   └── security.yml         # Main security pipeline
│   └── dependabot.yml           # Dependency update configuration
│
ā”œā”€ā”€ config/   
│   └── security.js   
│
ā”œā”€ā”€ security-tests/              # Security testing suite
│   ā”œā”€ā”€ sql-injection.js         # SQL injection prevention tests
│   └── xss.js                   # XSS prevention tests
│
ā”œā”€ā”€ scripts/                      # Utility scripts
│   └── generate-security-report.js  # Security report generator
│
ā”œā”€ā”€ reports/                     # Generated reports directory
│   └── security-report.md       # Latest security scan report
│
ā”œā”€ā”€ src/                         # Source code
│   ā”œā”€ā”€ middleware.js            
│   ā”œā”€ā”€ headers.js  
│   ā”œā”€ā”€ monitoring.js              
│   └── index.js                 # Main entry point
│
ā”œā”€ā”€ .eslintrc-security.json      # Security-focused ESLint rules
ā”œā”€ā”€ package.json                 # Project dependencies and scripts
└── README.md                    # Project documentation

šŸ”„ Pipeline Flow

šŸ› ļø Technical Stack

šŸ“Š Security Dashboard

$ npm run security:report

šŸ›”ļø GuardRail.js Security Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
āœ… Dependencies: All Clear
āœ… Security Tests: 24/24 Passed
āœ… Code Analysis: No Vulnerabilities

šŸ¤ Contributing

We believe in the power of community! Here's how you can contribute:

  1. šŸ“ Fork the repository
  2. 🌿 Create your feature branch (git checkout -b feature/AmazingFeature)
  3. šŸ’¾ Commit your changes (git commit -m 'Add some AmazingFeature')
  4. šŸ“¤ Push to the branch (git push origin feature/AmazingFeature)
  5. šŸŽ Open a Pull Request

šŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

šŸ‘¤ Author

MEHDI BAFDIL

šŸ¤ Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

⭐ Show your support

Give a ā­ļø if this project helped you!

šŸ“ Note

Make sure to properly configure your machine learning model and vectorizer files before deployment.

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago