Skip to content

Commit a07d008

Browse files
committed
fix(security): resolve playwright goto-injection finding in JS template (INF-1647)
The page.goto(sessionUrl) call in the JS scaffold template flows from developer-provided constants (WEBSITE_URL_1/2/3) set at scaffold time, never runtime/untrusted input. Add a scoped nosemgrep suppression with rationale documenting the template-time decision.
1 parent c3050ff commit a07d008

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.templates/js/template.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ async function main() {
2626
async function fetchData(context, sessionUrl) {
2727
// Create a page in a new tab in the browser context and wrap it to get access to the AgentQL's querying API
2828
const page = await wrap(await context.newPage());
29+
// nosemgrep: javascript.playwright.security.audit.playwright-goto-injection -- template scaffold; sessionUrl is a developer-provided constant (WEBSITE_URL_1/2/3) set at scaffold time, never runtime/untrusted input.
2930
await page.goto(sessionUrl);
3031

3132
// Update the query to locate the desired element on the page

0 commit comments

Comments
 (0)