Skip to content

improve admin#303

Open
InfinityBowman wants to merge 151 commits intomainfrom
301-improve-admin
Open

improve admin#303
InfinityBowman wants to merge 151 commits intomainfrom
301-improve-admin

Conversation

@InfinityBowman
Copy link
Copy Markdown
Collaborator

@InfinityBowman InfinityBowman commented Jan 21, 2026

Experimental - DO NOT MERGE

@InfinityBowman InfinityBowman linked an issue Jan 21, 2026 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 21, 2026

Deploy Preview for animated-kangaroo-b914c6 failed.

Name Link
🔨 Latest commit d2a125e
🔍 Latest deploy log https://app.netlify.com/projects/animated-kangaroo-b914c6/deploys/69c8ab75f862890008a5648e

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 21, 2026

Deploy Preview for wheresreligion failed. Why did it fail? →

Name Link
🔨 Latest commit d2a125e
🔍 Latest deploy log https://app.netlify.com/projects/wheresreligion/deploys/69c8ab75d73fdf0008c1ba58

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 21, 2026

Deploy Preview for taupe-cactus-43ebc8 failed.

Name Link
🔨 Latest commit 206e1be
🔍 Latest deploy log https://app.netlify.com/projects/taupe-cactus-43ebc8/deploys/69b31e489e7d420008e7baff

Comment on lines +12 to +34
name: Build & Deploy Docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24.x'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build & deploy docs
run: pnpm deploy:docs
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

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

In general, the fix is to explicitly define a permissions block for the workflow or for the specific job so that GITHUB_TOKEN has only the minimal required scopes. For this workflow, the job appears only to read repository contents (via actions/checkout) and then use external secrets to deploy, so contents: read is a suitable minimal starting point.

The single best way to fix this without changing existing functionality is to add a permissions block under the deploy job (or at the top level) setting contents: read. This matches the CodeQL suggestion and GitHub’s minimal recommendation, and it avoids granting any unnecessary write permissions. Concretely, in .github/workflows/deploy-docs.yml, under jobs: deploy:, add a permissions: section with contents: read, keeping indentation consistent with other job-level keys such as name and runs-on. No additional imports, methods, or other definitions are needed.


Suggested changeset 1
.github/workflows/deploy-docs.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/deploy-docs.yml b/.github/workflows/deploy-docs.yml
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -11,6 +11,8 @@
   deploy:
     name: Build & Deploy Docs
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     steps:
       - name: Checkout repository
         uses: actions/checkout@v4
EOF
@@ -11,6 +11,8 @@
deploy:
name: Build & Deploy Docs
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
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.

improve admin

2 participants