Skip to content

Add security workflow and improve PHP 8 compatibility - #1673

Open
Emavero wants to merge 9 commits into
opendcim:masterfrom
Emavero:mynewfeature-patch
Open

Add security workflow and improve PHP 8 compatibility#1673
Emavero wants to merge 9 commits into
opendcim:masterfrom
Emavero:mynewfeature-patch

Conversation

@Emavero

@Emavero Emavero commented Aug 22, 2026

Copy link
Copy Markdown

Summary

This PR introduces a GitHub Actions workflow to automate security and PHP validation checks while also addressing a legacy PHP compatibility issue.

Changes

CI/CD Workflow

Added a new GitHub Actions workflow that runs automatically on pushes and pull requests targeting the master branch.

The workflow includes:

  • Secret detection using Gitleaks
  • Static Application Security Testing (SAST) using Semgrep
  • Vulnerability scanning using Trivy
  • Composer configuration validation
  • Composer dependency installation verification
  • Software Bill of Materials (SBOM) generation

PHP 8 Compatibility

  • Removed the legacy array_combine() compatibility implementation from vmware.inc.php
  • Fixed a fatal error caused by redeclaring a native PHP function on modern PHP versions

Semgrep Improvements

  • Excluded bundled Swagger UI assets from Semgrep scanning to avoid false positives generated by third-party code

Benefits

  • Improves repository security through automated scanning
  • Detects exposed secrets before merge
  • Identifies potential vulnerabilities in source code and dependencies
  • Verifies Composer configuration and dependency installation
  • Improves compatibility with modern PHP versions
  • Establishes a foundation for future CI/CD improvements

Notes

PHP syntax linting is currently disabled due to compatibility issues in several legacy files already present in the repository. The workflow still validates Composer configuration, verifies dependency installation, performs security scanning, and generates an SBOM.

Testing

The workflow was validated successfully on a feature branch:

  • Gitleaks scan completed successfully
  • Semgrep scan completed successfully after excluding third-party Swagger UI assets
  • Trivy scan completed successfully
  • Composer validation completed successfully
  • Composer dependency installation completed successfully
  • SBOM generation completed successfully

@Emavero Emavero left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Image

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