Skip to content

Conversation

@fern-support
Copy link
Collaborator

No description provided.

Comment on lines +13 to +29
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v4

- name: Download Fern
run: npm install -g fern-api

- name: Release SDKs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
FERN_PYPI_TOKEN: ${{ secrets.FERN_PYPI_TOKEN }}
run: |
fern generate --group python-sdk --version ${{ inputs.version }} --log-level debug No newline at end of file

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 6 months ago

The best way to fix this issue is to introduce an explicit permissions block at the root of the workflow file. This block will define minimal permissions required for the workflow to function correctly. Based on the workflow's operations, it likely only requires contents: read permission for accessing the repository's code. If additional permissions are required (e.g., pull-requests: write), they can be added accordingly.

To implement the fix:

  • Add a permissions key at the root level of the workflow file (before jobs).
  • Set the permissions to contents: read, as this workflow primarily interacts with the repository's contents.

Suggested changeset 1
.github/workflows/python-sdk.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/python-sdk.yml b/.github/workflows/python-sdk.yml
--- a/.github/workflows/python-sdk.yml
+++ b/.github/workflows/python-sdk.yml
@@ -1,5 +1,8 @@
 name: Release Python SDK
 
+permissions:
+  contents: read
+
 on:
   workflow_dispatch:
     inputs:
EOF
@@ -1,5 +1,8 @@
name: Release Python SDK

permissions:
contents: read

on:
workflow_dispatch:
inputs:
Copilot is powered by AI and may make mistakes. Always verify output.
@Eclairemoy Eclairemoy merged commit f6816a3 into main Jul 9, 2025
8 checks passed
@Eclairemoy Eclairemoy deleted the jsklan/python-sdk branch July 9, 2025 15:53
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.

5 participants