ci: Set and enforce more default permissions (#60222)
Release Notes: - N/A
This commit is contained in:
1 parent
c3027f441c
commit
6281abf44d
62 files changed
+388
-136
No files matched your search
@@ -22,6 +22,8 @@ on:
|
||||
description: body
|
||||
type: string
|
||||
default: ''
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
rebuild_releases_page:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -13,9 +13,14 @@ on:
|
||||
description: run_clippy
|
||||
type: boolean
|
||||
default: 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
run_autofix:
|
||||
runs-on: namespace-profile-16x32-ubuntu-2204
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
|
||||
@@ -5,10 +5,15 @@ on:
|
||||
# Fire every day at 16:00 UTC (At the start of the US workday)
|
||||
- cron: "0 16 * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update-collab-staging-tag:
|
||||
if: github.repository_owner == 'zed-industries'
|
||||
runs-on: namespace-profile-2x4-ubuntu-2404
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
||||
|
||||
@@ -8,10 +8,14 @@ on:
|
||||
description: Branch name to run on
|
||||
required: true
|
||||
type: string
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
run_bump_patch_version:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
runs-on: namespace-profile-16x32-ubuntu-2204
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- id: generate-token
|
||||
name: steps::authenticate_as_zippy
|
||||
|
||||
@@ -8,6 +8,8 @@ on:
|
||||
description: 'Which channels to bump: all, main, preview, or stable'
|
||||
type: string
|
||||
default: all
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
resolve_versions:
|
||||
if: github.repository_owner == 'zed-industries'
|
||||
@@ -86,6 +88,9 @@ jobs:
|
||||
- resolve_versions
|
||||
if: inputs.target == 'all' || inputs.target == 'main'
|
||||
runs-on: namespace-profile-16x32-ubuntu-2204
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- id: generate-token
|
||||
name: steps::authenticate_as_zippy
|
||||
@@ -127,6 +132,8 @@ jobs:
|
||||
- resolve_versions
|
||||
if: inputs.target == 'all' || inputs.target == 'preview'
|
||||
runs-on: namespace-profile-16x32-ubuntu-2204
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- id: generate-token
|
||||
name: steps::authenticate_as_zippy
|
||||
@@ -180,6 +187,8 @@ jobs:
|
||||
- resolve_versions
|
||||
if: inputs.target == 'all' || inputs.target == 'stable'
|
||||
runs-on: namespace-profile-16x32-ubuntu-2204
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- id: generate-token
|
||||
name: steps::authenticate_as_zippy
|
||||
|
||||
@@ -21,6 +21,8 @@ on:
|
||||
description: pr_number
|
||||
required: true
|
||||
type: string
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
run_cherry_pick:
|
||||
runs-on: namespace-profile-2x4-ubuntu-2404
|
||||
|
||||
@@ -14,6 +14,8 @@ concurrency:
|
||||
group: potential-duplicate-check-${{ github.event.issue.number || inputs.issue_number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
identify-duplicates:
|
||||
# For manual testing, allow running on any branch; for automatic runs, only on main repo
|
||||
|
||||
@@ -13,10 +13,15 @@ on:
|
||||
type: number
|
||||
default: 1000
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
if: github.repository_owner == 'zed-industries'
|
||||
runs-on: namespace-profile-2x4-ubuntu-2404
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10
|
||||
with:
|
||||
|
||||
@@ -5,10 +5,16 @@ on:
|
||||
- cron: "0 */12 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update_top_ranking_issues:
|
||||
runs-on: namespace-profile-2x4-ubuntu-2404
|
||||
if: github.repository == 'zed-industries/zed'
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
||||
- name: Set up uv
|
||||
|
||||
@@ -5,10 +5,16 @@ on:
|
||||
- cron: "0 15 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update_top_ranking_issues:
|
||||
runs-on: namespace-profile-2x4-ubuntu-2404
|
||||
if: github.repository == 'zed-industries/zed'
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
||||
- name: Set up uv
|
||||
|
||||
@@ -7,6 +7,8 @@ on:
|
||||
schedule:
|
||||
- cron: 30 17 * * 2
|
||||
workflow_dispatch: {}
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
scheduled_compliance_check:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -4,6 +4,9 @@ on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-author:
|
||||
if: ${{ github.repository_owner == 'zed-industries' }}
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
- edited
|
||||
branches:
|
||||
- main
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
danger:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -7,6 +7,8 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- collab-production
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
style:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -35,6 +35,8 @@ on:
|
||||
description: Git ref to checkout and deploy. Defaults to event SHA when omitted.
|
||||
type: string
|
||||
default: ''
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
deploy_docs:
|
||||
if: github.repository_owner == 'zed-industries'
|
||||
|
||||
@@ -5,6 +5,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
permissions: {}
|
||||
jobs:
|
||||
deploy_docs:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -42,6 +42,10 @@ on:
|
||||
- immediate
|
||||
default: batch
|
||||
|
||||
# Both jobs below declare their own `permissions:` blocks, so no job uses this
|
||||
# top-level default. Least privilege therefore grants nothing here.
|
||||
permissions: {}
|
||||
|
||||
env:
|
||||
DROID_MODEL: claude-sonnet-4-5-20250929
|
||||
SUGGESTIONS_BRANCH: docs/suggestions-pending
|
||||
|
||||
@@ -10,6 +10,8 @@ on:
|
||||
- '!extensions/test-extension/**'
|
||||
- '!extensions/workflows/**'
|
||||
- '!extensions/*.md'
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
detect_changed_extensions:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -28,6 +28,8 @@ on:
|
||||
app-secret:
|
||||
description: The app secret for the corresponding app ID
|
||||
required: true
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
check_version_changed:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -15,6 +15,8 @@ on:
|
||||
description: working-directory
|
||||
type: string
|
||||
default: .
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
orchestrate:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -14,6 +14,8 @@ on:
|
||||
description: Description for the changes to be expected with this rollout
|
||||
type: string
|
||||
default: ''
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
fetch_extension_repos:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && (github.ref == 'refs/tags/extension-workflows' || github.ref == 'refs/heads/main')
|
||||
|
||||
@@ -4,6 +4,9 @@ on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
handle-good-first-issue:
|
||||
if: github.event.label.name == '.contrib/good first issue' && github.repository_owner == 'zed-industries'
|
||||
|
||||
@@ -21,12 +21,13 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
check-hotfix-reviews:
|
||||
if: github.repository_owner == 'zed-industries'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: read
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
REPO: ${{ github.repository }}
|
||||
|
||||
@@ -9,6 +9,8 @@ on:
|
||||
types:
|
||||
- labeled
|
||||
- synchronize
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
build_nix_linux_x86_64:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && ((github.event.action == 'labeled' && (github.event.label.name == 'run-nix' || github.event.label.name == 'run-bundling')) || (github.event.action == 'synchronize' && (contains(github.event.pull_request.labels.*.name, 'run-nix') || contains(github.event.pull_request.labels.*.name, 'run-bundling'))))
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
description: Describe why the extension CLI is being bumped and/or what changes are included.
|
||||
required: true
|
||||
type: string
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
publish_job:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && github.ref == 'refs/heads/main'
|
||||
|
||||
@@ -8,6 +8,8 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
run_tests_mac:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
@@ -723,6 +725,8 @@ jobs:
|
||||
- bundle_windows_aarch64
|
||||
- bundle_windows_x86_64
|
||||
runs-on: namespace-profile-4x8-ubuntu-2204
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: release::download_workflow_artifacts
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
|
||||
|
||||
@@ -8,6 +8,8 @@ on:
|
||||
schedule:
|
||||
- cron: 0 */4 * * *
|
||||
workflow_dispatch: {}
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
check_nightly_tag:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -9,6 +9,8 @@ on:
|
||||
types:
|
||||
- labeled
|
||||
- synchronize
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
bundle_linux_aarch64:
|
||||
if: |-
|
||||
|
||||
@@ -14,6 +14,8 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- v[0-9]+.[0-9]+.x
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
orchestrate:
|
||||
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
|
||||
|
||||
@@ -18,6 +18,9 @@ on:
|
||||
- "Guild New PR Notification"
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
notify-slack:
|
||||
if: >-
|
||||
|
||||
@@ -4,6 +4,9 @@ on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
PRIORITY_LABELS: '["priority:P0", "priority:P1"]'
|
||||
REPRODUCIBLE_LABEL: 'state:reproducible'
|
||||
|
||||
@@ -4,6 +4,9 @@ on:
|
||||
label:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
notify-slack:
|
||||
if: >-
|
||||
|
||||
@@ -20,13 +20,14 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
check-stale-prs:
|
||||
if: github.repository_owner == 'zed-industries'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
pull-requests: read
|
||||
env:
|
||||
REPO: ${{ github.repository }}
|
||||
# Only surface PRs created on or after this date. Update this if the
|
||||
|
||||
@@ -5,10 +5,16 @@ on:
|
||||
- cron: "0 6 * * 1,4" # Mondays and Thursdays at 6 AM UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update-duplicate-magnets:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'zed-industries/zed'
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
steps:
|
||||
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
||||
|
||||
|
||||
Reference in new issue
Block a user