sec (1/9): restrict user-defined scanner IDs to lowercase#25
Open
jesse-merhi wants to merge 3 commits into
Open
sec (1/9): restrict user-defined scanner IDs to lowercase#25jesse-merhi wants to merge 3 commits into
jesse-merhi wants to merge 3 commits into
Conversation
Scanner entries in a profile may now be objects declaring id, command,
env (required variable names), and targets. Custom scanners register
into a run-local registry and execute through the standard sandboxed
command path with {{target}} passed positionally to prevent shell
injection. Raw stdout is preserved as artifact evidence; env presence
is recorded as present/missing only.
Object-form scanner entries accept a nested gate with blockOnExitCode / warnOnExitCode (int, int list, or "nonzero"). The runner captures user-defined scanner exit codes, evaluates rules after all scanners complete, and records gate: pass|warn|block plus fired gateRules in the artifact. Rules referencing unrequested scanners fail before scanning. Abnormal termination (signal/timeout) never fires exit-code rules.
Scanner evidence is written to a file named after the scanner ID, and that name is lowercased. Allowing uppercase IDs let two case-distinct IDs (Foo and foo) pass validation yet collide on the same evidence file, silently overwriting each other. Restrict IDs to lowercase and cap length at 64 characters, since IDs are used as file names.
jesse-merhi
force-pushed
the
sec/01-lowercase-scanner-ids
branch
from
July 23, 2026 12:42
2039f49 to
bc6be59
Compare
This was referenced Jul 23, 2026
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: sec (1/9): restrict user-defined scanner IDs to lowercase This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
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.
What changes
A user-defined scanner ID from profile/config must now be lowercase
(
^[a-z0-9][a-z0-9_-]*$) and at most 64 characters. Mixed-case or oversizedIDs are rejected at config-resolution time, before any scanner runs.
Why it matters
Scanner IDs are used as map keys and as path/registry segments. Two IDs that
differ only by case (
Foovsfoo) can collide when case-folded, letting oneconfig entry silently shadow another entry or a built-in scanner such as
clawscan-static. A single canonical spelling removes that ambiguity; thelength cap stops an ID from being an unbounded string.
Before / after (runnable)
up.yml:Fooaccepted; can resolve alongsidefoo— collision possibleVerify