AI Slop Code RIsk Monitor

sinatra/sinatra

Classy web-development dressed in a DSL (official / canonical repo)

6.0 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for sinatra/sinatra, a Ruby project with 12,453 GitHub stars. SynthScan examined 30,319 lines of code across 172 source files, recording 146 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 6.0 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

6.0
Adjusted Signal
6.0
Raw Pattern Score
100%
Time Factor
2026-07-20
Last Push
12.5K
Stars
Ruby
Language
30.3K
Lines of Code
172
Files
146
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 25.6/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 143 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.5/100 · LOW

Are imports declared and package/API names verified? 3 finding(s).

Agent Over-Engineering Ratio 0.5/100 · LOW

Are wrappers, guards, and repeated structures necessary? 3 finding(s).

PR Review Velocity Impact 25.7/100 · MEDIUM

Which changes need focused human review? 146 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 0MEDIUM 17LOW 129

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 146 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block119 hits · 119 pts
SeverityFileLineSnippetContext
LOWtest/contest.rb1# Copyright (c) 2009 Damian Janowski and Michel Martens for CitrusbyteCOMMENT
LOWtest/views/hello.md1# Hello From MarkdownCOMMENT
LOWrack-protection/spec/spec_helper.rb1# frozen_string_literal: trueCOMMENT
LOWrack-protection/spec/spec_helper.rb21# The `.rspec` file also contains a few flags that are not defaults but thatCOMMENT
LOWrack-protection/spec/spec_helper.rb41 # Use the documentation formatter for detailed output,COMMENT
LOWrack-protection/spec/spec_helper.rb61 # as the one that triggered the failure.COMMENT
LOWrack-protection/lib/rack/protection/base.rb1# frozen_string_literal: trueCOMMENT
LOWrack-protection/lib/rack/protection/base.rb21 # [<tt>:message</tt>] - if set, this is the message sent when a request is rejected via <tt>deny</tt>.COMMENT
LOWrack-protection/lib/rack/protection/json_csrf.rb1# frozen_string_literal: trueCOMMENT
LOWrack-protection/lib/rack/protection/cookie_tossing.rb1# frozen_string_literal: trueCOMMENT
LOWrack-protection/lib/rack/protection/escaped_params.rb21 #COMMENT
LOWrack-protection/lib/rack/protection/escaped_params.rb41 # To avoid this, include the {<tt>escape_utils</tt>}[https://rubygems.org/gems/escape_utils]COMMENT
LOWrack-protection/lib/rack/protection/referrer_policy.rb1# frozen_string_literal: trueCOMMENT
LOWrack-protection/lib/rack/protection/frame_options.rb1# frozen_string_literal: trueCOMMENT
LOWrack-protection/lib/rack/protection/frame_options.rb21 # {frame-ancestors directive}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-PCOMMENT
LOWrack-protection/lib/rack/protection/http_origin.rb1# frozen_string_literal: trueCOMMENT
LOWrack-protection/lib/rack/protection/http_origin.rb21 #COMMENT
LOW…k-protection/lib/rack/protection/authenticity_token.rb1# frozen_string_literal: trueCOMMENT
LOW…k-protection/lib/rack/protection/authenticity_token.rb21 #COMMENT
LOW…k-protection/lib/rack/protection/authenticity_token.rb41 #COMMENT
LOW…k-protection/lib/rack/protection/authenticity_token.rb61 # use Rack::Session::Cookie, secret: 'CHANGEMEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'COMMENT
LOW…k-protection/lib/rack/protection/authenticity_token.rb81 # <h1>With Authenticity Token</h1>COMMENT
LOWrack-protection/lib/rack/protection/strict_transport.rb1# frozen_string_literal: trueCOMMENT
LOW…tection/lib/rack/protection/content_security_policy.rb1# frozen_string_literal: trueCOMMENT
LOW…tection/lib/rack/protection/content_security_policy.rb21 # More info:: * W3C CSP Level 1 : https://www.w3.org/TR/CSP1/ (deprecated)COMMENT
LOW…tection/lib/rack/protection/content_security_policy.rb41 # <tt>:report_to</tt> option. If you *do* set <tt>:report_to</tt>, you must COMMENT
LOWrack-protection/lib/rack/protection/form_token.rb1# frozen_string_literal: trueCOMMENT
LOW…k-protection/lib/rack/protection/host_authorization.rb1# frozen_string_literal: trueCOMMENT
LOW…k-protection/lib/rack/protection/host_authorization.rb21 # [<tt>:permitted_hosts</tt>] an Array of hosts to allow. Elements can be as follows:COMMENT
LOWsinatra-contrib/spec/spec_helper.rb1ENV['RACK_ENV'] = 'test'COMMENT
LOWsinatra-contrib/spec/spec_helper.rb21 # The settings below are suggested to provide a good initial experienceCOMMENT
LOWsinatra-contrib/spec/spec_helper.rb41COMMENT
LOWsinatra-contrib/spec/spec_helper.rb61 # assertions if you prefer.COMMENT
LOWsinatra-contrib/spec/reloader_spec.rb21 endCOMMENT
LOWsinatra-contrib/spec/okjson.rb1# Copyright 2011 Keith RarickCOMMENT
LOWsinatra-contrib/spec/okjson.rb21# See https://github.com/kr/okjson for updates.COMMENT
LOWsinatra-contrib/spec/okjson.rb181 endCOMMENT
LOWsinatra-contrib/lib/sinatra/json.rb1# frozen_string_literal: trueCOMMENT
LOWsinatra-contrib/lib/sinatra/json.rb21 # get '/' doCOMMENT
LOWsinatra-contrib/lib/sinatra/json.rb41 #COMMENT
LOWsinatra-contrib/lib/sinatra/json.rb61 # set :json_encoder, WhateverCOMMENT
LOWsinatra-contrib/lib/sinatra/respond_with.rb1# frozen_string_literal: trueCOMMENT
LOWsinatra-contrib/lib/sinatra/respond_with.rb21 # halt haml(:index, :locals => data)COMMENT
LOWsinatra-contrib/lib/sinatra/respond_with.rb41 #COMMENT
LOWsinatra-contrib/lib/sinatra/respond_with.rb61 #COMMENT
LOWsinatra-contrib/lib/sinatra/test_helpers.rb21COMMENT
LOWsinatra-contrib/lib/sinatra/test_helpers.rb41 # @return [Integer] HTTP status of the last responseCOMMENT
LOWsinatra-contrib/lib/sinatra/test_helpers.rb61 # @!scope classCOMMENT
LOWsinatra-contrib/lib/sinatra/test_helpers.rb81 # @!scope classCOMMENT
LOWsinatra-contrib/lib/sinatra/test_helpers.rb101 def_delegators :current_session, :env_forCOMMENT
LOWsinatra-contrib/lib/sinatra/test_helpers.rb141COMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb1# frozen_string_literal: trueCOMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb21 #COMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb41 # or both:COMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb61 # it. For instance, lets define a before filter to prevent the access ofCOMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb81 # Well, they actually also affect the nested namespaces:COMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb101 #COMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb121 # endCOMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb141 # an extension. This includes defining the `registered(app)` method in theCOMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb161 # endCOMMENT
59 more matches not shown…
Self-Referential Comments9 hits · 27 pts
SeverityFileLineSnippetContext
MEDIUMsinatra-contrib/lib/sinatra/namespace.rb148 # module Routes # Define a new "Routes" moduleCOMMENT
MEDIUMlib/sinatra/base.rb1397 # Define a custom error handler. Optionally takes either an ExceptionCOMMENT
MEDIUMlib/sinatra/base.rb1413 # Define a named template. The block must return the template source.COMMENT
MEDIUMlib/sinatra/base.rb1419 # Define the layout template. The block must return the template source.COMMENT
MEDIUMlib/sinatra/base.rb1483 # Define a before filter; runs before all requests within the sameCOMMENT
MEDIUMlib/sinatra/base.rb1490 # Define an after filter; runs after all requests within the sameCOMMENT
MEDIUMlib/sinatra/base.rb1656 # Create a new instance without middleware in front of it.COMMENT
MEDIUMlib/sinatra/base.rb1659 # Create a new instance of the class fronted by its middlewareCOMMENT
MEDIUMlib/sinatra/base.rb2152 # Create a new Sinatra application; the block is evaluated in the class scope.COMMENT
Slop Phrases8 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMrack-protection/spec/spec_helper.rb27 # with RSpec, but feel free to customize to your heart's content.COMMENT
MEDIUMsinatra-contrib/spec/spec_helper.rb22 # with RSpec, but feel free to customize to your heart's content.COMMENT
MEDIUMsinatra-contrib/lib/sinatra/namespace.rb17 # Once you have loaded the extension (see below), you can use the +namespace+COMMENT
LOWsinatra-contrib/lib/sinatra/namespace.rb182 # Zomg::App.run! # Don't forget to start your app ;)COMMENT
MEDIUMsinatra-contrib/lib/sinatra/extension.rb11 # module. This means you can use +get+ to define a route, +before+COMMENT
MEDIUMsinatra-contrib/lib/sinatra/haml_helpers.rb18 # # now you can use the helpers in your viewsCOMMENT
LOWsinatra-contrib/lib/sinatra/runner.rb39 # **Don't forget to override #app_file specific to your application!**COMMENT
MEDIUMsinatra-contrib/lib/sinatra/webdav.rb18 # # Now you can use any WebDAV verb:COMMENT
AI Slop Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUM…k-protection/lib/rack/protection/authenticity_token.rb191 # Essentially the inverse of +mask_token+.COMMENT
MEDIUM…tection/lib/rack/protection/content_security_policy.rb36 # section for CSP usage examples and best practices.COMMENT
LOWsinatra-contrib/lib/sinatra/json.rb63 # To force +json+ to simply call +to_json+ on the object:COMMENT
Fake / Example Data3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtest/compile_test.rb60 parses "/:foo/:bar", "/user@example.com/name", "foo" => "user@example.com", "bar" => "name"CODE
LOWtest/routing_test.rb488 assert_equal 'user@example.com', bodyCODE
LOWtest/routing_test.rb557 assert_equal "John Doe", bodyCODE
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippetContext
LOW…k-protection/lib/rack/protection/authenticity_token.rb213 def compare_with_global_token(token, session)CODE
LOW…k-protection/lib/rack/protection/authenticity_token.rb217 def compare_with_per_form_token(token, session, request)CODE
LOWsinatra-contrib/lib/sinatra/streaming.rb208 def enum_not_open_for_reading(*)CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsinatra-contrib/lib/sinatra/content_for.rb138 # Check if a block of content with the given key was defined. ForCOMMENT