Skip to content

Commit 4b793e1

Browse files
committed
Apply the migration script
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent 3c52433 commit 4b793e1

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

.github/workflows/auto-dependabot.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
11
name: Auto-merge Dependabot PR
22

33
on:
4-
pull_request:
4+
# XXX: !!! SECURITY WARNING !!!
5+
# pull_request_target has write access to the repo, and can read secrets. We
6+
# need to audit any external actions executed in this workflow and make sure no
7+
# checked out code is run (not even installing dependencies, as installing
8+
# dependencies usually can execute pre/post-install scripts). We should also
9+
# only use hashes to pick the action to execute (instead of tags or branches).
10+
# For more details read:
11+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
12+
pull_request_target:
513

614
permissions:
7-
contents: write
15+
contents: read
816
pull-requests: write
917

1018
jobs:
1119
auto-merge:
20+
name: Auto-merge Dependabot PR
1221
if: github.actor == 'dependabot[bot]'
1322
runs-on: ubuntu-slim
1423
steps:
24+
- name: Generate GitHub App token
25+
id: app-token
26+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
27+
with:
28+
app-id: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
29+
private-key: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
30+
1531
- name: Auto-merge Dependabot PR
1632
uses: frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
1733
with:
18-
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
github-token: ${{ steps.app-token.outputs.token }}
1935
dependency-type: 'all'
2036
auto-merge: 'true'
2137
merge-method: 'merge'

0 commit comments

Comments
 (0)