Skip to content

Conversation

@abdul-qadir92
Copy link
Collaborator

No description provided.

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

To fix this problem, explicitly add a permissions block with minimal necessary privileges. Since the workflow only checks out code and runs Maven tests on the codebase, it does not need to write to the repository or perform other write operations. Therefore, at the top of the file (after the name: and before or after the on: block), add:

permissions:
  contents: read

This ensures the GITHUB_TOKEN is only allowed to read repository contents during this workflow, following the principle of least privilege.

No further code or functionality changes are necessary.


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
@@ -1,4 +1,6 @@
 name: BrowserStack Accessibility Tests (On-Prem)
+permissions:
+  contents: read
 
 on:
   workflow_dispatch:
EOF
@@ -1,4 +1,6 @@
name: BrowserStack Accessibility Tests (On-Prem)
permissions:
contents: read

on:
workflow_dispatch:
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