Skip to content

Conversation

lukeina2z
Copy link

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

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

  • CodeQL analysis for Ruby code security scanning with security-extended queries
  • bundler-audit for Ruby dependency vulnerability scanning using RubySec database
  • ruby-audit for comprehensive Ruby security scanning
  • Brakeman for Ruby-specific security analysis and vulnerability detection
  • Semgrep for pattern-based security analysis
  • RuboCop with security extensions for Ruby code quality and security checks
  • Uses commit hashes instead of version tags for supply chain security
  • Runs on PR/push and weekly schedule
  • Ruby 2.7 support matching project requirements

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

  • Scans published RubyGem from RubyGems.org twice daily
  • Downloads and analyzes actual published gem files
  • Detects new vulnerabilities in existing published gems
  • Comprehensive current dependency scanning with multiple tools
  • Generates detailed summary reports with vulnerability counts
  • Tracks gem dependencies and versions

Key Features

  • Comprehensive coverage: source code, dependencies, published RubyGems
  • Ruby-focused: bundler-audit, ruby-audit, Brakeman, Semgrep, RuboCop
  • RubyGems-aware: Gem download and analysis from RubyGems.org
  • Security-focused: commit hashes, proper permissions, categorized results
  • Production-ready: scans actual published gems from RubyGems registry
  • Robust: proper timeouts, error handling, and comprehensive reporting
  • Multi-tool approach: combines 5 different Ruby security scanners
  • Actionable: clear reporting and GitHub Security tab integration

Addresses the critical security gap where aws-xray-sdk-ruby 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.

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

## CodeQL Security Analysis (.github/workflows/codeql-analysis.yml)
- CodeQL analysis for Ruby code security scanning with security-extended queries
- bundler-audit for Ruby dependency vulnerability scanning using RubySec database
- ruby-audit for comprehensive Ruby security scanning
- Brakeman for Ruby-specific security analysis and vulnerability detection
- Semgrep for pattern-based security analysis
- RuboCop with security extensions for Ruby code quality and security checks
- Uses commit hashes instead of version tags for supply chain security
- Runs on PR/push and weekly schedule
- Ruby 2.7 support matching project requirements

## Daily Security Scan (.github/workflows/daily-scan.yml)
- Scans published RubyGem from RubyGems.org twice daily
- Downloads and analyzes actual published gem files
- Detects new vulnerabilities in existing published gems
- Comprehensive current dependency scanning with multiple tools
- Generates detailed summary reports with vulnerability counts
- Tracks gem dependencies and versions

## Key Features
- Comprehensive coverage: source code, dependencies, published RubyGems
- Ruby-focused: bundler-audit, ruby-audit, Brakeman, Semgrep, RuboCop
- RubyGems-aware: Gem download and analysis from RubyGems.org
- Security-focused: commit hashes, proper permissions, categorized results
- Production-ready: scans actual published gems from RubyGems registry
- Robust: proper timeouts, error handling, and comprehensive reporting
- Multi-tool approach: combines 5 different Ruby security scanners
- Actionable: clear reporting and GitHub Security tab integration

Addresses the critical security gap where aws-xray-sdk-ruby had no automated
security scanning despite being critical infrastructure used in production.
@lukeina2z lukeina2z requested a review from a team as a code owner September 24, 2025 02:26
@github-advanced-security
Copy link

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 Ruby SDK Add comprehensive security scanning workflows for Ruby SDK Sep 24, 2025
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.

1 participant