Skip to content

Arena/8806ed4e standards - #1331

Merged
hyperpolymath merged 2 commits into
mainfrom
arena/8806ed4e-standards
Oct 24, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
arena/8806ed4e-standards

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Closes #

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (would change existing behaviour)
  • 🕳️ Soundness fix (fixes a checker/proof false-negative)
  • 📖 Documentation
  • 🧹 Refactor / tech debt (behaviour-preserving)
  • ⚡ Performance
  • 🔧 Build / CI / tooling

How has this been verified?

Checklist

  • My commits are signed (git commit -S).
  • I ran the project's own checks/tests locally and they pass.
  • New files carry the correct SPDX-License-Identifier (code/config MPL-2.0,
    prose CC-BY-SA-4.0); I did not relicense existing files.
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole (or I have flagged where I might have).

Notes for reviewers

Arena Agent and others added 2 commits October 24, 2026 12:23
…code

CodeQL's actions suite (and Hypatia's WH001/WH012 equivalents) flag
attacker-influenced values spliced into shell bodies. Four workflow edits
bind them to env instead, so they reach the shell as data:

* changelog-reusable: github.ref_name (commit-back push, pr-back --base)
  and github.event.release.tag_name (release upload)
* debt-measure: github.ref_name (PR base)
* propagate-hooks: workflow_dispatch inputs (dry-run, target-repo)
* check-suite-monitor: check_suite / workflow_run payload fields

check-suite-monitor also carried a real defect: github.event.workflow is
the workflow OBJECT, not its name, so contains(github.event.workflow,
'GATE:') was permanently false and the GATE analysis never ran. Use
.name, and quote $GITHUB_OUTPUT writes so an embedded newline cannot
forge a second output line.

The K9 Kennel parser assigned document-supplied keys directly
(result[key] = ...), which lets a document rewrite the prototype of the
parsed map (CWE-915, CodeQL js/prototype-polluting-assignment). Reject
__proto__/constructor/prototype outright in both the generator and its
inline test copy, and assert it.

Finally, add .github/codeql/codeql-config.yml and point both analysis
jobs at it: 9-archive/** is a vendored provenance snapshot that this
repository does not build and whose fidelity forbids editing, so alerts
raised there are permanent noise (de-vendoring: #493). The reusable gains
an optional, empty-by-default config-file input, which the CodeQL Action
converts back to undefined - existing callers are unaffected.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This is the single unfiltered finding that has held
`governance / Validate Hypatia Baseline` red since 2026-10-23 07:05 —
the one required context on main that is currently failing.

`refuse_case` took its mutation as a shell string and ran it through
`eval`. Nothing untrusted ever reached it (every case is fixed text in
this file), but it is exactly the shape hypatia's `eval_in_shell` (and
CWE-95) exists to catch, and the string form breaks the moment a fixture
path gains a space or a quote.

Each mutator is now a function taking the consumer directory, so the
harness has no dynamic evaluation left. Behaviour is unchanged: the
suite passes identically before and after, including the cases whose
mutator must also move `NEW` (record-nowhere) or reuse an existing
helper (tiny, desync).

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T12:26:42.829324Z 412f607 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hyperpolymath
hyperpolymath enabled auto-merge (squash) October 24, 2026 12:25
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Input parsing now rejects unsafe property names, including when they appear within nested data, while continuing to accept ordinary keys.
    • Automated workflow checks now handle event details and branch information more reliably.
  • Improvements
    • Code analysis now skips archived content.
    • Automated release and maintenance workflows have improved handling of branch names, release tags, and repository selections.
    • Pin validation now checks additional cases involving short or inconsistent pins.

The pull request updates workflow input handling, adds CodeQL configuration support, rejects prototype-related parser keys, and changes the standards-pin regression harness to use named mutator functions.

Changes: Workflow value handling

Layer / File(s) Summary
Branch and release values
.github/workflows/changelog-reusable.yml, .github/workflows/debt-measure.yml
Changelog and debt-measure steps use environment variables for branch and release-tag values in shell commands and pull-request operations.
Check-suite and workflow-run values
.github/workflows/check-suite-monitor.yml
The workflow passes event fields through environment variables, quotes output paths, and checks the workflow name for the GATE prefix.
Hook dispatch inputs
.github/workflows/propagate-hooks.yml
The workflow reads dry-run and target-repository inputs from environment variables.

CodeQL configuration

Layer / File(s) Summary
Configuration input and job wiring
.github/codeql/codeql-config.yml, .github/workflows/codeql-reusable.yml, .github/workflows/codeql.yml
The repository adds a CodeQL configuration that ignores 9-archive/**. The reusable workflow accepts a configuration-file input, which both CodeQL jobs now set.

Parser key rejection

Layer / File(s) Summary
Forbidden-key validation
2-protocols/k9-coordination/generator/generate.js, 2-protocols/k9-coordination/generator/generate_test.js
The parser rejects __proto__, constructor and prototype. Tests cover nested and top-level rejection, an ordinary key, and the state of Object.prototype.polluted.

Standards-pin test harness

Layer / File(s) Summary
Refusal-case mutations
scripts/tests/relock-standards-pin-test.sh
The refusal cases pass named mutator functions instead of command strings evaluated with eval. Existing refusal checks remain.

Priority: Not assessed

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Possibly related issues

  • hyperpolymath/reposystem issue 319: The pull request updates the standards-pin relock regression harness and tests related lock-validation behaviour, but does not implement the estate-wide repairs described by the issue.
Merge Risk: Moderate · up to 412f6

The security hardening mostly lands as intended, but the check-suite monitor still lets a crafted workflow name from a fork reach a shell script in two later steps. Move that value into env in both steps before merging. The new prototype-key test also runs against a copy of the parser, so it will not catch a regression in the real one.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

DEED–K9 green

🟢 conformant · commit 412f60791b70 · run 40093868603

Category Status Pass Fail Indeterminate N/A Since previous revision
DEED syntax 🟢 conformant 4 0 0 0 — no comparable baseline
K9 contract typecheck 🟢 conformant 1 0 0 0 — no comparable baseline
K9 validator self-test 🟢 conformant 49 0 0 0 — no comparable baseline
K9 positive/negative controls 🟢 conformant 27 0 0 0 — no comparable baseline
K9 live corpus (L0–L2) 🟢 conformant 12 0 0 2 — no comparable baseline
K9 live corpus (L0–L2): 2 finding(s) / scope notes
  • 2-protocols/k9-coordination/examples/minimal.k9 — not_applicable: Routed to another dialect; not validated as a K9 contract.
  • coordination.k9 — not_applicable: Routed to another dialect; not validated as a K9 contract.

Scope: DEED syntax and K9 contracts L0–L2. L3 signature verification and routed coordination dialects are not certified. Green is limited to this scope. Orange is missing evidence; grey is an explicit scope exclusion. Logs and report.json are in the dated conformance-evidence artifact on the linked run.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
10.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@hyperpolymath
hyperpolymath merged commit 75168de into main Oct 24, 2026
67 of 70 checks passed
@hyperpolymath
hyperpolymath deleted the arena/8806ed4e-standards branch October 24, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant