SAMPLE — Ship-Ready Review Report
SAMPLE ONLY. This report was produced against the public training application OWASP RailsGoat (commit
f5951f13089d85c979de09e7da3c8c0fb982f94a) to demonstrate the Ship-Ready Review format. It is not a review of a real client. Do not treat RailsGoat as a production app; it is intentionally vulnerable.
Client: SAMPLE — OWASP RailsGoat (public test app)
Engagement: OTR-SAMPLE-2026-001 · Tier: Full Review (sample)
Date: 2026-10-20 (America/Denver)
Reviewer: Bruce Hansen, Off The Rails Software Consulting (offtherails.pro)
Source reviewed: OWASP/railsgoat @ f5951f13089d85c979de09e7da3c8c0fb982f94a (clean worktree)
Disclaimer — read this first
This is a point-in-time engineering review, not a guarantee. It reflects the source as of the commit and date above.
This is not a penetration test, a compliance audit, or a certification. It is not a SOC 2, ISO 27001, HIPAA, PCI DSS or similar assessment. Bruce Hansen is a senior software engineer (10 years, Rails + React + AI systems), not a credentialed security assessor. Every finding below is something he personally verified and can explain and reproduce.
Nothing in this report is legal advice. Remediation remains the client's responsibility.
1. Executive summary
RailsGoat is a deliberately vulnerable Rails 8 app used for training. Running the Ship-Ready Review process against it is a useful end-to-end demonstration: trusted, industry-standard tools, a manual code review, hands-on reproduction with dummy data, and human verification.
In this sample run we confirmed 8 issues that a real client would need to fix before launch, plus 1 item left in "needs validation" (download path traversal — source looks wrong, but we did not boot the HTTP stack to watch send_file return a sensitive file), and 1 rejected scanner lead (vendored eval in a syntax-highlighting library).
The pattern is the same one we see in small and AI-built apps: broken access control and unsafe handling of user input, with secrets and weak password storage close behind. Four of the confirmed findings are Critical (SQL injection that can take over an admin account, Marshal.load on the password-reset path, unauthenticated constantize API, command injection via uploaded filename). None of them require exotic techniques — they are readable in the controller and model code.
Severity counts (confirmed only):
| Critical | High | Medium | Low | Informational |
|---|---|---|---|---|
| 4 | 4 | 0 | 0 | 0 |
Top actions (fix first):
- Stop interpolating request parameters into SQL and shell commands; use bound parameters and
FileUtils. - Delete
Marshal.loadon the password-reset path; issue signed, expiring tokens instead. - Remove dynamic
constantizefrom the public API; add authentication. - Turn CSRF protection back on; stop permitting
:adminfrom user forms; movesecret_key_baseout of the repo and rotate it; replace MD5 password hashing withhas_secure_password.
2. Scope
In scope
- Repository:
OWASP/railsgoat(public clone) - Paths:
app/,config/,db/,lib/, root config files - Commit:
f5951f13089d85c979de09e7da3c8c0fb982f94a
Out of scope
- Any deployed instance of RailsGoat on the public internet (we do not test systems we do not own)
- Denial-of-service, social engineering
- The Rails framework and gem authors themselves (we report vulnerable dependency versions as upgrade notes)
Not covered
- Full HTTP-level confirmation of the benefit-forms download path (see §6)
- JavaScript feature specs that need a browser driver
3. Methodology
- Reviewed the public repository at the commit above.
- Ran automated checks with trusted, industry-standard tools (static analysis, secret scanning, dependency advisories).
- Triaged automated leads by hand against source.
- Built a small test harness to reproduce query, deserialization, mass-assignment,
constantize, hashing and command-string construction behavior with dummy data only. - Recorded each finding in a consistent structure (severity, location, impact, verification, fix).
- Bruce (sample author) verified each confirmed finding against the cited lines.
4. Findings summary
| ID | Severity | Title | Area |
|---|---|---|---|
| F-001 | Critical | SQL injection in account-settings update | Access control / Injection |
| F-002 | Critical | Password reset uses Marshal.load on attacker input |
Auth |
| F-003 | Critical | Unauthenticated API constantize dumps models |
Access control |
| F-004 | Critical | Uploaded filename interpolated into system("cp …") |
Injection |
| F-005 | High | Account update permits :admin |
Access control |
| F-006 | High | CSRF protection commented out | Auth |
| F-007 | High | secret_key_base committed to the repo |
Secrets |
| F-008 | High | MD5 password hashing + user enumeration | Auth |
5. Findings detail
F-001 — SQL injection in account-settings update
| Severity | Critical |
|---|---|
| Fingerprint | sample/railsgoat/users-update-sqli |
| Location | app/controllers/users_controller.rb:29 |
| Who can exploit it | Any signed-in user |
| Impact | Overwrite another user's (including an admin's) email and password |
What's wrong. UsersController#update does User.where("id = '#{params[:user][:id]}'")[0]. The id comes from the form, not from the session. A crafted value changes which row is returned; the action then updates that row.
How it was verified. Read the controller and routes. In the test harness, with dummy users Alice and Admin, the same query with payload 0' OR admin = 1 OR 'x'='y returned the Admin row (harness check F1).
Fix. Use current_user (or current_user.accounts.find(...) in multi-tenant apps). Bound parameters only. Remove :admin from the permit list (see F-005).
def update
user = current_user
user.update(user_params_without_password)
# password change only for current_user, after verifying the old password
end
Regression test. Request the account-settings update as user A with user[id] pointing at user B; assert B is unchanged.
F-002 — Password reset uses Marshal.load on attacker input
| Severity | Critical |
|---|---|
| Fingerprint | sample/railsgoat/password-reset-marshal |
| Location | app/controllers/password_resets_controller.rb:6 |
| Who can exploit it | Unauthenticated visitor |
| Impact | Object deserialization (RCE risk) and password reset of a loaded user |
What's wrong. reset_password does Marshal.load(Base64.decode64(params[:user])) then sets password and save!. skip_before_action :authenticated makes this public.
How it was verified. Source path on the reviewed commit. Harness F2: Marshal.load of attacker-controlled Base64 produced a live User.
Fix. Delete Marshal-based reset. Use the Rails 8 authentication generator's password-reset flow, or a signed expiring token (message_verifier) that stores only user.id.
F-003 — Unauthenticated API constantize dumps models
| Severity | Critical |
|---|---|
| Fingerprint | sample/railsgoat/api-mobile-constantize |
| Location | app/controllers/api/v1/mobile_controller.rb:10,17 |
| Who can exploit it | Unauthenticated client with a mobile User-Agent (or session[:mobile_param]) |
| Impact | Read any ActiveRecord model as JSON (including users) |
What's wrong. skip_before_action :authenticated, then params[:class].classify.constantize + .all / .find.
How it was verified. Routes + controller on the reviewed commit. Harness F4: "user".classify.constantize => User.
Fix. Remove dynamic constantize. One controller per resource, with authentication and scoping.
F-004 — Uploaded filename interpolated into system("cp …")
| Severity | Critical |
|---|---|
| Fingerprint | sample/railsgoat/benefits-command-injection |
| Location | app/models/benefits.rb:15 |
| Who can exploit it | Signed-in user uploading with backup enabled |
| Impact | Shell command execution as the app user |
What's wrong. Benefits.make_backup builds system("cp #{full_file_name} …#{file.original_filename}").
How it was verified. Source sink. Harness F6 constructed the command string with resume.pdf; id # (not executed).
Fix. FileUtils.cp + a sanitized basename. Never pass user input to a shell.
F-005 — Account update permits :admin
| Severity | High |
|---|---|
| Fingerprint | sample/railsgoat/mass-assignment-admin |
| Location | app/controllers/users_controller.rb:55 |
| Who can exploit it | Signed-in user |
| Impact | Self-elevation to admin (worse when combined with F-001) |
Fix. permit(:email, :first_name, :last_name) only. Grant admin in a separate administrative flow that checks is_admin? without the bypass in admin_param.
F-006 — CSRF protection commented out
| Severity | High |
|---|---|
| Fingerprint | sample/railsgoat/csrf-disabled |
| Location | app/controllers/application_controller.rb:9 |
| Who can exploit it | Attacker who can cause a signed-in victim's browser to submit a request |
| Impact | Any state-changing action the victim can perform |
Fix. protect_from_forgery with: :exception. Keep it on for HTML; use token/session strategies for APIs.
F-007 — secret_key_base committed to the repo
| Severity | High |
|---|---|
| Fingerprint | sample/railsgoat/secret-key-base-in-repo |
| Location | config/initializers/secret_token.rb:8 |
| Who can exploit it | Anyone who can read the repo |
| Impact | Forge signed/encrypted session cookies → account takeover |
How it was verified. Literal on the reviewed commit (value not printed). Automated secret scanning also flagged the file (value redacted). Session store also sets httponly: false.
Fix. Credentials or ENV["SECRET_KEY_BASE"]; bin/rails secret; rotate; set httponly: true.
F-008 — MD5 password hashing + user enumeration
| Severity | High |
|---|---|
| Fingerprint | sample/railsgoat/md5-password-and-user-enum |
| Location | app/models/user.rb:44-55 |
| Who can exploit it | Anyone who can hit login; anyone with a DB dump |
| Impact | Fast offline cracking; email enumeration for stuffing |
How it was verified. Harness F5: distinct errors for missing vs wrong password; stored hash equaled Digest::MD5.hexdigest of the plaintext.
Fix. has_secure_password (bcrypt). Generic login error. Re-hash on next login or force reset.
6. Needs validation
| ID | Title | Blocker | Owner-run check |
|---|---|---|---|
| NV-001 | Benefit form download builds a file from params[:type] / params[:name] |
HTTP stack not booted in this sample | In a local test environment, boot the app, sign in with a dummy user, request /download with the RailsGoat insecure-DOR tutorial parameters; record status and Content-Disposition |
7. Dependency and supply-chain notes
- Ruby dependency advisories: 193 advisories across 20 gems at this lockfile (many "unknown" criticality). Treat as an upgrade program, not 193 separate findings. Prioritize
rails/rack/nokogiri/pumaafter reading each advisory's affected versions. - Dependency and configuration scan: 6 Critical / 22 High OS/library CVEs in the dependency tree; 4 High misconfigurations (review Dockerfile / compose).
- Static analysis: Rails-specific checks raised 19 warnings (13 High confidence) — the confirmed findings above map to the High-confidence subset we verified. A general-purpose pass raised 47 results; several true positives overlapped; vendored-JS noise was rejected (see below).
- Secret scanning: 1 redacted hit on
secret_token.rb(F-007).
8. What's going well
Even in a training app some habits help: routes are centralized, there is an authenticated filter (even though some controllers skip it), and automated security checks are easy to add to CI once the intentional issues are fixed. For a real client we would call out concrete positives (CSRF on, RLS present, secrets in credentials, etc.).
9. Recommended next steps (for a real client in this shape)
- Fix Critical and High items before any public launch or customer pilot.
- Re-run the automated checks and the reproduction harness after fixes.
- If an enterprise customer requires a formal penetration test or SOC 2, plan for it separately; this review does not replace either.
- After launch, consider monthly Monitoring for dependency and secret drift.
Appendix — Rejected lead (example)
sample/railsgoat/vendored-jquery-snippet-eval — a static-analysis eval warning in vendored jquery.snippet.js. Third-party syntax-highlighting helper; not an application trust-boundary failure. Tracked as dependency hygiene only.
Want a second set of eyes before launch?
A Ship-Ready Review is a senior engineer's pre-launch code and security review with human-verified findings. Quick Check $490. It is not a penetration test or compliance audit.