Skip to content

ci: run unit tests, code style and trivy on the 2.3.x line - #367

Open
oc-tmueller wants to merge 1 commit into
release-2.3.4from
ci/oc10-workflows
Open

ci: run unit tests, code style and trivy on the 2.3.x line#367
oc-tmueller wants to merge 1 commit into
release-2.3.4from
ci/oc10-workflows

Conversation

@oc-tmueller

Copy link
Copy Markdown
Contributor

Why

release-2.3.4 carries only .github/workflows/release.yml (added in #362 so the branch could be tagged) plus the dead .drone.star. Anything landing here - including the security backport in the follow-up PR of this stack - merges with no test evidence at all.

What

Ports the master workflows, adjusted for this branch:

file delta vs master
main.yml PHP_VERSIONS: '["7.4"]', new CORE_REF: '10.16' passed as both core-ref and core-ref-php74 (the reusable workflows ignore core-ref on 7.4), push trigger on release-2.3.4
security-scan.yml php-version: '7.4' so the scanned tree is built with 7.4
lint-pr-title.yml verbatim copy

Same shape as the equivalent port on owncloud/oauth2 release-0.6 (owncloud/oauth2#391).

Omitted on purpose, both documented in a comment in main.yml:

  • build - build.yml has no php-version input, so it would run make dist on the runner default php. release.yml already builds the tarball on tag, which is how v2.3.4 shipped its openidconnect.tar.gz.
  • acceptance - the reusable acceptance workflow installs a hardcoded owncloud-daily-master-qa.tar.bz2 (11.x) with the owncloudci/core:php83 image, and an app declaring max-version="10" cannot be enabled on that server.

No production code is touched. Makefile, phpunit.xml, phpstan.neon, .phan and .php-cs-fixer.dist.php all already exist on this branch, so every target the reusable workflows invoke is present.

Heads-up on the new gates

This is the first time these checks run on the 2.3 line, so they may flag pre-existing state rather than anything this PR introduces:

  • vendor-bin/owncloud-codestyle/composer.json pins owncloud/coding-standard: ^4.1 here vs ^5.3 on master.
  • unlike master, this branch vendors phpseclib instead of provide-ing it, so trivy scans a different tree.

If either comes back red on code this PR does not touch, that gets its own issue - it should not widen the security backport that follows.

Stack

  1. this PR - CI
  2. fix: backport of fix: verify token audience to prevent cross-client account takeover #356 and fix: verify token audience for introspected opaque tokens #365 (the audience checks) to the 10.x line
  3. chore: bump to 2.3.5

Tests

Green CI on this PR is the test.

The 2.3 line only had release.yml, so anything landing on release-2.3.4 -
including security backports - merged with no test evidence at all. The
drone pipeline this branch still carries is dead.

Port the master workflows, adjusted for the branch:

- main.yml runs semantic-git-messages, php-codestyle and php-unit against
  php 7.4 and core 10.16. Both core-ref and core-ref-php74 have to be set,
  because the reusable workflows ignore core-ref on 7.4.
- security-scan.yml builds the tree to scan with php 7.4.
- lint-pr-title.yml is a verbatim copy - the repo squash-merges, so the PR
  title becomes the commit message.

No build job: build.yml has no php-version input and would run "make dist"
on the runner default php. release.yml already builds the tarball on tag,
which is how v2.3.4 shipped. No acceptance job either - the reusable
acceptance workflow installs a hardcoded 11.x daily server, which an app
declaring max-version="10" cannot be enabled on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
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