📜 SAST-Scan 🔍

SAST-Scan is a lightweight, easy-to-use static application security testing (SAST) tool that helps you scan your code for vulnerabilities, providing instant feedback to improve code security! 🚀
Features
1. Comprehensive Code Scanning – Detects a wide range of security vulnerabilities in your source code.
2. Fast and Lightweight – Provides quick, real-time scans without affecting performance.
3. Detailed Vulnerability Reports – Offers clear reports with fixes and line numbers for each vulnerability.
4. Seamless Integration – Easily integrates with JavaScript frameworks like React and Node.js.
5. Continuous Updates – Regularly updated to cover new vulnerabilities and security practices.
Installation
You can install the package via npm:
npm install sast-scan
Import the package:
import scanCode from 'sast-scan';
Integrate the scanner into your project:
jsx:
import React, { useState } from 'react';
import scanCode from 'sast-scan'; // Import your npm package
const CodeScanner = () => {
const [code, setCode] = useState('');
const [results, setResults] = useState([]);
const handleScan = () => {
let vulnerabilities = [];
try {
vulnerabilities = scanCode(code); // Scan the code
} catch (error) {
console.error(`Error scanning code: ${error.message}`);
}
setResults(vulnerabilities);
};
return (
<div>
<h1>Code Scanner</h1>
<textarea
value={code}
onChange={(e) => setCode(e.target.value)}
placeholder="Enter code to scan"
/>
<button onClick={handleScan}>Scan Code</button>
<div>
{results.map((result, index) => (
<div key={index}>
<p> <strong>Vulnerability:</strong> {result.message}</p>
<p> <strong>Fix:</strong> {result.fix}</p>
<p> <strong>Line Number:</strong> {result.lineNumber}</p>
</div>
))}
</div>
</div>
);
};
export default CodeScanner;
Example Output:
• Vulnerability: The vulnerability description
• Fix: Suggested fix
• Line Number: Line number of the issue
Note: you can refer dev.to Article for more informatation
License
MIT License © 2025 [Ankit Chaurasiya]