{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/969562d3c0fd49518d0f64aecbddccd6\" frameborder=\"0\" width=\"2468\" height=\"1851\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":1851,"width":2468,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":1851,"thumbnail_width":2468,"thumbnail_url":"https://cdn.loom.com/assets/img/og/slack-protected-video.gif","duration":387.06,"title":"AI-Powered Code Analyzer: Fixing Findings and Test Cases 🤖","description":"Hey, in this Loom, I'm going to show you how to use our AI-powered code analyzer to fix findings and test cases. First, I'll generate my app maps by running test cases. Then, I'll show you how to use the wrench icon to fix problems like deserialization of untrusted data flaw, N plus one query, and failed test cases. Clicking on the wrench sends a prompt to the AI code analyzer, which comes back with a code review comment and a suggested fix. For example, for the deserialization of untrusted data flaw, the suggested fix is to rewrite the code to not use YAML anymore and to use a more secure function called Extract Token. For the N plus one query, the suggested solution is to use the includes method, which triggers a left outer join to fetch all the storage attachments. For the failed test case, the suggestion is to use a flash message to tell the user that they have an invalid activation link and send a redirect instead of just raising an exception. This Loom will help you fix findings and test cases quickly and efficiently."}