Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

sast-scan

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sast-scan

sast-scan is a lightweight static application security testing (SAST) tool designed for scanning JavaScript files. It helps developers identify and mitigate vulnerabilities in their code by performing a comprehensive security scan, providing an easy-to-us

latest
Source
npmnpm
Version
1.3.1
Version published
Weekly downloads
9
28.57%
Maintainers
2
Weekly downloads
 
Created
Source

📜 SAST-Scan 🔍

Build Status

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]

Keywords

SAST

FAQs

Package last updated on 30 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts