Skip to content

Initial commit - #1

Merged
alexevanczuk merged 1 commit into
mainfrom
ae-initial-commit
Jun 24, 2022
Merged

Initial commit#1
alexevanczuk merged 1 commit into
mainfrom
ae-initial-commit

Conversation

@alexevanczuk

Copy link
Copy Markdown
Contributor

No description provided.

@alexevanczuk
alexevanczuk merged commit 656b022 into main Jun 24, 2022
@alexevanczuk
alexevanczuk deleted the ae-initial-commit branch June 24, 2022 17:30
dduugg added a commit that referenced this pull request Aug 17, 2026
Adds explicit least-privilege GITHUB_TOKEN permissions to the three
reusable-workflow callers that had none (alerts #4, #2, #1), matching the
job-level style already used in ci.yml and codeql.yml:

- cd.yml -> contents: write. shared-config's cd.yml checks out with
  persisted credentials and runs discourse/publish-rubygems-action
  (rake release does a raw git push of the version tag) followed by
  gh release create, both of which need write access to contents.
- stale.yml -> issues: write + pull-requests: write. shared-config's
  stale.yml runs actions/stale, which comments on and closes both stale
  issues and stale pull requests.
- triage.yml -> issues: write. shared-config's triage.yml runs
  gh issue edit --add-label triage.

Fixes the two rb/shell-command-constructed-from-input alerts (#5, #6) in
Packs.check, where the caller-supplied file list was interpolated into a
single string handed to Kernel#system and therefore to /bin/sh. A path
containing a space, quote, semicolon or backtick would have been
re-interpreted by the shell.

Private.system_with now takes the argv array and splats it into system,
so the command is exec'd directly and never goes through a shell. All six
callers in lib/packs.rb and the two specs that stub the seam are updated.
The sig is params(argv: T::Array[String]); T.unsafe is needed only because
Sorbet cannot type-check a splat of statically unknown size.

srb tc, rspec (119 examples) and rubocop all pass; actionlint is clean on
the workflow files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant