Add njsscan workflow for Node.js security scanning - #283
Add njsscan workflow for Node.js security scanning#283drdave-flexnetos wants to merge 4 commits into
Conversation
This workflow integrates njsscan with GitHub's Code Scanning feature to identify insecure code patterns in Node.js applications.
There was a problem hiding this comment.
Pull request overview
This PR adds a new GitHub Actions workflow to integrate njsscan, a static security code scanner for Node.js applications, with GitHub's Code Scanning feature. The workflow runs on pushes to main, pull requests, and on a weekly schedule to continuously monitor for insecure code patterns in the project's Node.js components.
Key Changes:
- Adds automated Node.js security scanning with njsscan
- Integrates scan results with GitHub Security tab via SARIF format
- Schedules weekly security scans on Mondays at 16:40 UTC
| # documentation. | ||
|
|
||
| # This workflow integrates njsscan with GitHub's Code Scanning feature | ||
| # nodejsscan is a static security code scanner that finds insecure code patterns in your Node.js applications |
There was a problem hiding this comment.
Inconsistent naming: "nodejsscan" should be "njsscan" to match the workflow name and action being used.
| # nodejsscan is a static security code scanner that finds insecure code patterns in your Node.js applications | |
| # njsscan is a static security code scanner that finds insecure code patterns in your Node.js applications |
| id: njsscan | ||
| uses: ajinabraham/njsscan-action@7237412fdd36af517e2745077cedbf9d6900d711 | ||
| with: | ||
| args: '. --sarif --output results.sarif || true' |
There was a problem hiding this comment.
The || true pattern will cause the scan to always succeed even when vulnerabilities are found or errors occur. This means the workflow will never fail, potentially hiding security issues. Consider removing || true to allow the workflow to fail when issues are detected, or implement conditional logic to handle failures appropriately while still uploading results.
| args: '. --sarif --output results.sarif || true' | |
| args: '. --sarif --output results.sarif' |
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
This workflow integrates njsscan with GitHub's Code Scanning feature to identify insecure code patterns in Node.js applications.