1.2.0 • Published 9 months ago

sast-scan v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
9 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

9 months ago

1.1.1

12 months ago

1.1.0

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago