Skip to content

Add njsscan workflow for Node.js security scanning - #283

Open
drdave-flexnetos wants to merge 4 commits into
mainfrom
FlexNetOS-patch-2-2
Open

Add njsscan workflow for Node.js security scanning#283
drdave-flexnetos wants to merge 4 commits into
mainfrom
FlexNetOS-patch-2-2

Conversation

@drdave-flexnetos

Copy link
Copy Markdown
Owner

This workflow integrates njsscan with GitHub's Code Scanning feature to identify insecure code patterns in Node.js applications.

This workflow integrates njsscan with GitHub's Code Scanning feature to identify insecure code patterns in Node.js applications.
Copilot AI review requested due to automatic review settings December 6, 2025 00:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot AI Dec 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent naming: "nodejsscan" should be "njsscan" to match the workflow name and action being used.

Suggested change
# 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

Copilot uses AI. Check for mistakes.
id: njsscan
uses: ajinabraham/njsscan-action@7237412fdd36af517e2745077cedbf9d6900d711
with:
args: '. --sarif --output results.sarif || true'

Copilot AI Dec 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
args: '. --sarif --output results.sarif || true'
args: '. --sarif --output results.sarif'

Copilot uses AI. Check for mistakes.
@github-advanced-security

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants