Skip to content

Tighten the security reviewer and stop the Rails expert hanging on the console - #141

Draft
mattmenefee wants to merge 2 commits into
mainfrom
fix-security-and-rails-agent-docs
Draft

mattmenefee wants to merge 2 commits into
mainfrom
fix-security-and-rails-agent-docs

Conversation

@mattmenefee

Copy link
Copy Markdown
Owner

Summary

  • Security reviewer categories: category headings drop the OWASP Top 10:2021 numbers, which the 2025 edition reshuffled, so the agent no longer cites the wrong standards reference. A new Server-Side Request Forgery category covers outbound requests built from user input, including ones that reach internal or cloud metadata addresses.
  • Security reviewer report contract: every finding uses the same Location / Vulnerability / Risk / Remediation fields whatever its severity, and the approval statuses are now disjoint (NEEDS CHANGES means high issues and no critical ones; BLOCKED means one or more critical issues). Severity icons lead their headings, matching /doc-review.
  • Rails expert: debugging starts from bin/rails runner or a one-off script instead of the interactive Rails console, which hangs without a TTY. The agent now checks the app's Rails and Ruby versions before recommending version-gated features, as the PostgreSQL expert already does.

These come from a documentation review of the Claude configuration files. More fixes from that review, mostly in update-deps.md, may land on this branch before it leaves draft.

Test plan

  • Both agents' YAML frontmatter still parses (YAML.safe_load on the frontmatter block)
  • No OWASP A0x tags remain in security-reviewer.md, and no "Rails console effectively" instruction remains in ruby-on-rails-expert.md
  • New prose lines stay within 100 characters
  • Run the security-reviewer agent on a branch and confirm the report uses the four fields at every severity and emits exactly one approval status
  • Ask the ruby-on-rails-expert agent to debug something and confirm it reaches for bin/rails runner rather than the console

@mattmenefee mattmenefee self-assigned this Sep 17, 2026
The reviewer tagged its categories with OWASP Top 10:2021 numbers,
which the 2025 edition reshuffled, so it was attaching the wrong
standards reference to real findings. It also had no category for
server-side request forgery, a common class in Rails apps that fetch
user-supplied URLs for webhooks, link previews and file generators.

Its report format was underspecified in two ways that made output
drift between runs. Only critical issues were given the Location,
Vulnerability, Risk and Remediation fields, leaving it unclear whether
lower severities used them. And a single critical issue satisfied both
NEEDS CHANGES and BLOCKED, with nothing saying which to emit.

Category headings now carry names only, which do not go stale with
each edition, and an SSRF category covers outbound requests built from
user input, including those that reach internal or cloud metadata
addresses. Every finding uses the same four fields, the approval
statuses are disjoint so the most severe finding alone decides, and
the severity icons lead their headings to match /doc-review.
The agent told itself to "use Rails console effectively" when
debugging. Without a TTY the console waits for input that never
arrives, so following that instruction hangs the tool call, which the
global instructions already warn against.

It also listed version-gated features such as load_async, strict
loading and horizontal sharding with no reminder that a project may run
an older Rails, unlike the PostgreSQL expert, which checks the version
before recommending anything version-dependent.

Debugging now starts from bin/rails runner or a one-off script, and the
agent checks the app's Rails and Ruby versions before recommending a
version-gated feature.
@mattmenefee
mattmenefee force-pushed the fix-security-and-rails-agent-docs branch from ec43145 to e5b94ec Compare September 17, 2026 03:26
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