Conversation
Ref: ED-25578 Co-authored-by: Cursor <cursoragent@cursor.com>
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
Ref: ED-25578 Co-authored-by: Cursor <cursoragent@cursor.com>
Ref: ED-25578 Co-authored-by: Cursor <cursoragent@cursor.com>
Ref: ED-25578 Co-authored-by: Cursor <cursoragent@cursor.com>
Ref: ED-25578 Co-authored-by: Cursor <cursoragent@cursor.com>
Ref: ED-25578 Co-authored-by: Cursor <cursoragent@cursor.com>
Ntnelbaba
left a comment
There was a problem hiding this comment.
Inline notes from review — one per finding. Request changes: is CommonJS under root and will break author/shots parse paths.
|
|
||
| - name: Parse Visual proof section | ||
| shell: bash | ||
| run: node "$GITHUB_ACTION_PATH/parse-section.js" --test |
There was a problem hiding this comment.
This step will fail for the same ESM/CJS reason until the parser is loadable as CJS. Point it at once renamed.
There was a problem hiding this comment.
Done — parse step now runs node "$ACTION_PATH/../visual-proof/parse-section.cjs" --test with ACTION_PATH from env (no expression-interpolated path in the script body).
|
|
||
| parse_visual_proof_section() { | ||
| gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json body --jq .body | node -e ' | ||
| const { shouldCaptureVisualProof, extractBrokenCaption, buildOverlayCaption } = require(process.argv[1]); |
There was a problem hiding this comment.
Duplicate parser + same breakage as . A single shared would fix loading and avoid drift between the two actions.
There was a problem hiding this comment.
Agreed — duplicate parser removed. run.sh now uses the same shared parse-section.cjs.
| log "step=find-comment looking for existing visual-proof-ci marker" | ||
| existing_id=$( | ||
| gh_api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" --paginate \ | ||
| --jq "[.[] | select(.body | contains(\"visual-proof-ci\")) | .id][0] // empty" || true |
There was a problem hiding this comment.
swallows list failures, and matching with (not the full HTML marker) can create a second comment instead of updating. Prefer strict errors + exact marker match.
There was a problem hiding this comment.
Fixed: dropped || true on the list call, and upsert now matches the full <!-- visual-proof-ci --> marker so we update instead of posting a second comment.
|
Clarifying the review event: treating the inline notes as comments, not a formal block. Please still fix the |
…docs - Rename parse-section.js to shared parse-section.cjs (fixes ESM/CJS conflict) - Update all references in author.sh, run.sh, and action.yml test steps - Fix post-comment.sh: remove || true, match full HTML marker for upsert - Document same-repo-only / unsandboxed actor risk in act.sh - Document intentional continue-on-error behavior in author README - Switch all action.yml to use $ACTION_PATH env var (CodeQL-safe pattern) Ref: ED-25578 Addresses review feedback from Ntnelbaba on PR #55 Co-authored-by: Davids Seveloff <davseve@users.noreply.github.com>
Review feedback addressedAll must-fix items from @Ntnelbaba have been resolved: 1. ✅ CJS/ESM conflict fixed
2. ✅ Single shared parser
3. ✅ Strict upsert in post-comment.sh
4. ✅ Security documentation
5. ✅ Continue-on-error documentation
6. ✅ CodeQL-safe pattern for github.action_path
All changes pushed to this branch. Ready for re-review. |
…578] Companion PR elementor/elementor-editor-github-actions#55 got a new push (ESM/CJS + shared parser). Update both visual-proof-author and visual-proof-shots to SHA d44fcedc6ac349a709d176e243bb35b0b0ba755f. Ref: ED-25578 Co-authored-by: Davids Seveloff <davseve@users.noreply.github.com>
| **/dist/** | ||
| **/__snapshots__/** | ||
| package-lock.json | ||
| actions/visual-proof-author/*.js |
There was a problem hiding this comment.
Why not the entire folder?
There was a problem hiding this comment.
Fixed — replaced per-extension ignores with folder-level actions/visual-proof*/** covering all three directories (including the shared visual-proof/ folder).
| name: 'Visual proof shots' | ||
| description: 'Record Playground screenshots and a short clip from ## Visual proof Steps' | ||
|
|
||
| inputs: |
There was a problem hiding this comment.
Secrets stuff should transfer using env only and not inputs
There was a problem hiding this comment.
The action currently accepts secrets as inputs then maps them to env internally (GH_TOKEN: ${{ inputs.github-token }}). Moving to env-only would require updating the Core PR #37307 workflow that's already pinning this action. Since the secrets don't leak through logs (they're mapped to env before the script runs) and changing it would be a breaking change, I'll defer this refactor until we coordinate with Core's usage.
| '**/dist/**', | ||
| '**/node_modules/**', | ||
| '**/__snapshots__/**', | ||
| 'actions/visual-proof-author/**/*.js', |
There was a problem hiding this comment.
Both lines are contained by each other
There was a problem hiding this comment.
Fixed — consolidated to folder-level ignore actions/visual-proof*/** which covers all three directories (visual-proof/, visual-proof-author/, visual-proof-shots/) including the shared parser.
- Replace extension-specific globs with 'actions/visual-proof*/**' - Covers visual-proof/, visual-proof-author/, visual-proof-shots/ - Addresses PR review feedback from @Ntnelbaba Ref: ED-25578 Co-authored-by: Davids Seveloff <davseve@users.noreply.github.com>
Summary
visual-proof-authorwrites## Visual proofwhen missing;visual-proof-shotsrecords Playground (storyboard actor, then generic walk).playground-previewworkflow and passproduct-name.Test plan
node actions/visual-proof/parse-section.js --testpasses.elementor/elementorVisual proof workflows atactions/visual-proof-author@<this-branch>andactions/visual-proof-shots@<this-branch>and re-run a PR.elementor/elementor-proafter Playground is green.#skip_proofskips capture and a filled section posts a comment.Visual proof
#skip_proof
GitHub Actions repo; no Elementor editor Playground.
Jira
ED-25578
Made with Cursor
✨ PR Description
1. Problem & Context
Implements shared GitHub Actions for automating the "Visual proof" section of PRs (ED-2578). The goal is to use AI agents to author proof descriptions and generate corresponding screenshots/videos from a WordPress Playground preview.
2. What Changed (Where)
actions/visual-proof-author/cursor-agentto write PR proof sections.actions/visual-proof-shots/cursor-agentfor visual capture.actions/visual-proof/parse-section.cjs## Visual proofmarkdown section.eslint.config.mjs/.prettierignore3. How It Works
author.shuses a Cursor agent to analyze the PR diff and either populate the## Visual proofsection with reproduction steps or mark it#skip_proof.run.shresolves the playground URL, attempts to run an AI-generated storyboard actor viaact.sh, and falls back to a generic "Pagescapture.cjsif the actor fails.post-comment.shuploads captured PNGs/MP4s to a dedicated assets branch and upserts a formatted PR comment.4. Risks
act.shruns an unsandboxed AI agent with write access to the checkout; mitigated by blocking fork PRs in the workflow.cursor-agentand Playwright timeouts; mitigated bycontinue-on-error: trueand fallback capture paths.Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how