Skip to content

[feature] PHP security scanning#13

Merged
orangit-sami-bister merged 5 commits into
mainfrom
feature/php-security-scanning
Apr 28, 2026
Merged

[feature] PHP security scanning#13
orangit-sami-bister merged 5 commits into
mainfrom
feature/php-security-scanning

Conversation

@spexii
Copy link
Copy Markdown
Contributor

@spexii spexii commented Apr 28, 2026

Description

Adds PHP / Symfony security scanning support to platform-tooling, bringing PHP to parity with the existing Node and Python security scanning coverage.

New composite actions:

  • composer-audit — scans composer.lock for known CVEs using composer audit (built-in to Composer ≥ 2.4)
  • guarddog-php-scan — supply-chain threat detection for Packagist packages using guarddog packagist verify (marked experimental — less tested than npm/PyPI equivalents)

New reusable workflows:

  • php-security-scan — runs gitleaks + composer-audit + guarddog-php-scan in parallel
  • php-vulnerability-scan — runs Syft + Grype against source code and optionally the Docker image (reuses existing shared actions)

No existing files were modified. All tool installations follow the no-marketplace-actions policy — tools are installed via run: shell steps only.

Remaining PHP CI pieces (lint, test, ci, daily) are out of scope for this PR and will be planned separately.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation update
  • CI/CD or tooling change

How has this been tested?

No testing has been performed yet. actionlint will validate workflow YAML structure automatically when this PR is opened. End-to-end testing requires a PHP project with composer.lock and will be done after merge by wiring the workflows into a real PHP project.

  • Unit tests
  • Integration tests
  • Manual testing

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added/updated tests that prove my fix or feature works
  • I have updated the documentation accordingly
  • My changes do not introduce new warnings or errors
  • Any dependent changes have been merged and published

Screenshots / recordings (if applicable)

N/A

Additional context

  • guarddog Packagist support is experimental. The action carries a visible warning and fail-on-findings defaults to true but consuming teams are advised to start with false until results are verified against their own projects.
  • After merge, all # pt-sha references across all workflow files must be updated to the new merge commit SHA using the bump script in the README.

Copy link
Copy Markdown
Contributor

@orangit-sami-bister orangit-sami-bister left a comment

Choose a reason for hiding this comment

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

Two minor incnsistence to npm equal. They may be ok. Just making sure.that this is intended

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All others have the severity threshold. Should this have also. It maybe impossible to get all minors fixed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Composer (2.8+) has inverted logic for this, it has ignore-severity instead of setting the lowest level to target. Added this ignore-severity input to composer-audit/action.yml and threaded it through php-security-scan.yml. Bumped the minimum Composer version check from 2.4 to 2.8 accordingly. ubuntu-latest ships 2.8+ so no practical impact for consumers.

@@ -0,0 +1,83 @@
# PHP Security Scan
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

node-security-scan.yml passes audit-level through; php-security-scan.yml does not expose an equivalent — consistent with above, but worth noting for consumers expecting parity.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in the same commit: php-security-scan.yml now has an ignore-severity workflow input that passes straight through to the composer-audit action, mirroring how audit-level works in node-security-scan.yml.

…rity-scan workflow

- Bump minimum Composer version requirement from 2.4 to 2.8
  (--ignore-severity was added in Composer 2.8.0, Oct 2024)
- Add ignore-severity input: space-separated list of severity levels
  to suppress (low/medium/high/critical); builds repeated --ignore-severity
  flags as required by the Composer CLI
- Thread ignore-severity input through php-security-scan.yml for
  parity with node-security-scan.yml audit-level input
Copy link
Copy Markdown

@SamiBister SamiBister left a comment

Choose a reason for hiding this comment

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

This is now align with other

Copy link
Copy Markdown
Contributor

@orangit-sami-bister orangit-sami-bister left a comment

Choose a reason for hiding this comment

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

This aligns with node euqals

@orangit-sami-bister orangit-sami-bister merged commit f877740 into main Apr 28, 2026
2 checks passed
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.

3 participants