Skip to content

Update readme CLI examples - #2

Closed
bpatram wants to merge 1 commit into
rubyatscale:mainfrom
bpatram:patch-1
Closed

Update readme CLI examples#2
bpatram wants to merge 1 commit into
rubyatscale:mainfrom
bpatram:patch-1

Conversation

@bpatram

@bpatram bpatram commented Jul 19, 2022

Copy link
Copy Markdown

Changes

  • Corrects CLI examples in readme to use use_packwerk commands

## Changes
- Corrects CLI examples in readme to use  `use_packwerk` commands
@alexevanczuk

Copy link
Copy Markdown
Contributor

@bpatram Thank you for this contribution! I'm sorry I didn't see it earlier – my watch settings were off. As it turns out I also found this and made the same change. Thank you!!

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.

2 participants