From: Simon Marchi <simark@simark.ca>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [pre-commit] Add shellcheck
Date: Thu, 18 Jun 2026 13:05:03 -0400 [thread overview]
Message-ID: <df9aae52-cd3c-46fd-b9c8-bffdf131ad0d@simark.ca> (raw)
In-Reply-To: <20260618151957.76500-1-tdevries@suse.de>
On 2026-06-18 11:19, Tom de Vries wrote:
> I found a pure python implementation of shellcheck [1].
>
> Use it to run shellcheck on scripts in the repo.
>
> Exclude any scripts that are not currently clean.
>
> Running it seems reasonably fast:
> ...
> $ pre-commit run shellcheck --all-files -v
> shellcheck...............................................................Passed
> - hook id: shellcheck
> - duration: 0.06s
> ...
>
> For information on other solutions, see this RFC [2].
>
> [1] https://pypi.org/project/pureshellcheck/0.2.2/
> [2] https://sourceware.org/pipermail/gdb-patches/2024-November/213400.html
While I'm sympathetic to the use of pre-commit (I added the first
hooks), I'm starting to get a bit worried that we kind of blindly pull
hooks from random places without paying much attention. This is going
to get executed on the machines of many GDB devs, and probably some CI
too.
I had this thought because this one has the "random project on github
vibes" (it appears to be a vibe coded project started a week ago). More
established projects (like black) are not immune to being compromised,
but they are easier to trust I guess.
Assuming you gave a quick look at the code of this project and judge
that it's fine, how can we ensure that whatever pre-commit pulls is what
you reviewed? We use a git tag, but is that sufficient? Could a
(malicious or compromised) project publish a tag, and then replaced that
tag with something else later?
An alternative could be to point to a specific commit hash. A more
radical alternative would be to vendor (put in our repo) the code of the
hooks we use.
I'd like to hear your thoughts on this.
Simon
next prev parent reply other threads:[~2026-06-18 17:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 15:19 Tom de Vries
2026-06-18 17:05 ` Simon Marchi [this message]
2026-06-19 11:19 ` Tom de Vries
2026-06-19 17:56 ` Simon Marchi
2026-06-22 8:58 ` Tom de Vries
2026-06-22 5:48 ` Thiago Jung Bauermann
2026-06-22 10:02 ` Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df9aae52-cd3c-46fd-b9c8-bffdf131ad0d@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox