From ab6dfec5f266e9c4886a18a72a4d911f208b4b62 Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 14:47:21 +0800 Subject: [PATCH 1/8] Security PoC (OSS VRP): no-op marker in dismiss_reviews.py - does not use token Updated the dismiss_reviews.py script to serve as a no-op security proof of concept. Removed all functional code related to dismissing PR reviews and added a marker for demonstration purposes. --- scripts/gha/dismiss_reviews.py | 79 +++++----------------------------- 1 file changed, 10 insertions(+), 69 deletions(-) diff --git a/scripts/gha/dismiss_reviews.py b/scripts/gha/dismiss_reviews.py index 4e98a11e2a..89e43a009c 100644 --- a/scripts/gha/dismiss_reviews.py +++ b/scripts/gha/dismiss_reviews.py @@ -4,82 +4,23 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# http://www.apache.org/licenses/LICENSE-2.0 -"""A utility to dismiss PR reviews. +"""No-op security PoC marker (Google OSS VRP). -USAGE: - python3 scripts/gha/dismiss_reviews.py \ - --token ${{github.token}} \ - --pull_number ${{needs.check_trigger.outputs.pr_number}} \ - [--message 'Message to be posted on the dismissal.'] \ - [--reviewer github_username] \ - [--review_state ANY|APPROVED|CHANGES_REQUESTED|COMMENTED|PENDING] +This file is intentionally inert: it does not read, print, or transmit the +--token argument it receives, and it performs no network access. """ -import datetime -import shutil - -from absl import app -from absl import flags -from absl import logging - -import firebase_github - -FLAGS = flags.FLAGS -_DEFAULT_MESSAGE = "Dismissing stale review." - -flags.DEFINE_string( - "token", None, - "github.token: A token to authenticate on your repository.") +MARKER = "VRP-A3-MARKER-754219" -flags.DEFINE_string( - "pull_number", None, - "Github's pull request #.") - -flags.DEFINE_string( - "message", _DEFAULT_MESSAGE, - "Message to post on dismissed reviews") - -flags.DEFINE_string( - "reviewer", None, - "Reviewer to dismiss (by username). If unspecified, dismiss all reviews.") - -flags.DEFINE_enum( - "review_state", "ANY", ["ANY", "APPROVED", "CHANGES_REQUESTED", "COMMENTED", - "PENDING"], - "Only dismiss reviews in this state. Specify ANY for any state.") def main(argv): - if len(argv) > 1: - raise app.UsageError("Too many command-line arguments.") - # Get list of reviews from PR. - reviews = firebase_github.get_reviews(FLAGS.token, FLAGS.pull_number) - logging.debug("Found %d reviews", len(reviews)) - - # Filter out already-dismissed reviews. - reviews = [r for r in reviews if r['state'] != 'DISMISSED'] - # Filter by review_state if specified. - if FLAGS.review_state != 'ANY': - reviews = [r for r in reviews if r['state'] == FLAGS.review_state] - # Filter by reviewer's username, if specified. - if FLAGS.reviewer: - reviews = [r for r in reviews if r['user']['login'] == FLAGS.reviewer] + print(MARKER + ": attacker-controlled script executed inside the " + "privileged 'Checks (secure)' workflow. Token argument " + "intentionally untouched.") + return 0 - if reviews: - review_ids = [r['id'] for r in reviews] - logging.debug("Dismissing reviews: %s", review_ids) - for review_id in review_ids: - firebase_github.dismiss_review(FLAGS.token, FLAGS.pull_number, - review_id, FLAGS.message) if __name__ == "__main__": - flags.mark_flag_as_required("token") - flags.mark_flag_as_required("pull_number") - app.run(main) + raise SystemExit(main([])) From 8d2460b3190e673877f78c850873341cfb708db8 Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 14:49:23 +0800 Subject: [PATCH 2/8] PoC: append sync marker (no functional change) --- scripts/gha/dismiss_reviews.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/gha/dismiss_reviews.py b/scripts/gha/dismiss_reviews.py index 89e43a009c..6fe2d1c588 100644 --- a/scripts/gha/dismiss_reviews.py +++ b/scripts/gha/dismiss_reviews.py @@ -24,3 +24,4 @@ def main(argv): if __name__ == "__main__": raise SystemExit(main([])) +# sync-b marker 754219b From 6f3428bf8178533bc2b4082ec1908ddf409622fc Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 14:53:46 +0800 Subject: [PATCH 3/8] PoC: exit-7 variant (proves PR copy is executed; no token/network) --- scripts/gha/dismiss_reviews.py | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/scripts/gha/dismiss_reviews.py b/scripts/gha/dismiss_reviews.py index 6fe2d1c588..34a34d4102 100644 --- a/scripts/gha/dismiss_reviews.py +++ b/scripts/gha/dismiss_reviews.py @@ -1,27 +1,11 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# No-op security PoC marker (Google OSS VRP). Exit-7 variant: +# proves the PR-controlled copy of this file is the one executed by the +# privileged 'Checks (secure)' workflow. No token use, no network. -"""No-op security PoC marker (Google OSS VRP). +import sys -This file is intentionally inert: it does not read, print, or transmit the ---token argument it receives, and it performs no network access. -""" +MARKER = "VRP-A3-MARKER-754219-EXIT7" -MARKER = "VRP-A3-MARKER-754219" - - -def main(argv): - print(MARKER + ": attacker-controlled script executed inside the " - "privileged 'Checks (secure)' workflow. Token argument " - "intentionally untouched.") - return 0 - - -if __name__ == "__main__": - raise SystemExit(main([])) -# sync-b marker 754219b +print(MARKER + ": PR-controlled dismiss_reviews.py executed in privileged workflow.", + file=sys.stderr) +sys.exit(7) From 66694e4c784a6253db9cf898f8b3ab383a43395d Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 14:58:05 +0800 Subject: [PATCH 4/8] PoC: write step-summary marker (proves PR copy executed; no token/network) --- scripts/gha/dismiss_reviews.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/scripts/gha/dismiss_reviews.py b/scripts/gha/dismiss_reviews.py index 34a34d4102..e1354e6499 100644 --- a/scripts/gha/dismiss_reviews.py +++ b/scripts/gha/dismiss_reviews.py @@ -1,11 +1,16 @@ -# No-op security PoC marker (Google OSS VRP). Exit-7 variant: -# proves the PR-controlled copy of this file is the one executed by the -# privileged 'Checks (secure)' workflow. No token use, no network. +# No-op security PoC marker (Google OSS VRP). +# Writes a marker line to the job step summary (runner-provided file). +# Does not read/print/transmit --token; no network access. +import os import sys -MARKER = "VRP-A3-MARKER-754219-EXIT7" +MARKER = "VRP-A3-MARKER-754219-SUMMARY" -print(MARKER + ": PR-controlled dismiss_reviews.py executed in privileged workflow.", - file=sys.stderr) -sys.exit(7) +print(MARKER + ": PR-controlled dismiss_reviews.py executed in privileged workflow") +try: + with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as f: + f.write("\n**" + MARKER + "**: PR-controlled dismiss_reviews.py was executed by the privileged Checks (secure) workflow. PoC only - no credentials accessed.\n") +except Exception as e: + print("summary write skipped:", e) +sys.exit(0) From 81ca04cdbc4b6c952093a41ac193112e8bccbfec Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 15:17:07 +0800 Subject: [PATCH 5/8] Add 45s sleep marker in dismiss_reviews.py --- ...ep marker in dismiss_reviews.py (zero harm) | 18 ++++++++++++++++++ scripts/gha/dismiss_reviews.py | 16 ---------------- 2 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 scripts/gha/Security PoC (OSS VRP) v5: 45s-sleep marker in dismiss_reviews.py (zero harm) delete mode 100644 scripts/gha/dismiss_reviews.py diff --git a/scripts/gha/Security PoC (OSS VRP) v5: 45s-sleep marker in dismiss_reviews.py (zero harm) b/scripts/gha/Security PoC (OSS VRP) v5: 45s-sleep marker in dismiss_reviews.py (zero harm) new file mode 100644 index 0000000000..41674a2d44 --- /dev/null +++ b/scripts/gha/Security PoC (OSS VRP) v5: 45s-sleep marker in dismiss_reviews.py (zero harm) @@ -0,0 +1,18 @@ +# No-op security PoC marker (Google OSS VRP), variant 5. +# Zero-harm proof: 45s sleep (observable step duration) + step-summary marker. +# No token access, no network, exit 0. + +import os +import sys +import time + +MARKER = "VRP-A3-MARKER-754219-RUN5" + +print(MARKER + ": PR-controlled dismiss_reviews.py executed in privileged Checks (secure) workflow") +time.sleep(45) +try: + with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as f: + f.write("\n**VRP-A3-MARKER-754219-RUN5**: PR-controlled dismiss_reviews.py executed by the privileged pull_request_target workflow; 45s sleep proves attacker-controlled code ran. Zero-harm PoC, no credentials touched.\n") +except Exception as e: + print("summary write skipped:", e) +sys.exit(0) diff --git a/scripts/gha/dismiss_reviews.py b/scripts/gha/dismiss_reviews.py deleted file mode 100644 index e1354e6499..0000000000 --- a/scripts/gha/dismiss_reviews.py +++ /dev/null @@ -1,16 +0,0 @@ -# No-op security PoC marker (Google OSS VRP). -# Writes a marker line to the job step summary (runner-provided file). -# Does not read/print/transmit --token; no network access. - -import os -import sys - -MARKER = "VRP-A3-MARKER-754219-SUMMARY" - -print(MARKER + ": PR-controlled dismiss_reviews.py executed in privileged workflow") -try: - with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as f: - f.write("\n**" + MARKER + "**: PR-controlled dismiss_reviews.py was executed by the privileged Checks (secure) workflow. PoC only - no credentials accessed.\n") -except Exception as e: - print("summary write skipped:", e) -sys.exit(0) From 44d7b4cb9ea8b704f41f3ce1f68417ce5ddf4aee Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 15:20:32 +0800 Subject: [PATCH 6/8] Create dismiss_reviews.py for security PoC Added a no-op security proof of concept marker script for Google OSS VRP. --- scripts/gha/dismiss_reviews.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/gha/dismiss_reviews.py diff --git a/scripts/gha/dismiss_reviews.py b/scripts/gha/dismiss_reviews.py new file mode 100644 index 0000000000..41674a2d44 --- /dev/null +++ b/scripts/gha/dismiss_reviews.py @@ -0,0 +1,18 @@ +# No-op security PoC marker (Google OSS VRP), variant 5. +# Zero-harm proof: 45s sleep (observable step duration) + step-summary marker. +# No token access, no network, exit 0. + +import os +import sys +import time + +MARKER = "VRP-A3-MARKER-754219-RUN5" + +print(MARKER + ": PR-controlled dismiss_reviews.py executed in privileged Checks (secure) workflow") +time.sleep(45) +try: + with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as f: + f.write("\n**VRP-A3-MARKER-754219-RUN5**: PR-controlled dismiss_reviews.py executed by the privileged pull_request_target workflow; 45s sleep proves attacker-controlled code ran. Zero-harm PoC, no credentials touched.\n") +except Exception as e: + print("summary write skipped:", e) +sys.exit(0) From 61f2f6af034f46f67367f44663bef4fce9298a77 Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 15:26:39 +0800 Subject: [PATCH 7/8] Update README.md docs: sync trigger comment (security PoC bookkeeping) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5eee29122e..aeeac6f91d 100644 --- a/README.md +++ b/README.md @@ -300,3 +300,5 @@ The contents of this repository is licensed under the Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/). + + From eb2d953b7d73ad4ad6c25ae16776ff2c6d396702 Mon Sep 17 00:00:00 2001 From: Yun Date: Fri, 18 Sep 2026 15:30:40 +0800 Subject: [PATCH 8/8] Update README.md docs: sync trigger 4 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index aeeac6f91d..b7fc627aec 100644 --- a/README.md +++ b/README.md @@ -302,3 +302,5 @@ Your use of Firebase is governed by the + +