We are sunsetting Hakiri on January 31 2022. To learn more please refer to this document.

Discovered 6 months ago
Source: static code analysis
Category: Mass Assignment
Confidence level: Weak


Unprotected mass assignment



Topic.create!(:user => Post.find_by(:id => post_ids.first).user, :title => title, :category_id => category_id, :created_at => Post.find_by(:id => post_ids.first).created_at, :archetype => ((Archetype.private_message or Archetype.default)))

Category description: Unprotected model attributes give the attacker a way to rewrite them. E.g., change the admin flag to true.

Solution: fix the issue in app/models/post_mover.rb or mark it as false positive.