Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add e2e tests#331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Naseem77 wants to merge18 commits intostaging
base:staging
Choose a base branch
Loading
fromadd-e2e-tests
Open

Add e2e tests#331

Naseem77 wants to merge18 commits intostagingfromadd-e2e-tests

Conversation

@Naseem77
Copy link
Contributor

No description provided.

@overcut-ai
Copy link

overcut-aibot commentedDec 10, 2025
edited
Loading

Completed Working on "Code Review"

✅ Review submitted: REQUEST_CHANGES. Total comments: 14 across 7 files.


👉View complete log

@github-actions
Copy link

github-actionsbot commentedDec 10, 2025
edited
Loading

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
actions/actions/checkout4.*.*🟢 6.5
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 56 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Packaging⚠️ -1packaging workflow not detected
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Vulnerabilities🟢 91 existing vulnerabilities detected
SAST🟢 8SAST tool detected but not run on all commits
actions/actions/setup-node4.*.*🟢 5.9
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 68 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 6
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 9binaries present in source code
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
Vulnerabilities🟢 82 existing vulnerabilities detected
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9
actions/actions/setup-python5.*.*🟢 5.2
Details
CheckScoreReason
Maintained🟢 79 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Vulnerabilities⚠️ 010 existing vulnerabilities detected
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9
actions/actions/upload-artifact4.*.*🟢 6.5
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 9SAST tool detected but not run on all commits
npm/@playwright/test1.57.0🟢 6.5
Details
CheckScoreReason
Maintained🟢 1030 commit(s) out of 30 and 6 issue activity out of 30 found in the last 90 days -- score normalized to 10
Code-Review🟢 9GitHub code reviews found for 29 commits out of the last 30 -- score normalized to 9
CII-Best-Practices⚠️ 0no badge detected
Vulnerabilities🟢 10no vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1no published package detected
Token-Permissions⚠️ 0non read-only tokens detected in GitHub workflows
Binary-Artifacts🟢 6binaries present in source code
Dependency-Update-Tool🟢 10update tool detected
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
npm/@types/node22.19.2🟢 7
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 9Found 26/28 approved changesets -- score normalized to 9
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 9license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
Fuzzing⚠️ 0project is not fuzzed
npm/@types/node24.10.2🟢 7
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 9Found 26/28 approved changesets -- score normalized to 9
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy🟢 10security policy file detected
License🟢 9license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
Fuzzing⚠️ 0project is not fuzzed
npm/fsevents2.3.2🟢 3.7
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 3Found 7/22 approved changesets -- score normalized to 3
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/playwright1.57.0🟢 6.5
Details
CheckScoreReason
Maintained🟢 1030 commit(s) out of 30 and 6 issue activity out of 30 found in the last 90 days -- score normalized to 10
Code-Review🟢 9GitHub code reviews found for 29 commits out of the last 30 -- score normalized to 9
CII-Best-Practices⚠️ 0no badge detected
Vulnerabilities🟢 10no vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1no published package detected
Token-Permissions⚠️ 0non read-only tokens detected in GitHub workflows
Binary-Artifacts🟢 6binaries present in source code
Dependency-Update-Tool🟢 10update tool detected
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
npm/playwright-core1.57.0🟢 6.5
Details
CheckScoreReason
Maintained🟢 1030 commit(s) out of 30 and 6 issue activity out of 30 found in the last 90 days -- score normalized to 10
Code-Review🟢 9GitHub code reviews found for 29 commits out of the last 30 -- score normalized to 9
CII-Best-Practices⚠️ 0no badge detected
Vulnerabilities🟢 10no vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1no published package detected
Token-Permissions⚠️ 0non read-only tokens detected in GitHub workflows
Binary-Artifacts🟢 6binaries present in source code
Dependency-Update-Tool🟢 10update tool detected
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
npm/undici-types7.16.0🟢 8.3
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Dependency-Update-Tool🟢 10update tool detected
Maintained🟢 1030 commit(s) and 17 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 9security policy file detected
Binary-Artifacts🟢 8binaries present in source code
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 4dependency not pinned by hash detected -- score normalized to 4
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Signed-Releases⚠️ -1no releases found
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 10SAST tool is run on all commits
Packaging🟢 10packaging workflow detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
License🟢 10license file detected
Fuzzing🟢 10project is fuzzed
CI-Tests🟢 1030 out of 30 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 79 contributing companies or organizations

