Repository navigation
SonarCloud: the pattern that reads a workflow's environment is held linear (#360, #359, #361) - #495
Conversation
…inear (#360, #359, #361) S8786 reads the blanks before the value as overlapping it. They cannot backtrack: an attempt starts at a line's start and ends in a repeat that matches to the line's end. A test holds that with the schemas' own guard, now given the text a pattern opens with, and a mutant breaks it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… and the name line is probed CodeQL raised the test's own control, a nested repeat written to show the guard notices one. It is gone: as for the schemas' patterns, the mutants show that. The guard takes the compiled pattern, so it reads WORKFLOW's own flags, and it now probes the mapping's `name:` line too, with a mutant for that branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|



SonarCloud's three audit issues, each finding taken in turn. One is open in SonarCloud today, and it is a false positive: this PR holds it with a test and a mutant and marks it inline. The rest were settled by #451 and #453, which merged on 2026-10-31, and SonarCloud closed them the same day. The audit issues were left open because the audit has not updated them since.
tools/jsonschema_lite.pyrelease/current.pyfixture(#359)tools/check_trials.py[[for[, 43 (#361)tools/context_eval.sh,tools/trial_as_app.shsonar-project.properties, as the Builder ruled. Both are bash and every[quotes its operands, so[[would not change behaviourtools/environments_drift.py:25S8786. SonarCloud reads the blanks before
WORKFLOW's value as overlapping the value, so it expects backtracking. None happens:environment:, the pattern ends in([^\n]*)$, which matches to the line's end whatever came before it, so nothing after the colon can fail and backtrack.Measured: 16,000 adversarial characters take at most 1.2 ms. The input is this repo's own workflow files, read at the Maintainer's terminal.
The change:
Validator.backtracks) can now be given a compiled pattern, whose flags it keeps, and the text a pattern opens with where that text sits behind a class, so it reaches the repeats behindenvironment:;WORKFLOWto that guard on four openings: the value's line, and the mapping form'sname:line;name:line's, and the test kills both. As for the schemas' patterns, no pattern that backtracks is written in the test, since that would be CodeQL's alert;# NOSONARwith its reason in the comment above, following SonarCloud: the schema patterns are held to a limit, one finding fixed and two declined (#360, #359) #451's precedent and the issues' own acceptance ("no blanket NOSONAR unless a confirmed false positive, noted inline").Not touched:
kernel/.Closes #359
Closes #360
Closes #361
Reviews
Four reads at 24ac81e, all applied in 5d1377a:
name:line, and a nested repeat there survives; info PR-1: the issues closed do not name S8786name:line is probed, with its own mutant. The info item is already disclosed aboveflagsparameter has no test that fails without it; minor PR-3: the test writesre.Minstead of reading WORKFLOW's flags, and skips thename:lineWORKFLOWcompiled, with its own flagsname:line is unprobed (same as Claude's)tests/test_tools.py:10366🤖 Generated with Claude Code