Skip to content

Commit 5e8cb92

Browse files
committed
tighten security in gituhb-actions
1 parent 76d2654 commit 5e8cb92

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/dependabot-auto-merge.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ permissions:
1717

1818
jobs:
1919
auto-merge:
20+
2021
runs-on: ubuntu-latest
22+
23+
timeout-minutes: 5
24+
25+
# Only run for Dependabot PRs - security: prevent running on PRs from forks or other actors
26+
if: github.actor == 'dependabot[bot]'
27+
2128
steps:
2229

2330
# repo: https://github.com/actions/checkout
@@ -26,6 +33,12 @@ jobs:
2633

2734
# repo: https://github.com/fastify/github-action-merge-dependabot
2835
# releases: https://github.com/fastify/github-action-merge-dependabot/tags
36+
# The action waits for required status checks by default
2937
- uses: fastify/github-action-merge-dependabot@1b2ed42db8f9d81a46bac83adedfc03eb5149dff # v3.11.2 released on 03-10-2025
3038
with:
31-
github-token: ${{ secrets.TOKEN_AUTOMERGE }}
39+
# github-token: ${{ secrets.TOKEN_AUTOMERGE }}
40+
# Using built-in GITHUB_TOKEN for better security (auto-scoped, auto-expires)
41+
# Falls back to TOKEN_AUTOMERGE if GITHUB_TOKEN lacks permissions
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
merge-method: squash # merge|squash|rebase
44+
target: minor

0 commit comments

Comments
 (0)