Fix Security Vulnerability with the cherry-pick bot and update-lockfiles workflow

PiperOrigin-RevId: 674202509
Change-Id: I1ae99629cdbd2bf26df8893cebe8e6631681d4cd
diff --git a/.github/workflows/cherry-picker.yml b/.github/workflows/cherry-picker.yml
index 2e9f1c2..04ed7d1 100644
--- a/.github/workflows/cherry-picker.yml
+++ b/.github/workflows/cherry-picker.yml
@@ -1,8 +1,9 @@
 name: cherry-picker
 
 on:
-  pull_request_target:
+  pull_request:
     types: [closed]
+    branches: [master]
   issues:
     types: [closed, milestoned]
 
diff --git a/.github/workflows/update-lockfiles.yml b/.github/workflows/update-lockfiles.yml
index 3446d2d..d1c18fe 100644
--- a/.github/workflows/update-lockfiles.yml
+++ b/.github/workflows/update-lockfiles.yml
@@ -1,7 +1,7 @@
 name: update-lockfiles
 
 on:
-  pull_request_target:
+  pull_request:
     branches:
       - "release-**"
     types: