Skip to content

Quality Gate#6

Open
abdul-qadir92 wants to merge 31 commits into
qg-2from
sdk
Open

Quality Gate#6
abdul-qadir92 wants to merge 31 commits into
qg-2from
sdk

Conversation

@abdul-qadir92

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread .github/workflows/browserstack-accessibility.yml Fixed
Removed conditional check for sdk branch in workflow.
Comment on lines +8 to +24
runs-on: ubuntu-latest

steps:
- name: Checkout sdk branch
uses: actions/checkout@v4
with:
ref: sdk

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven

- name: Run Accessibility tests
run: mvn test -P scenario-onprem -B

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 4 days ago

Add an explicit permissions block to the workflow so GITHUB_TOKEN is least-privileged by default.
Best fix here (without changing behavior) is to set workflow-level permissions to:

  • contents: read

This is sufficient for actions/checkout and does not grant unnecessary write scopes.
Edit .github/workflows/browserstack-accessibility.yml near the top-level keys (after on: and before jobs: is a clear placement).

Suggested changeset 1
.github/workflows/browserstack-accessibility.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/browserstack-accessibility.yml b/.github/workflows/browserstack-accessibility.yml
--- a/.github/workflows/browserstack-accessibility.yml
+++ b/.github/workflows/browserstack-accessibility.yml
@@ -3,6 +3,9 @@
 on:
   workflow_dispatch:
 
+permissions:
+  contents: read
+
 jobs:
   test:
     runs-on: ubuntu-latest
EOF
@@ -3,6 +3,9 @@
on:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
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.

2 participants