Skip to content

feat: Add Bundle Audit and Brakeman security checks#2738

Open
OlegPhenomenon wants to merge 8 commits into
masterfrom
addded-brakeman-and-bundle-audit-to-ci-cd
Open

feat: Add Bundle Audit and Brakeman security checks#2738
OlegPhenomenon wants to merge 8 commits into
masterfrom
addded-brakeman-and-bundle-audit-to-ci-cd

Conversation

@OlegPhenomenon

Copy link
Copy Markdown
Contributor
  • Add bundle-audit and brakeman gems for security analysis
  • Configure new GitHub Actions jobs for automated security checks
    • bundle_audit to check dependencies for known vulnerabilities
    • brakeman for static security code analysis

- Add bundle-audit and brakeman gems for security analysis
- Configure new GitHub Actions jobs for automated security checks
  - bundle_audit to check dependencies for known vulnerabilities
  - brakeman for static security code analysis
- Update Ruby version from 3.0.3 to 3.1.3
- Update Dockerfile to use ruby:3.1-bullseye base image
- Update jquery-ui-rails to 7.0.0 to fix security vulnerabilities
- Remove unused QT and other dependencies from Dockerfile
- Update Chrome version to 133.0.6943.53
- Add security ignore patterns for bootstrap-sass
- Remove debug puts statement from OrgRegistrantPhoneCheckerJob
- Update various gem dependencies

Note: bootstrap-sass vulnerabilities are temporarily ignored as the gem
is no longer maintained and 3.4.1 is the latest version available.
@OlegPhenomenon OlegPhenomenon force-pushed the addded-brakeman-and-bundle-audit-to-ci-cd branch from f5dfbec to 7f672d2 Compare February 12, 2025 13:25
- Use Arel for SQL queries to prevent SQL injection
- Add parameterized queries for better security
- Improve domain name validation with safer regexp handling
- Add proper file path validation for XML console
- Refactor date handling in controllers
- Move brakeman ignore config to standard location

Security improvements:
- Use exec_query with bind parameters instead of string interpolation
- Add safe file path validation for XML templates
- Use Regexp.union for safer domain name validation
- Add proper file type validation for CSV uploads

Code quality:
- Extract date parsing logic to separate methods
- Use Arel for cleaner SQL queries
- Add proper error handling
- Improve code readability and maintainability
- Add OpenSSL require statement
- Create mock PKCS12 object with test key and certificate
- Wrap rake task execution in stub block to properly mock OpenSSL::PKCS12.new
- Fix test_output to use capture_io for proper output testing
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