fix(security): close gh permission gaps in settings.json#89
Merged
Conversation
Split from apache#88 per review. - gh auth token / gh auth refresh -> permissions.deny. gh auth token prints the GitHub token to stdout with no prompt, so any injection that reaches Bash can capture and exfil it via the already-allowlisted api.github.com. - gh workflow run -> permissions.ask. - gh api --method / gh api --input (flag-first variants) added alongside the existing gh api * --method * patterns so argument ordering can't sidestep the match.
andrew
added a commit
to andrew/airflow-steward
that referenced
this pull request
May 7, 2026
…file recipe The printf '%s' "<x>" recipe introduced in apache#81 still passes the attacker-controlled string through a double-quoted shell argument, so $(...), backticks and $VAR expand before printf runs. Replace with an instruction to use the Write tool to land the bytes on disk without shell tokenisation, then -F field=@file as before. Applied at all six recipe sites across the three import skills and at Patterns 1 and 3 of the write-skill checklist so future skills inherit the corrected form. settings.json permission additions split to apache#89 per review.
potiuk
pushed a commit
that referenced
this pull request
May 7, 2026
…ecipe (#88) The printf '%s' "<x>" recipe introduced in #81 still passes the attacker-controlled string through a double-quoted shell argument, so $(...), backticks and $VAR expand before printf runs. Replace with an instruction to use the Write tool to land the bytes on disk without shell tokenisation, then -F field=@file as before. Applied at all six recipe sites across the three import skills and at Patterns 1 and 3 of the write-skill checklist so future skills inherit the corrected form. settings.json permission additions split to #89 per review.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Split from #88 per review.
gh auth tokenandgh auth refreshare added topermissions.deny.gh auth tokenprints the GitHub token to stdout with no prompt, so any injection that reaches Bash can capture it and exfil via the already-allowlistedapi.github.com. No skill in the repo needs either command.gh workflow run *is added topermissions.askso an injected agent can't trigger arbitrary upstream workflows without a confirmation prompt.Flag-first variants
gh api --method *andgh api --input *are added alongside the existinggh api * --method */gh api * --input *patterns. With the flag before the endpoint path the existing patterns may not match, depending on whether the glob*matches the empty string.