Summary
Audit Marshal.load usage to ensure we never deserialize attacker-controlled data (object injection risk).
Approach
Run:
rg -n "\\bMarshal\\.load\\b|\\bMarshal\\.restore\\b" --glob "*.rb"
For each call site:
- Identify the data source (cache, DB field, cookie/session, params, file, external service)
- If there is any path from user-controlled input →
Marshal.load, replace with a safe serialization format (JSON) or a constrained parser.
- If the data is strictly internal/trusted (e.g., cache written only by our process), add a brief trust-boundary comment.
Acceptance Criteria
Verification Plan
- Update call sites as needed
- Run targeted tests for the touched area +
bundle exec rake test (default)
Summary
Audit
Marshal.loadusage to ensure we never deserialize attacker-controlled data (object injection risk).Approach
Run:
For each call site:
Marshal.load, replace with a safe serialization format (JSON) or a constrained parser.Acceptance Criteria
Marshal.loadon untrusted inputsVerification Plan
bundle exec rake test(default)