github steveukx/git-js @simple-git/argv-parser@3.1.0

latest release: simple-git@4.2.0
46 minutes ago

Minor Changes

  • e29548c: The unsafe actions checks now cover more of the options and configuration that make git run another program,
    each requiring allowUnsafeExec:

    • the --to-cmd, --cc-cmd, --header-cmd and --sendmail-cmd options of git send-email
    • the -x / --extcmd options of git difftool
    • the gc.recentObjectsHook configuration key

    Abbreviated forms of the send-email options (for example --to-cm) are covered in the same way, as git send-email
    reads its options with Perl's Getopt::Long and so isn't covered by the abbreviated options protection. When the recommended checks are enabled
    (unsafe.recommended: true or strict: true), configuration keys ending in hook are also caught by the
    catch-all rules under allowUnsafeCommandBinaries, alongside keys ending in .cmd or command.

  • 9688ea1: -c is now parsed per sub-command. It takes a key=value configuration value in the global position and takes
    a value for the sub-commands that define it that way (clone, commit, switch and notes). For every other
    sub-command it is a plain switch, matching git: grep -c is --count, log -c / diff -c / show -c
    select the combined diff format and ls-files -c is --cached.

    The token after a switch -c keeps its own meaning, so an option that follows it is analysed by the unsafe
    actions checks in the same way as anywhere else in the command. When that token reads as key=value it is
    also still reported as an inline configuration write.

  • 1476c27: When the recommended checks are enabled (unsafe.recommended: true or strict: true), options that write their
    output to a path named in the command require the new unsafe.allowUnsafeOutputPath option: --output=<file> on
    diff-family commands, format-patch and archive, format-patch -o / --output-directory and archive -o.
    With the default settings these options work as before, and calls that don't name an output path are unaffected.

    preventFlagBuilder rules in @simple-git/argv-parser can now report at the recommended level.

Don't miss a new git-js release

NewReleases is sending notifications on new releases.