Skip to content

ci: add security scanner to PR builder for NPM audit log #153

@NipuniBhagya

Description

@NipuniBhagya

Current Limitation

Currently, there is no automated security scanning integrated into the PR builder workflow to audit dependencies for vulnerabilities using npm audit. This leads to:

  • Potential introduction of vulnerable dependencies into the codebase
  • Lack of visibility into security risks before merging PRs
  • Manual effort required to check audit results for each PR
  • Delayed detection of critical/high vulnerabilities
  • Inconsistent adoption of security best practices across contributors

Without automated security scanning, the codebase may contain:

  • Outdated or vulnerable npm packages
  • Security issues that could be caught earlier in the development lifecycle
  • Lack of transparency for reviewers and contributors regarding dependency health

Suggested Improvement

Integrate an automated security scanner into the PR builder workflow to run npm audit for every pull request. The scanner should generate an audit log as a build artifact or post a summary to the PR.

Implementation Plan

  1. Update the CI/CD workflow (GitHub Actions) to run npm audit on all PRs.
  2. Store the audit results as an artifact or comment a summary on the PR.
  3. Configure the workflow to fail the build if critical/high vulnerabilities are detected, or warn as per project policy.
  4. Document the new workflow in the repository's CONTRIBUTING.md or CI documentation.

References:

Please select the package issue is related to

@asgardeo/javascript, @asgardeo/browser, @asgardeo/nextjs, @asgardeo/react, @asgardeo/vue

Version

Current

Reporter Checklist

  • I have searched the existing issues and this is not a duplicate.
  • I have provided all the necessary information.
  • I have verified the improvement is not available in the latest version of the package.

Metadata

Metadata

Assignees

Labels

@asgardeo/browserIssues related to the browser wrapper of the Asgardeo JavaScript SDK@asgardeo/javascriptIssues related to the core of the Asgardeo JavaScript SDKs@asgardeo/nextjsIssues related to the `Next.js` wrapper of Asgardeo JavaScript SDK@asgardeo/nodeIssues related to the `Node.js` runtime wrapper of Asgardeo JavaScript SDK@asgardeo/reactIssues related to the `React.js` wrapper of Asgardeo JavaScript SDKComplexity/LowIssues with the implementation complexity flagged as `Low`Credits/20HacktoberfestOpen for Hacktoberfest contributors.Type/ImprovementciIssues related to configuring continuous integrationgood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions