Skip to content

armgit / herdr

Public Imported from GitHub
0

the runtime your coding agents live on

ci: harden workflow permissions

Ogulcan Celikca9ed2b434f0
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..0c0862139
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,13 @@
+version: 2
+updates:
+ - package-ecosystem: cargo
+ directory: /
+ schedule:
+ interval: weekly
+ open-pull-requests-limit: 5
+
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: weekly
+ open-pull-requests-limit: 5
diff --git a/.github/workflows/build-artifacts-manual.yml b/.github/workflows/build-artifacts-manual.yml
index 0380d3695..23530a1cb 100644
--- a/.github/workflows/build-artifacts-manual.yml
+++ b/.github/workflows/build-artifacts-manual.yml
@@ -57,6 +57,8 @@ jobs:
steps:
- uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
@@ -135,6 +137,8 @@ jobs:
steps:
- uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0d85dd9ce..8427d384f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,6 +8,9 @@ on:
paths-ignore:
- "website/**"
+permissions:
+ contents: read
+
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
@@ -23,6 +26,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Install just
uses: extractions/setup-just@v3
diff --git a/.github/workflows/label-next-release-issues.yml b/.github/workflows/label-next-release-issues.yml
index 7a27edc68..fbbf3131b 100644
--- a/.github/workflows/label-next-release-issues.yml
+++ b/.github/workflows/label-next-release-issues.yml
@@ -19,6 +19,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
+ persist-credentials: false
- name: Close issues referenced by pushed commits
shell: bash
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index fd293529e..7393694c4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,13 +6,15 @@ on:
- "v*"
permissions:
- contents: write
+ contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
+ permissions:
+ contents: read
strategy:
matrix:
include:
@@ -44,6 +46,8 @@ jobs:
steps:
- uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Verify tag matches Cargo.toml version
run: |
@@ -108,9 +112,13 @@ jobs:
release:
needs: build
runs-on: ubuntu-latest
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@v4
+ with:
+ persist-credentials: false
- name: Download all artifacts
uses: actions/download-artifact@v4
@@ -140,6 +148,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
+ persist-credentials: false
- name: Close issues referenced by released commits
shell: bash
@@ -257,6 +266,8 @@ jobs:
update-latest-json:
needs: release
runs-on: ubuntu-latest
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@v4