1.2.0 • Published 5 months ago

sast-scan v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

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;

Note: you can refer dev.to Article for more informatation

1.2.0

5 months ago

1.1.1

8 months ago

1.1.0

9 months ago

1.0.18

9 months ago

1.0.17

9 months ago

1.0.16

9 months ago

1.0.15

9 months ago

1.0.14

9 months ago

1.0.13

9 months ago

1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago