📮 A fully featured open source mail delivery platform for incoming & outgoing e-mail
This report presents the forensic synthetic code analysis of postalserver/postal, a Ruby project with 16,671 GitHub stars. SynthScan v2.0 examined 28,533 lines of code across 365 source files, recording 126 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 5.4 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).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
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 126 distinct pattern matches across 5 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 | .rubocop.yml | 21 | # There should always be empty lines inside a class. For example | COMMENT |
| LOW | .rubocop.yml | 101 | Lint/BooleanSymbol: | COMMENT |
| LOW | app/models/user_invite.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/organization_user.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/track_domain.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/credential.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/smtp_endpoint.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/ip_address.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/ip_pool_rule.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/address_endpoint.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/http_endpoint.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/webhook_event.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/worker_role.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/organization.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/route.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/queued_message.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/webhook.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/ip_pool.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/webhook_request.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/domain.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/domain.rb | 21 | # dkim_error :string(255) | COMMENT |
| LOW | app/models/organization_ip_pool.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/scheduled_task.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/server.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/server.rb | 21 | # send_limit :integer | COMMENT |
| LOW | app/models/user.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/additional_route_endpoint.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/models/concerns/has_locking.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/senders/smtp_sender.rb | 161 | # Return an array of server hostnames which should receive this message | COMMENT |
| LOW | app/lib/worker/process.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/controllers/legacy_api/messages_controller.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/controllers/legacy_api/base_controller.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | app/controllers/legacy_api/send_controller.rb | 21 | # | COMMENT |
| LOW | app/assets/config/manifest.js | 1 | //= link_tree ../images | COMMENT |
| LOW | config/locales/en.yml | 1 | # Files in the config/locales directory are used for internationalization | COMMENT |
| LOW | config/environments/production.rb | 21 | config.public_file_server.enabled = true | COMMENT |
| LOW | config/environments/development.rb | 41 | COMMENT | |
| LOW | config/initializers/application_controller_renderer.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/backtrace_silencers.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/mime_types.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/wrap_parameters.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/assets.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/permissions_policy.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/content_security_policy.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/content_security_policy.rb | 21 | # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } | COMMENT |
| LOW | config/initializers/inflections.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 21 | # Changing this default means invalidate all encrypted messages generated by | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 41 | # and asynchronous queries will then be enabled. | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 61 | # regardless of whether they have a default or not. | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 81 | # | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 101 | # and you have no plans to rollback. | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 121 | # | COMMENT |
| LOW | config/initializers/new_framework_defaults_7_0.rb | 141 | # See https://guides.rubyonrails.org/configuring.html#config-active-support-disable-to-s-conversion for more information | COMMENT |
| LOW | spec/models/server_spec.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | spec/models/server_spec.rb | 21 | # send_limit :integer | COMMENT |
| LOW | spec/models/queued_message_spec.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | spec/models/organization_spec.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | spec/models/domain_spec.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | spec/models/domain_spec.rb | 21 | # spf_error :string(255) | COMMENT |
| 25 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | app/senders/smtp_sender.rb | 212 | # Create a new result object | COMMENT |
| MEDIUM | app/lib/smtp_server/server.rb | 102 | # Create a hash to contain a buffer for each client. | COMMENT |
| MEDIUM | config/initializers/wrap_parameters.rb | 5 | # This file contains settings for ActionController::ParamsWrapper which | COMMENT |
| MEDIUM | config/initializers/permissions_policy.rb | 2 | # Define an application-wide HTTP permissions policy. For further | COMMENT |
| MEDIUM | config/initializers/content_security_policy.rb | 4 | # Define an application-wide content security policy. | COMMENT |
| MEDIUM | lib/postal/signer.rb | 7 | # Create a new Signer | COMMENT |
| MEDIUM | lib/postal/message_db/provisioner.rb | 55 | # Create a new table | COMMENT |
| MEDIUM | lib/postal/message_db/message.rb | 351 | # Create a new item in the message queue for this message | COMMENT |
| MEDIUM | lib/postal/message_db/message.rb | 487 | # Create a new link | COMMENT |
| MEDIUM | lib/postal/message_db/database.rb | 62 | # Create a new message with the given attributes. This won't be saved to the database | COMMENT |
| MEDIUM | db/schema.rb | 1 | # This file is auto-generated from the current state of the database. Instead | COMMENT |
| MEDIUM | db/schema.rb | 5 | # This file is the source Rails uses to define your schema when running `bin/rails | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | app/util/has_prometheus_metrics.rb | 5 | def register_prometheus_counter(name, **kwargs) | CODE |
| LOW⚡ | app/util/has_prometheus_metrics.rb | 10 | def register_prometheus_histogram(name, **kwargs) | CODE |
| LOW⚡ | app/util/has_prometheus_metrics.rb | 15 | def increment_prometheus_counter(name, labels: {}) | CODE |
| LOW⚡ | app/util/has_prometheus_metrics.rb | 22 | def observe_prometheus_histogram(name, time, labels: {}) | CODE |
| LOW | app/mailers/app_mailer.rb | 18 | def server_send_limit_approaching(server) | CODE |
| LOW | app/mailers/app_mailer.rb | 23 | def server_send_limit_exceeded(server) | CODE |
| LOW | app/models/server.rb | 223 | def authenticated_domain_for_address(address) | CODE |
| LOW | app/models/server.rb | 251 | def find_authenticated_domain_from_headers(headers) | CODE |
| LOW | app/models/concerns/has_authentication.rb | 29 | def authenticate_with_previous_password_first(unencrypted_password) | CODE |
| LOW | app/senders/smtp_sender.rb | 87 | def send_message_to_smtp_client(raw_message, mail_from, rcpt_to, retry_on_connection_error: true) | CODE |
| LOW | app/senders/smtp_sender.rb | 139 | def determine_mail_from_for_message(message) | CODE |
| LOW | app/senders/smtp_sender.rb | 155 | def determine_rcpt_to_for_message(message) | CODE |
| LOW | app/controllers/application_controller.rb | 50 | def redirect_to_with_return_to(url, *args) | CODE |
| LOW | app/helpers/application_helper.rb | 28 | def domain_options_for_select(server, selected_domain = nil, options = {}) | CODE |
| LOW | app/helpers/application_helper.rb | 53 | def endpoint_options_for_select(server, selected_value = nil, options = {}) | CODE |
| LOW | spec/helpers/general_helpers.rb | 5 | def create_plain_text_message(server, text, to = "test@example.com", override_attributes = {}) | CODE |
| LOW | lib/tracking_middleware.rb | 61 | def dispatch_redirect_request(request, server_token, link_token) | CODE |
| LOW | lib/tracking_middleware.rb | 101 | def get_message_db_from_server_token(token) | CODE |
| LOW | lib/postal/config_schema.rb | 604 | def substitute_config_file_root(string) | CODE |
| LOW | lib/postal/config.rb | 144 | def change_database_connection_pool_size(new_size) | CODE |
| LOW | lib/postal/message_db/provisioner.rb | 114 | def remove_raw_tables_older_than(max_age = 30) | CODE |
| LOW | lib/postal/message_db/provisioner.rb | 147 | def remove_raw_tables_until_less_than_size(size) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | app/lib/smtp_server/server.rb | 171 | # Increment prometheus | COMMENT |
| LOW | config/environments/production.rb | 58 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. | COMMENT |
| LOW | lib/postal/message_db/message.rb | 529 | # Return the result | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spec/models/domain_spec.rb | 210 | "admin@example.com", | CODE |
| LOW | spec/models/user_spec.rb | 95 | expect(user.name).to eq "John Doe" | CODE |
| LOW | spec/factories/organization_factory.rb | 28 | name { "Acme Inc" } | CODE |
| LOW | spec/lib/smtp_server/client/data_spec.rb | 64 | expect(client.headers["from"]).to eq ["test@test.com"] | CODE |