Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
This report presents the forensic synthetic code analysis of carrierwaveuploader/carrierwave, a Ruby project with 8,779 GitHub stars. SynthScan v2.0 examined 20,804 lines of code across 101 source files, recording 123 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 6.5 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 123 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lib/carrierwave/mount.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/mount.rb | 21 | @uploaders ||= superclass.respond_to?(:uploaders) ? superclass.uploaders.dup : {} | COMMENT |
| LOW | lib/carrierwave/mount.rb | 41 | if uploader_options[column].has_key?(option) | COMMENT |
| LOW | lib/carrierwave/mount.rb | 61 | # | COMMENT |
| LOW | lib/carrierwave/mount.rb | 81 | # | COMMENT |
| LOW | lib/carrierwave/mount.rb | 101 | # | COMMENT |
| LOW | lib/carrierwave/mount.rb | 121 | # mount_uploader :csv | COMMENT |
| LOW | lib/carrierwave/mount.rb | 181 | def #{column}_processing_error | COMMENT |
| LOW | lib/carrierwave/mount.rb | 201 | # | COMMENT |
| LOW | lib/carrierwave/mount.rb | 221 | # [images_cache] Returns a string that identifies the cache location of the files | COMMENT |
| LOW | lib/carrierwave/mount.rb | 241 | # | COMMENT |
| LOW | lib/carrierwave/mount.rb | 261 | # end | COMMENT |
| LOW | lib/carrierwave/sanitized_file.rb | 81 | # Returns the full path to the file. If the file has no path, it will return nil. | COMMENT |
| LOW | lib/carrierwave/sanitized_file.rb | 181 | # Helper to move file to new path. | COMMENT |
| LOW | lib/carrierwave/sanitized_file.rb | 261 | # | COMMENT |
| LOW | lib/carrierwave/uploader.rb | 21 | COMMENT | |
| LOW | lib/carrierwave/compatibility/paperclip.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/compatibility/paperclip.rb | 21 | # | COMMENT |
| LOW | lib/carrierwave/uploader/dimension.rb | 21 | # def width_range | COMMENT |
| LOW | lib/carrierwave/uploader/processing.rb | 21 | # an array of arguments to call the method with. Also accepts an :if or :unless condition | COMMENT |
| LOW | lib/carrierwave/uploader/processing.rb | 41 | # def vignette | COMMENT |
| LOW | lib/carrierwave/uploader/mountable.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/uploader/mountable.rb | 21 | # | COMMENT |
| LOW | lib/carrierwave/uploader/versions.rb | 41 | # Regardless of what is set in the parent uploader, do not enforce the | COMMENT |
| LOW | lib/carrierwave/uploader/versions.rb | 121 | # [name (#to_sym)] name of the version | COMMENT |
| LOW | lib/carrierwave/uploader/versions.rb | 181 | end | COMMENT |
| LOW | lib/carrierwave/uploader/versions.rb | 241 | # When given a version name as a parameter, will return the url for that version | COMMENT |
| LOW | lib/carrierwave/uploader/extension_denylist.rb | 21 | # | COMMENT |
| LOW | lib/carrierwave/uploader/content_type_denylist.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/uploader/extension_allowlist.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/uploader/extension_allowlist.rb | 21 | # | COMMENT |
| LOW | lib/carrierwave/uploader/cache.rb | 61 | # | COMMENT |
| LOW | lib/carrierwave/uploader/cache.rb | 101 | # === Returns | COMMENT |
| LOW | lib/carrierwave/uploader/cache.rb | 161 | end | COMMENT |
| LOW | lib/carrierwave/uploader/cache.rb | 181 | end | COMMENT |
| LOW | lib/carrierwave/uploader/proxy.rb | 41 | ## | COMMENT |
| LOW | lib/carrierwave/uploader/proxy.rb | 61 | def temporary_identifier | COMMENT |
| LOW | lib/carrierwave/uploader/proxy.rb | 81 | # [Integer] size of the file | COMMENT |
| LOW | lib/carrierwave/uploader/configuration.rb | 61 | # Can be any class that implements a #store!(CarrierWave::SanitizedFile) and a #retrieve! | COMMENT |
| LOW | lib/carrierwave/uploader/configuration.rb | 101 | # Same as .storage except for required methods being #cache!(CarrierWave::SanitizedFile), | COMMENT |
| LOW | lib/carrierwave/uploader/content_type_allowlist.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/uploader/store.rb | 41 | # loaded correctly. | COMMENT |
| LOW | lib/carrierwave/uploader/store.rb | 61 | COMMENT | |
| LOW | lib/carrierwave/processing/vips.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 21 | # process :resize_to_fit => [200, 200] | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 41 | # end | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 81 | COMMENT | |
| LOW | lib/carrierwave/processing/vips.rb | 101 | # | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 121 | # [height (Integer)] the height to scale the image to | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 141 | # | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 161 | ## | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 181 | end | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 201 | # | COMMENT |
| LOW | lib/carrierwave/processing/vips.rb | 241 | COMMENT | |
| LOW | lib/carrierwave/processing/vips.rb | 261 | vips_image.height | COMMENT |
| LOW | lib/carrierwave/processing/rmagick.rb | 1 | module CarrierWave | COMMENT |
| LOW | lib/carrierwave/processing/rmagick.rb | 21 | # process :resize_to_fit => [200, 200] | COMMENT |
| LOW | lib/carrierwave/processing/rmagick.rb | 41 | # | COMMENT |
| LOW | lib/carrierwave/processing/rmagick.rb | 121 | # | COMMENT |
| LOW | lib/carrierwave/processing/rmagick.rb | 161 | COMMENT | |
| 42 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | spec/spec_helper.rb | 82 | def change_locale_and_store_translations(locale, translations, &block) | CODE |
| LOW | spec/spec_helper.rb | 97 | def change_and_enforce_available_locales(locale, available_locales, &block) | CODE |
| LOW | lib/carrierwave/sanitized_file.rb | 328 | def first_declared_content_type(content_type) | CODE |
| LOW | lib/carrierwave/compatibility/paperclip.rb | 98 | def interpolate_paperclip_path(path) | CODE |
| LOW | lib/carrierwave/uploader/store.rb | 150 | def show_warning_when_filename_is_unavailable(_) | CODE |
| LOW | lib/carrierwave/test/matchers.rb | 98 | def have_directory_permissions(expected) | CODE |
| LOW | lib/carrierwave/processing/rmagick.rb | 102 | def resize_to_geometry_string(geometry_string) | CODE |
| LOW | lib/carrierwave/processing/rmagick.rb | 256 | def resize_to_geometry_string(geometry_string) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | spec/spec_helper.rb | 53 | def stub_tempfile(filename, mime_type=nil, fake_name=nil) | CODE |
| LOW⚡ | spec/spec_helper.rb | 58 | allow(tempfile).to receive_messages(:original_filename => fake_name || filename, | CODE |
| LOW⚡ | spec/spec_helper.rb | 65 | def stub_stringio(filename, mime_type=nil, fake_name=nil) | CODE |
| LOW⚡ | spec/spec_helper.rb | 69 | :original_filename => filename || fake_name, | CODE |
| LOW⚡ | spec/spec_helper.rb | 74 | def stub_file(filename, mime_type=nil, fake_name=nil) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lib/carrierwave/compatibility/paperclip.rb | 20 | # This file contains code taken from Paperclip | COMMENT |
| MEDIUM | lib/carrierwave/uploader/versions.rb | 30 | # Define the enable_processing method for versions so they get the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lib/carrierwave/sanitized_file.rb | 12 | # It's probably needlessly comprehensive and complex. Help is appreciated. | COMMENT |
| LOW | lib/carrierwave/uploader/configuration.rb | 66 | # If no argument is given, it will simply return the currently used storage engine. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lib/carrierwave/uploader.rb | 33 | # Once you have an uploader you can use it in isolation: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lib/carrierwave/storage/fog.rb | 350 | # Check if the file exists on the remote service | COMMENT |
| LOW | lib/carrierwave/storage/fog.rb | 360 | # Write file to service | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lib/carrierwave/processing/mini_magick.rb | 269 | # NOTE: This method exists mostly for backwards compatibility, you should | COMMENT |