Scanned Files

  • .github/workflows/playwright.yml
  • package-lock.json

@coderabbitai
Copy link
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the.coderabbit.yaml file in this repository. To trigger a single review, invoke the@coderabbitai review command.

You can disable this status message by setting thereviews.review_status tofalse in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branchadd-e2e-tests

Thanks for usingCodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment@coderabbitai help to get the list of available commands and usage tips.

Copy link

@overcut-aiovercut-aibot left a comment

Choose a reason for hiding this comment

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

Blocking issues remain: the CI workflow never boots the QueryWeaver server before running Playwright, the new API helpers leak/discard authentication contexts, and the graph upload helper never actually sends file contents. Please address these along with the supporting fixes noted inline.

run:npm ci
-name:Install Playwright Browsers
run:npx playwright install --with-deps
-name:Run Playwright tests

Choose a reason for hiding this comment

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

[blocker]: Playwright CI never launches backend. The Playwright workflow installs dependencies and immediately runsnpx playwright test, but it neither starts the QueryWeaver backend/frontend nor setsPLAYWRIGHT_BASE_URL, so every navigation/API helper will hit an empty localhost port and time out on CI. Add a step (or PlaywrightwebServer config) that starts the API/frontend, waits for it to become reachable, and exportsPLAYWRIGHT_BASE_URL before the tests run.

/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use:{
/* Base URL to use in actions like `await page.goto('')`. */
baseURL:process.env.BASE_URL||'http://localhost:5000',

Choose a reason for hiding this comment

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

[major]: Base URL left undefined.use.baseURL is commented out, so helpers likepage.goto('/') guess the host and CI cannot override it. Without a deterministic base URL the suite cannot talk to either localhost or staging. Setuse: { baseURL: process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:5000', ... } (and pass the env in CI) so tests share a consistent origin.

},
"devDependencies": {
"@playwright/test":"^1.57.0",
"@types/node":"^24.10.2",

Choose a reason for hiding this comment

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

[major]: Node typings out of sync with runtime.@types/node was bumped to ^24.x while Docker/CI still execute Node 22, so TypeScript will now allow APIs that crash under the shipped runtime when running the Playwright tooling. Either upgrade every runtime to Node 24 or pin@types/node to the 22.x series so type definitions match the deployed Node version.

}
}

