Skip to content

Capture unique selectors for auxiliary interactions - #62

Merged
bhackett1024 merged 1 commit into
mainfrom
codex/unique-interaction-selectors
Oct 21, 2026
Merged

bhackett1024 merged 1 commit into
mainfrom
codex/unique-interaction-selectors

Conversation

@bhackett1024

Copy link
Copy Markdown
Contributor

Auxiliary interaction capture previously accepted the first available ID, label, or text selector without checking what it matched. Repeated controls therefore received ambiguous selectors, and unlabeled controls could lose their targets entirely.

Validate each candidate against the original target using Playwright-compatible CSS and text matching. Preserve :has-text selectors, scope duplicates beneath ancestors, and fall back to validated structural paths. Include open shadow roots in uniqueness checks; detached or closed-shadow targets remain unresolved. Prepare capture 0.1.7 and document the upgrade. Existing recordings are unchanged; this PR does not publish the package or upgrade customer applications.

Validation: all 132 tests and production build passed. New Chromium tests resolve emitted selectors with Playwright and assert exactly one match equal to the original element, covering duplicate identifiers/labels, text semantics, escaping, oversized attributes, anonymous controls, and shadow roots. CI installs Chromium for these checks.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​playwright/​test@​1.64.110010010099100

View full report

@socket-security

Copy link
Copy Markdown

Caution

Review the following alerts detected in dependencies.

According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
Potential security risk (AI signal): npm playwright-core is 76.0% likely risky

Notes: This module is a straightforward installer wrapper, but it has a high supply-chain trust boundary risk: it downloads an MSI from a caller-provided URL and silently executes it via msiexec without any integrity/signature validation or URL allowlisting. There is no clear evidence of hidden malware in the visible code, but the execution pattern can enable malicious installer delivery if the URL/contents are compromised or attacker-controlled.

Confidence: 0.76

Severity: 0.74

From: package-lock.json → npm/@playwright/test@1.64.1 → npm/playwright-core@1.64.1

ℹ Read more on: This package | This alert | What are AI-detected potential security risks?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system identified potential security problems in this package. It is advised to review the package thoroughly and assess the potential risks before installation. You may also consider reporting the issue to the package maintainer or seeking alternative solutions with a stronger security posture.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/playwright-core@1.64.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block
Low priority
Potential security risk (AI signal): npm playwright-core is 78.0% likely risky

Notes: This module is a generic “download-and-silent-install MSI” bootstrapper where the critical control point (the download URL) is fully caller-controlled and the fragment lacks any integrity/signature verification of the downloaded MSI before executing it via msiexec. While there is no explicit backdoor/exfiltration code in the fragment, the combination of (a) arbitrary remote MSI acquisition and (b) silent installer execution makes it a high-risk supply-chain pattern if $args[0] can be influenced or if download provenance cannot be guaranteed externally.

Confidence: 0.78

Severity: 0.78

From: package-lock.json → npm/@playwright/test@1.64.1 → npm/playwright-core@1.64.1

ℹ Read more on: This package | This alert | What are AI-detected potential security risks?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system identified potential security problems in this package. It is advised to review the package thoroughly and assess the potential risks before installation. You may also consider reporting the issue to the package maintainer or seeking alternative solutions with a stronger security posture.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/playwright-core@1.64.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block
Low priority
Potential security risk (AI signal): npm playwright-core is 70.0% likely risky

Notes: No evidence of obfuscated or overtly malicious logic (no persistence, exfiltration, or credential theft) appears in the provided snippet. However, it implements a high-risk supply-chain pattern: it downloads an MSI from a URL provided at runtime and installs it silently via msiexec without any integrity or origin verification. If an attacker can influence $args[0] or the referenced endpoint, this script can facilitate arbitrary MSI payload execution on the host.

Confidence: 0.70

Severity: 0.72

From: package-lock.json → npm/@playwright/test@1.64.1 → npm/playwright-core@1.64.1

ℹ Read more on: This package | This alert | What are AI-detected potential security risks?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system identified potential security problems in this package. It is advised to review the package thoroughly and assess the potential risks before installation. You may also consider reporting the issue to the package maintainer or seeking alternative solutions with a stronger security posture.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/playwright-core@1.64.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block
Low priority
Potential code anomaly (AI signal): npm playwright-core is 74.0% likely to have a medium risk anomaly

Notes: A privileged installer bootstrapper in Microsoft Playwright for macOS downloads a runtime-provided .pkg from a user-controlled URL and installs it as root without authenticity or integrity verification, creating a supply-chain risk for automated testing environments. The script may reveal sensitive parameters if tracing is enabled, and its behavior could be exploited if the supplied URL or artifact is tampered with.

Confidence: 0.74

Severity: 0.82

From: package-lock.json → npm/@playwright/test@1.64.1 → npm/playwright-core@1.64.1

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/playwright-core@1.64.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block

View full report

@bhackett1024
bhackett1024 merged commit 28a9d7e into main Oct 21, 2026
2 of 3 checks passed
@bhackett1024
bhackett1024 deleted the codex/unique-interaction-selectors branch October 21, 2026 17:15
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