This security scanning tool provides comprehensive security analysis for web applications, with support for scanning projects and generating detailed reports on potential vulnerabilities.
The tool supports scanning any directory path with comprehensive security checks based on OWASP and NIST guidelines.
./security-scan.sh -p /path/to/your/project
-p, --path PATH - Specify the project directory to scan-o, --output PATH - Output directory for results-h, --help - Show help messageRequires the following tools to be installed:
The tool performs the following security checks:
The tool generates detailed reports in JSON format for all scan results, including:
The tool generates a comprehensive report in the output directory with severity scoring based on industry standards (CVSS).
The tool also supports:
| Tool | Scan Performed | Description |
|---|---|---|
| Gitleaks | Secrets Detection | Scans for hardcoded secrets in source code |
| Trivy FS | File System Scanning | Scans for vulnerabilities in project dependencies and OS packages |
| Trivy Config | Misconfiguration Detection | Scans for security misconfigurations |
| Semgrep (JWT) | JWT and Secrets | Scans for JWT handling issues and hardcoded secrets |
| Semgrep (Node.js) | Input Validation | Checks for Node.js best practices and OWASP Top 10 |
| Semgrep (SQL Injection) | Injection Detection | Scans for SQL/NoSQL injection vulnerabilities |
| Semgrep (Additional) | Command Injection and Path Traversal | Additional security checks for command injection and path traversal |
| Trivy Image | Container Scanning | Scans Docker images for vulnerabilities |
| NPM Audit | Dependency Scanning | Scans NPM packages for known vulnerabilities |
| Checkov | Infrastructure as Code Scanning | Scans for misconfigurations in infrastructure code |
| NodeJSScan | Static Analysis | Static analysis for Node.js applications |
| Bearer | Data Flow Analysis | Scans for data flow issues and privacy concerns |
| Knip | Dead Code Detection | Detects unused code and dependencies |
| Semgrep (Business Logic) | Business Logic Flaws | Checks for business logic and security misconfigurations |
To upload scan results to DefectDojo, use the upload-to-dojo.sh script:
./upload-to-dojo.sh -o /path/to/output/directory -e ENGAGEMENT_ID
-o, --output-dir PATH - Path to the output directory with scan results-e, --engagement ID - DefectDojo Engagement ID-v, --verbose - Enable verbose output to show skipped files and successful uploads-h, --help - Show help messageThe script will upload all available scan results to DefectDojo, including:
When using the verbose flag (-v), the script will show detailed information about:
This tool is provided under the MIT License.