You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ci): update Gemini model and harden update-skill against prompt injection - #991
Updates the Gemini model in .github/scripts/update_skill.py to default to gemini-3.8-flash and implements comprehensive hardening across .github/scripts/update_skill.py and .github/workflows/update-skill.yml to protect against indirect prompt injection and supply-chain tampering (referencing GHSA-8f2g-33j4-ghwg).
Background & Vulnerability
External pull requests or commit messages in release diffs can contain adversarial prompt directives. If ingested unescaped, an attacker could manipulate update_skill.py into injecting malicious instructions or compromised dependencies into .gemini/skills/android-maps-compose/SKILL.md.
Hardening Measures Applied
API Role Separation (system_instruction):
Uses Gemini API's top-level system_instruction parameter to isolate operational rules and security boundaries from untrusted diff content.
Input Fencing & Sanitization:
Encloses inputs inside <current_skill_file> and <untrusted_release_diff> XML blocks and sanitizes potential delimiter escape sequences.
Caps diff input length at 60k characters to prevent context exhaustion attacks.
Diff Scope Filtering:
Scopes git diff to code and build files only, explicitly excluding documentation (*.md, *.txt), images, and workflow files (.github/) where natural language injections typically hide.
dkhawk
changed the title
fix(ci): update Gemini model in update_skill script to gemini-3.5-flash
fix(ci): update Gemini model in update_skill script to gemini-3.8-flash
Sep 4, 2026
dkhawk
changed the title
fix(ci): update Gemini model in update_skill script to gemini-3.8-flash
fix(ci): update Gemini model and harden update-skill against prompt injection
Sep 8, 2026
The reason will be displayed to describe this comment to others. Learn more.
Just to understand it: do we need eval here? A bash array would keep the pathspecs quoted without re-parsing the whole line, something like DIFF_OPTS=(-- . ':(exclude)*.md' ':(exclude).github' ...) and then git diff "$PREVIOUS_TAG..$GITHUB_REF_NAME" "${DIFF_OPTS[@]}".
The reason will be displayed to describe this comment to others. Learn more.
nit: this passes as long as one anchor survives. Should we compare the counts instead, so dropping only some of the // x-release-please-version comments is also caught?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the Gemini model in
.github/scripts/update_skill.pyto default togemini-3.8-flashand implements comprehensive hardening across.github/scripts/update_skill.pyand.github/workflows/update-skill.ymlto protect against indirect prompt injection and supply-chain tampering (referencing GHSA-8f2g-33j4-ghwg).Background & Vulnerability
External pull requests or commit messages in release diffs can contain adversarial prompt directives. If ingested unescaped, an attacker could manipulate
update_skill.pyinto injecting malicious instructions or compromised dependencies into.gemini/skills/android-maps-compose/SKILL.md.Hardening Measures Applied
system_instruction):system_instructionparameter to isolate operational rules and security boundaries from untrusted diff content.<current_skill_file>and<untrusted_release_diff>XML blocks and sanitizes potential delimiter escape sequences.git diffto code and build files only, explicitly excluding documentation (*.md,*.txt), images, and workflow files (.github/) where natural language injections typically hide.validate_skill_content):// x-release-please-version).automergelabel so AI-generated skill updates always require maintainer approval.peter-evans/create-pull-requestto create draft PRs with required reviewers (LoyalAbbas,kikoso).googlemaps-bot@users.noreply.github.com.__pycache__/,*.py[cod]) to.gitignore.