feat(scan): add REQUIRE_SIGNED to forbid unsigned rules - #49
Open
joeymussalli wants to merge 1 commit into
Open
Conversation
trustabl verifies rules against an embedded trust keyring by default and exits 2 rather than running unverified rules. It also keeps an unsigned git path, and `--require-signed` exists specifically to forbid the fallback to it in CI. This plugin never offered that flag, while exposing two inputs that reach the unsigned path: RULES_REPO, exported unconditionally as TRUSTABL_RULES_REPO, and RULES_REF, which pins a git ref. Neither is wrong to use -- pinning a ref is a reasonable way to get reproducible scans -- but a security gate should be able to state the requirement rather than inherit whatever the default resolves to, and until now there was no way to say "never accept unsigned rules". docs/EVALUATION.md already tells readers that rules are "fetched at scan time from a signed channel". That is true of the tool's default, but nothing in this plugin held it to that, so the guarantee the documentation offers was not one a user could enforce. - REQUIRE_SIGNED=true adds --require-signed. Default false, so behaviour is unchanged for everyone who does not opt in. - Matched case-insensitively. Silently ignoring REQUIRE_SIGNED=TRUE would be a fail-open on the single input whose purpose is to tighten the gate. STRICT has the same case-sensitivity and is deliberately left alone: changing it is a behaviour change for existing users and belongs in its own PR. - Documented in a new "Rule integrity" section of the README, alongside what RULES_REPO and RULES_REF each mean for integrity, because those two are the reason the flag is worth having. Verified: the flag reaches BASE_ARGS for true/TRUE/True and is absent for unset/false/yes; STRICT's existing true/false/TRUE behaviour is byte-identical before and after. bash -n passes. No scan was run -- this changes which arguments are constructed, not what the scanner does with them.
joeymussalli
force-pushed
the
feat/require-signed-rules
branch
from
August 24, 2026 20:05
204a92e to
ab1ab9b
Compare
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.
trustabl verifies rules against an embedded trust keyring by default and exits 2 rather than running unverified rules. It also keeps an unsigned git path, and
--require-signedexists specifically to forbid the fallback to it in CI.This plugin never offered that flag, while exposing two inputs that reach the unsigned path: RULES_REPO, exported unconditionally as TRUSTABL_RULES_REPO, and RULES_REF, which pins a git ref. Neither is wrong to use -- pinning a ref is a reasonable way to get reproducible scans -- but a security gate should be able to state the requirement rather than inherit whatever the default resolves to, and until now there was no way to say "never accept unsigned rules".
docs/EVALUATION.md already tells readers that rules are "fetched at scan time from a signed channel". That is true of the tool's default, but nothing in this plugin held it to that, so the guarantee the documentation offers was not one a user could enforce.
Verified: the flag reaches BASE_ARGS for true/TRUE/True and is absent for unset/false/yes; STRICT's existing true/false/TRUE behaviour is byte-identical before and after. bash -n passes. No scan was run -- this changes which arguments are constructed, not what the scanner does with them.