Skip to content

Conversation

lukeina2z
Copy link

@lukeina2z lukeina2z commented Sep 23, 2025

This commit implements complete security scanning for aws-xray-sdk-node:

CodeQL Security Analysis (.github/workflows/codeql-analysis.yml)

  • CodeQL analysis for JavaScript/TypeScript code security scanning with security-extended queries
  • npm audit for comprehensive dependency vulnerability scanning
  • Retire.js for detecting vulnerable JavaScript libraries
  • Snyk integration for advanced vulnerability detection (requires SNYK_TOKEN secret)
  • ESLint security plugin for static code analysis
  • Semgrep for additional security pattern detection
  • Runs on PR/push and weekly schedule
  • Proper Lerna monorepo support with package-level scanning

Daily Security Scan (.github/workflows/daily-scan.yml)

  • Scans published NPM packages twice daily
  • Monitors all major packages: core, express, mysql, postgres, restify, main
  • Downloads and analyzes actual published packages from npm registry
  • Detects new vulnerabilities in existing published packages
  • Focuses on actionable security findings
  • Generates detailed summary reports with vulnerability counts
  • Comprehensive current dependency scanning with multiple tools

Key Features

  • Comprehensive coverage: source code, dependencies, published npm packages
  • Node.js-focused: npm audit, Retire.js, Snyk, ESLint security, Semgrep
  • Monorepo support: Lerna-aware scanning of all packages
  • Security-focused: commit hashes, proper permissions, categorized results
  • Production-ready: scans actual published packages from npm registry
  • Robust: proper timeouts, error handling, and caching
  • Multi-tool approach: combines multiple security scanners for comprehensive coverage
  • Actionable: clear reporting and GitHub Security tab integration

Addresses the critical security gap where aws-xray-sdk-node had no automated security scanning despite being critical infrastructure used in production.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lukeina2z lukeina2z requested a review from a team as a code owner September 23, 2025 21:27
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.31%. Comparing base (0963c1a) to head (728a653).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #724   +/-   ##
=======================================
  Coverage   84.31%   84.31%           
=======================================
  Files          36       36           
  Lines        1817     1817           
=======================================
  Hits         1532     1532           
  Misses        285      285           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-advanced-security
Copy link
Contributor

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.

@lukeina2z lukeina2z changed the title [WIP] Add comprehensive security scanning workflows for Node.js Add comprehensive security scanning workflows for Node.js Sep 23, 2025
This commit implements complete security scanning for aws-xray-sdk-node:

- CodeQL analysis for JavaScript/TypeScript code security scanning with security-extended queries
- npm audit for comprehensive dependency vulnerability scanning
- Retire.js for detecting vulnerable JavaScript libraries
- Snyk integration for advanced vulnerability detection (requires SNYK_TOKEN secret)
- ESLint security plugin for static code analysis
- Semgrep for additional security pattern detection
- Runs on PR/push and weekly schedule
- Proper Lerna monorepo support with package-level scanning

- Scans published NPM packages twice daily
- Monitors all major packages: core, express, mysql, postgres, restify, main
- Downloads and analyzes actual published packages from npm registry
- Detects new vulnerabilities in existing published packages
- Focuses on actionable security findings
- Generates detailed summary reports with vulnerability counts
- Comprehensive current dependency scanning with multiple tools

- Comprehensive coverage: source code, dependencies, published npm packages
- Node.js-focused: npm audit, Retire.js, Snyk, ESLint security, Semgrep
- Monorepo support: Lerna-aware scanning of all packages
- Security-focused: commit hashes, proper permissions, categorized results
- Production-ready: scans actual published packages from npm registry
- Robust: proper timeouts, error handling, and caching
- Multi-tool approach: combines multiple security scanners for comprehensive coverage
- Actionable: clear reporting and GitHub Security tab integration

Addresses the critical security gap where aws-xray-sdk-node had no automated
security scanning despite being critical infrastructure used in production.
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.

2 participants