asynccloseBrowser(){

Choose a reason for hiding this comment

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

[major]: Wrapper reuses handles after closing.closeBrowser() closes the page/browser but leavesthis.browser andthis.context populated, so the nextcreateNewPage() reuses handles Playwright has already torn down and throws target-closed errors. After closing, dispose the context and set boththis.browser andthis.context to null (or recreate them) so later calls relaunch cleanly.

import{APIRequestContext,request}from"@playwright/test"


constgetRequest=async(url:string,headers?:Record<string,string>,body?:any,availableRequest?:APIRequestContext)=>{

Choose a reason for hiding this comment

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

[major]: API request contexts leak. Each helper creates arequest.newContext() when one isn’t supplied but never disposes it, so repeated calls leak HTTP sessions/processes and eventually hang the runner. Track whether the helper created the context (e.g.,const shouldDispose = !availableRequest) andawait requestContext.dispose() in a finally block when true.

},
"devDependencies": {
"@playwright/test":"^1.57.0",
"@types/node":"^24.10.2",

Choose a reason for hiding this comment

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

[major]@types/node is bumped to 24.10 here while the project runtime is still Node 22 (see Dockerfile’ssetup_22.x install and the workflow’snode-version: lts/*). TypeScript will now permit APIs that only exist in Node 24, which will crash when the Playwright tooling runs under Node 22 inside Docker/CI. Please either keep the types on the 22.x line or upgrade the runtime everywhere so the type definitions match the actual Node version.

}
}

asynccloseBrowser(){

Choose a reason for hiding this comment

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

[major]closeBrowser() only closes the page and then the raw browser handle, but it never closes the activeBrowserContext or resetthis.browser/this.context tonull. After one test finishes those fields keep pointing at Playwright objects that have already been torn down, so the nextcreateNewPage will try to reuse a dead context and throwbrowserContext.newPage: Protocol error: Target closed. Pleaseawait this.context?.close() and null the fields (browser/context/page) when shutting down so a subsequent run can relaunch cleanly.

headers:headers||undefined,
};

constrequestContext=availableRequest||(awaitrequest.newContext());

Choose a reason for hiding this comment

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

[major] Each helper here spins up a freshAPIRequestContext when one isn’t provided, but none of them ever dispose it. In a longer suite these stacks of orphaned contexts leak HTTP sessions/processes until Playwright hangs or hits the browser limit. Please track whether the helper created the context (e.g.const shouldDispose = !availableRequest) and callawait requestContext.dispose() in afinally block when appropriate so we don’t leak resources between API calls.

headers:headers||undefined,
};

constrequestContext=awaitrequest.newContext();

Choose a reason for hiding this comment

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

[major] Unlike the GET/POST/PATCH helpers,deleteRequest always creates a brand‑newAPIRequestContext, so callers such asdeleteGraph/deleteToken drop the authenticated session they just established and hit the endpoint without cookies/headers. Please accept the optionalavailableRequest parameter (mirroring the other helpers) and reuse it so DELETE calls keep the same auth context as the rest of the API interactions.

):Promise<GraphUploadResponse>{
try{
constbaseUrl=getBaseUrl();
constformData:Record<string,string>={

Choose a reason for hiding this comment

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

[major]uploadGraph builds a plain object{ file: filePath } and then forcesContent-Type: multipart/form-data. Playwright will serialize that object as JSON ({"file":"/tmp/foo.json"}) and the backend never receives any file bytes or multipart boundary, so uploads will always fail. Use Playwright’s multipart support instead—e.g.requestContext.post(url, { multipart: { file: await fs.createReadStream(filePath), database, description } })—and let Playwright set the header so the graph file actually reaches the server.

Copy link

@overcut-aiovercut-aibot left a comment

Choose a reason for hiding this comment

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

Thanks for the comprehensive E2E scaffolding work. I left 14 comments (2 blockers, 12 majors) covering three critical areas:

  1. CI workflow never boots the backend/API service, so the newly added Playwright suite will always run against an empty port and fail. Please ensure the workflow provisions/starts the backend before executing the browser and API tests.
  2. The Playwright configuration/UI helpers rely onpage.goto()/API calls with an undefined base URL and leak Playwright resources (browser contexts + APIRequestContext instances). We need a guaranteed base URL (wired through CI) and proper teardown/reuse of contexts so runs do not leak and hang.
  3. Test-only dependencies are now part of the runtime package (e.g.,playwright underdependencies), inflating production bundles, while API helpers mishandle authentication for DELETE/uploads. Move the heavy tooling back to devDependencies and address the helper issues called out inline so E2E runs can actually exercise the app.

Once those blockers and the associated comments are addressed, I’ll re-review. Thanks!

@@ -1,8 +1,12 @@
{
"dependencies": {
"playwright":"^1.57.0",

Choose a reason for hiding this comment

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

[major]playwright is added underdependencies, which means we now ship the browser binaries to every production install/deployment even though they are only needed for local/CI testing. This roughly gigabyte-sized dependency bloats Lambda/container images, slows prod deploys, and is unused at runtime. Please moveplaywright (and its transitive install) todevDependencies so only development/test environments pull it in.

Comment on lines 14 to 113
timeout-minutes:60
runs-on:ubuntu-latest

steps:
-uses:actions/checkout@v4

# Setup Python
-name:Set up Python
uses:actions/setup-python@v5
with:
python-version:${{ env.PYTHON_VERSION }}

# Setup Node.js
-uses:actions/setup-node@v4
with:
node-version:${{ env.NODE_VERSION }}

# Install pipenv
-name:Install pipenv
run:pip install pipenv

# Install Python dependencies
-name:Install Python dependencies
run:pipenv sync --dev

# Install Node dependencies (frontend)
-name:Install frontend dependencies
run:npm ci

# Build frontend
-name:Build frontend
run:npm run build
working-directory:./app

# Start Docker Compose services (test databases + FalkorDB)
-name:Start test databases
run:|
docker compose -f e2e/docker-compose.test.yml up -d
# Wait for databases to be healthy
echo "Waiting for databases to be ready..."
sleep 10
docker ps -a
# Start FalkorDB (Redis graph database)
-name:Start FalkorDB
run:|
docker run -d --name falkordb-test -p 6379:6379 falkordb/falkordb:latest
sleep 5
docker ps -a
# Start the FastAPI application in background
-name:Start FastAPI application
run:|
pipenv run uvicorn api.index:app --host localhost --port 5000 &
# Wait for app to start
echo "Waiting for application to start..."
sleep 10
curl -f http://localhost:5000/ || (echo "Failed to start application" && exit 1)
env:
PYTHONUNBUFFERED:1
FASTAPI_SECRET_KEY:test-secret-key-for-ci
APP_ENV:development
FASTAPI_DEBUG:False
FALKORDB_HOST:localhost
FALKORDB_PORT:6379
DISABLE_MCP:true

# Install Playwright browsers
-name:Install Playwright Browsers
run:npx playwright install --with-deps chromium firefox

# Run Playwright tests
-name:Run Playwright tests
run:npx playwright test --reporter=list
env:
CI:true

# Upload test results on failure
-uses:actions/upload-artifact@v4
if:failure()
with:
name:playwright-report
path:playwright-report/
retention-days:30

# Upload test screenshots on failure
-uses:actions/upload-artifact@v4
if:failure()
with:
name:test-results
path:test-results/
retention-days:30

# Cleanup - Stop all containers
-name:Cleanup Docker containers
if:always()
run:|
docker compose -f e2e/docker-compose.test.yml down -v ||true
docker stop falkordb-test ||true
docker rm falkordb-test ||true

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 1 day ago

To fix the problem, add an explicitpermissions block to the workflow, restricting the GITHUB_TOKEN to the minimum necessary privileges. Since this workflow does not perform any modifications to the repository contents or interact with issues or pull requests, the minimal permissioncontents: read is sufficient. The best place to add this is at the top level of the workflow (after or beforeenv:), so it applies to all jobs unless overridden. Therefore, add:

permissions:contents:read

Adding this at the root guarantees that jobs cannot escalate privileges unexpectedly, and no permissions are granted for writing, merging PRs, or modifying issues. No further code changes or new imports are needed.


Suggested changeset1
.github/workflows/playwright.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git applydiff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml--- a/.github/workflows/playwright.yml+++ b/.github/workflows/playwright.yml@@ -5,6 +5,9 @@   pull_request:     branches: [ main, staging ] +permissions:+  contents: read+ env:   PYTHON_VERSION: '3.12'   NODE_VERSION: 'lts/*'EOF
@@ -5,6 +5,9 @@
pull_request:
branches:[ main, staging ]

permissions:
contents:read

env:
PYTHON_VERSION:'3.12'
NODE_VERSION:'lts/*'
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@overcut-aiovercut-ai[bot]overcut-ai[bot] requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Naseem77

[8]ページ先頭

©2009-2025 Movatter.jp