Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: ['**']
pull_request:

jobs:
check:
runs-on: ubuntu-latest
Comment on lines +3 to +10
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

cat .github/workflows/ci.yml

Repository: scalekit-inc/developer-docs

Length of output: 709


Add explicit least-privilege workflow permissions.

The workflow uses external actions (actions/checkout@v4, pnpm/action-setup@v4, actions/setup-node@v4) and should define permissions to restrict GITHUB_TOKEN scope.

🔐 Minimal fix
 on:
   push:
     branches: ['**']
   pull_request:
 
+permissions:
+  contents: read
+
 jobs:
   check:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
push:
branches: ['**']
pull_request:
jobs:
check:
runs-on: ubuntu-latest
on:
push:
branches: ['**']
pull_request:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 3 - 10, Add an explicit
least-privilege permissions block for the workflow by adding a top-level
permissions mapping (noting the existing keys 'on', 'jobs', and job name
'check') that restricts the GITHUB_TOKEN scope—e.g., set permissions: contents:
read (and packages: read or id-token: write only if those specific actions
require them), or scope down further per-job if needed; place this top-level
'permissions' key alongside 'on' and 'jobs' to ensure external actions like
actions/checkout@v4, pnpm/action-setup@v4 and actions/setup-node@v4 run with the
minimal required privileges.

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

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

- name: Type check
run: pnpm astro check

- name: Format check
run: pnpm run format:check

- name: Agent markdown audit
run: node scripts/agent-markdown-audit.js --strict

- name: Production build
run: pnpm run build
Loading