Open
Conversation
- Add least-privilege `permissions: contents: read` to ci.yml and ios-release.yml - Pass pulumi inputs via env vars in enterprise-deploy.yml to prevent shell injection from workflow_dispatch inputs
Semgrep Security ScanNo security issues found. |
PR Metrics
Updated Fri, 24 Apr 2026 20:37:39 GMT · run #1202 |
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.
Two hardening changes to close 6 CodeQL alerts on Actions workflows.
ci.yml/ios-release.yml— add top-levelpermissions: contents: readas least-privilege default. Pre-existing per-job permissions blocks (e.g. thetypescriptjob) are preserved and continue to override. Closes Improve Reasoning UX (Continued) #17, Collaborative Notes #18, Privacy Paradigm UI #19, Android Release #20.enterprise-deploy.yml— move${{ inputs.platform }}and${{ inputs.stack_name }}out ofrun:steps intoenv:vars (PLATFORM,STACK_NAME), referenced as"\$VAR"in the shell.inputs.stack_nameis a free-form string, so this is a genuine shell-injection fix;inputs.platformis a fixedchoice, patched too for CodeQL completeness. Closes Context Tagging #1, Chat Components #2.Test plan
python3 -c 'import yaml; yaml.safe_load(open(f))')Note
Medium Risk
Workflow permission tightening and changes to how user-provided inputs are passed into
run:steps could break CI/deploy execution if any job relied on implicit permissions or on unquoted input expansion. However, changes are scoped to workflow YAML and primarily reduce security risk (least privilege and shell-injection mitigation).Overview
Hardens GitHub Actions workflows by adding a top-level
permissions: contents: readdefault toci.ymlandios-release.yml, relying on existing per-job overrides where broader access is needed.Mitigates shell-injection risk in
enterprise-deploy.ymlby moving${{ inputs.platform }}and${{ inputs.stack_name }}out of inlinerun:commands intoenv(PLATFORM,STACK_NAME) and referencing them as quoted shell variables in Pulumi commands (includingpulumi stack output).Reviewed by Cursor Bugbot for commit de577b7. Bugbot is set up for automated code reviews on this repo. Configure here.