Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.3']
php: ['8.1', '8.3', '8.5']
steps:
- uses: actions/checkout@v7
with:
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Start disposable WordPress and MariaDB
run: |
docker compose -p soca-ci up -d db wordpress
for attempt in $(seq 1 30); do
for _attempt in $(seq 1 30); do
if docker compose -p soca-ci exec -T wordpress test -f /var/www/html/wp-includes/version.php; then exit 0; fi
sleep 2
done
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/php-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
composer validate --strict
docker run --rm -v "$PWD:/app" -w /app/tools/security soca-security-php \
composer install --no-interaction --prefer-dist --no-progress
docker run --rm --network none -v "$PWD:/app:ro" -w /app/tools/security soca-security-php \
composer check-platform-reqs
- name: Verify detection fixtures and scan PHP without network access
run: |
docker run --rm --network none -v "$PWD:/app:ro" -w /app soca-security-php \
Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ docker run --rm --network none -v "$PWD:/src:ro" -w /src soca-security-semgrep \
sh tools/security/run.sh semgrep
```

Podman works with the same commands. PHP tooling uses PHP 8.3; Psalm analyzes the plugin against its PHP 8.1 minimum. Development tools have their own Composer manifest and lockfile under `tools/security`; they do not change the root runtime dependency inventory or the plugin's private dependency loader. Dependabot tracks these Composer packages and scanner container images. To update PHP scanner dependencies deliberately, run `composer update` in that directory using the PHP scanner container, then rerun all three checks.
Podman works with the same commands. PHP tooling uses PHP 8.5 with Psalm 6.20 or newer; Psalm analyzes the plugin against its PHP 8.1 minimum. Protocol and syntax CI covers PHP 8.1, 8.3, and 8.5. The official PHP CLI image already enables the scanner extensions; the Dockerfile installs only Git and unzip rather than rebuilding bundled extensions. Development tools have their own Composer manifest and lockfile under `tools/security`; they do not change the root runtime dependency inventory or the plugin's private dependency loader. Composer's tooling platform is set to PHP 8.5.0, and CI checks the actual runtime and extensions with `composer check-platform-reqs`. Dependabot tracks these Composer packages and scanner container images. To update PHP scanner dependencies deliberately, run `composer update` in that directory using the PHP scanner container, then rerun all three checks.

The checks cover complementary cases:

Expand Down
7 changes: 5 additions & 2 deletions tools/security/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker.io/library/composer:2 AS composer
FROM docker.io/library/php:8.3-cli-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends git unzip libonig-dev libxml2-dev libcurl4-openssl-dev && docker-php-ext-install -j2 mbstring dom simplexml xml xmlwriter curl && rm -rf /var/lib/apt/lists/*
FROM docker.io/library/php:8.5-cli-bookworm
# The official CLI image already enables every extension the scanners need.
RUN apt-get update \
&& apt-get install -y --no-install-recommends git unzip \
&& rm -rf /var/lib/apt/lists/*
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
WORKDIR /app
6 changes: 3 additions & 3 deletions tools/security/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
}
},
"require": {
"php": "^8.3",
"php": "^8.5",
"humanmade/psalm-plugin-wordpress": "^3.1",
"vimeo/psalm": "^6.0",
"vimeo/psalm": "^6.20",
"wp-coding-standards/wpcs": "^3.0"
},
"config": {
Expand All @@ -19,7 +19,7 @@
},
"sort-packages": true,
"platform": {
"php": "8.3.0"
"php": "8.5.0"
}
}
}
Loading
Loading