Skip to content

Frontend build#75

Closed
berfinyuksel wants to merge 6 commits into2026.xfrom
frontend-build
Closed

Frontend build#75
berfinyuksel wants to merge 6 commits into2026.xfrom
frontend-build

Conversation

@berfinyuksel
Copy link
Contributor

Changes in this pull request

Resolves #

Additional info

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@berfinyuksel
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@bluvulture
Copy link
Contributor

recheck

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces a new GitHub Actions workflow for building the Studio frontend via a reusable workflow, and adjusts the static analysis workflow’s PHPStan matrix selection logic to support multiple PHP versions.

Changes:

  • Added a new Studio frontend build workflow that delegates to pimcore/workflows-collection-public reusable workflow.
  • Added a backup (.bak) version of the previous Studio frontend build workflow definition.
  • Updated static analysis matrix filtering to include configurations for multiple PHP versions parsed from composer.json.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/studio-frontend-build.yaml.bak Adds a backup copy of the prior Studio frontend build workflow definition.
.github/workflows/new-studio-frontend-build.yaml New workflow calling a reusable Studio frontend build workflow and requesting write permissions.
.github/workflows/new-static-analysis.yaml Updates PHPStan matrix filtering to match multiple PHP versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

push:
paths:
- "assets/studio/**"
pull_request_target:
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

Using pull_request_target here can be dangerous if the reusable workflow checks out and executes code from the PR branch (e.g., npm install/npm run build), because it runs in the base-repo context. Consider switching to pull_request (read-only) or adding explicit safeguards (e.g., only run for same-repo PRs / trusted actors, require approval/label gating) to avoid exposing a write-scoped token to untrusted code.

Suggested change
pull_request_target:
pull_request:

Copilot uses AI. Check for mistakes.
with:
build-output-path: "./src/Resources/public/studio/"
permissions:
contents: write
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

permissions: contents: write in a workflow that can run on PRs (especially with pull_request_target) grants write access to the repository. If the intent is only to upload artifacts, consider reducing permissions; if the intent is to commit build output, consider restricting execution to trusted contexts to prevent abuse.

Suggested change
contents: write
contents: read

Copilot uses AI. Check for mistakes.

jobs:
studio-frontend-build:
uses: pimcore/workflows-collection-public/.github/workflows/reusable-studio-frontend-build.yaml@main
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The reusable workflow is referenced by the moving @main ref. To make builds reproducible and reduce supply-chain risk, pin this to an immutable tag or commit SHA (or at least a dedicated release branch) as is done in other workflows (e.g., @v1.3.0, @reusable-workflows).

Suggested change
uses: pimcore/workflows-collection-public/.github/workflows/reusable-studio-frontend-build.yaml@main
uses: pimcore/workflows-collection-public/.github/workflows/reusable-studio-frontend-build.yaml@v1.3.0

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants