fix(ci): build site before capturing visual baselines#185
Merged
Conversation
The capture step ran 'playwright test --update-snapshots' directly. In CI the Playwright webServer is 'npm run preview:static' (serves prebuilt dist/) with no build, so it served nothing and timed out after 240s. test.yml's playwright jobs build first; mirror that here.
There was a problem hiding this comment.
Security review
Result: No high-confidence vulnerabilities found.
This PR adds a single CI step (npm run build) to .github/workflows/visual-baselines.yml before Playwright captures visual baselines. The change aligns that workflow with the existing playwright-visual job in test.yml.
Scope reviewed
| Area | Assessment |
|---|---|
| Injection (command, path, template) | None. The added step is a static npm run build invocation with no user-controlled inputs. |
| Authn / authz | Unchanged. Workflow remains workflow_dispatch-only; trigger permissions are unchanged. |
| Secrets / logging | Unchanged. No new secrets, tokens, or log output. |
| SSRF / XSS / deserialization | Not applicable. No runtime application code or network-facing logic changed. |
| Supply chain | Unchanged. No new dependencies or third-party actions introduced. |
Context
In CI, Playwright's webServer runs npm run preview:static (serves prebuilt dist/) and does not build. Without an explicit build step, the preview server had no artifacts to serve. Adding npm run build fixes that operational gap and matches the pattern already used in test.yml.
Pre-existing notes (not introduced by this PR)
- The workflow already grants
contents: writeandpull-requests: writeand usespeter-evans/create-pull-request@v8to open baseline-refresh PRs. That is intentional for this automation; only users who can manually dispatch workflows can trigger it. - Anyone with
workflow_dispatchpermission can regenerate committed snapshot PNGs. That is a process/integrity consideration, not a new exposure from this diff.
No remediation required for security purposes.
Sent by Cursor Automation: Find vulnerabilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Problem
The
Refresh visual baselinesworkflow failed at Capture baselines with: