Overview
Clayton Autofix is an automated tool designed to identify and resolve issues in code with minimal manual intervention. It integrates seamlessly with Clayton’s code analysis platform and can automatically suggest and apply fixes based on pre-configured rules.
Functionality
Autofix works by scanning the codebase to detect issues using Clayton’s policies and rules. When a fixable issue is identified, it provides suggested corrections that developers can review. If enabled, Autofix can automatically create a pull request containing all the proposed fixes, allowing for a structured review process before merging the changes into the codebase.
Currently, Autofix creates a PR to address all identified issues at once, and users cannot selectively pick individual issues for fixes.
Features
Autofix enables automatic code fixing, reducing the need for manual intervention. It supports direct integration with Git repositories, including GitHub, Bitbucket, and GitLab, streamlining the development workflow. The tool utilizes Clayton’s proprietary Clay programming language , Autofix covers Apex, Lightning Web Components (LWC), Visualforce, and metadata analysis, ensuring compliance with best practices and security standards.
Get fix suggestions in clicks
Get fix suggestions in clicks
You can get fix suggestions to resolve specific types of issues present in any branch:
Go to your project
Click on Branches or pull requests > select your desired branch or pull request from the dropdown
Select an available scan report
Navigate the code review and click on Fix
Currently supported rules
Autofix currently supports the following out-of-the-box rules:
Exposure of sensitive information in logs
Incorrect sharing clauses
Inefficient JavaScript loading
Insecure cookies
Insecure endpoint callouts
Insecure serialization and deserialization for Visualforce pages
Missed opportunity: Safe Navigation Operator
Missing comment in test assertions
Undocumented Apex methods
Unexpected console.logs
Use of deprecated: Salesforce API (7-20)
Use of deprecated: Salesforce API (21-30)