AI Remediation
Turn a finding of the WASViking source review into a fix proposal you can read line by line, and into a draft pull request in your GitHub repository. WASViking prepares the fix. Review and merge stay with you.
WASViking® AI Remediation is part of Code Security. It takes a finding the source review already confirmed (IDOR, BOLA, BFLA, broken access control, broken authentication), prepares the smallest code change that closes it, shows you the change as a diff and, when you ask, opens a draft pull request in your repository.
WASViking prepares the fix. Your team reviews it, adjusts it and decides whether it is merged. The platform never merges a pull request and never writes to your default branch.
The problem it solves
A finding tells a developer what is wrong and where. Somebody still has to open the file, understand the surrounding code, write the change and open the pull request. For authorization weaknesses that work is small and repetitive, and it is where findings wait the longest. AI Remediation does the preparation, so the developer starts from a reviewed diff instead of a blank editor.
Two ways to use it
| Mode | Who starts it | Who decides on the pull request |
|---|---|---|
| Assisted | A person, on a finding | The same person, after reading the diff |
| Autonomous | The policy of your organization, after a scan | The policy, only when every check passed. Otherwise a person |
Assisted is available as soon as Code Security monitors a GitHub repository. Autonomous is off until someone switches it on.
Ask for a fix on a finding
- Open Findings and open a finding of the source review.
- In the AI Remediation block of the panel, choose Generate fix with AI.
- WASViking opens the proposal page and prepares the fix. The page shows each step as it is recorded: context, fix, patch, checks. You can leave and come back.
When the proposal is ready you see:
- Vulnerability context: what the source review recorded for the finding. Nothing is generated again.
- Proposed fix: what changes and why, and what you still need to verify.
- Changes: the diff, side by side or unified, with file names and line numbers.
- Checks: what was verified, what failed and what could not be run.
- History: every step, when it happened and who asked for it.
What the checks cover
WASViking does not build or run your application. A repository is often one part of a larger system, so the checks are the ones that can be answered from the change itself:
| Check | What it answers |
|---|---|
| Base commit | The fix is built on the current head of the default branch, and the reported code line is still there |
| Patch applies | Every edit matches the file exactly |
| Scope | Only files that were analyzed are changed, within the file and size limits |
| Sensitive files | No pipeline, dependency manifest, infrastructure, secret or migration file is touched |
| Credentials | No credential in the added lines |
| Security controls | No existing security control is removed |
| Unexpected code | No command, dynamic evaluation or external host is added |
| Syntax | The changed files parse, where a safe parser exists. Otherwise the check is shown as not run |
| Confidence | The model was confident enough. Authorization fixes require a higher level |
A check that could not run says so. A failed blocking check means the proposal cannot become a pull request. Any other failed check means a person has to look before one is opened.
Open the pull request
Choose Create pull request on a proposal. WASViking shows the repository, the target branch, the files changed and the summary, and asks you to confirm. It then:
- creates a new branch named
wasviking/fix-...; - commits the change on top of the current head of the default branch;
- opens a draft pull request that describes the finding, the change, the checks and their limits.
If a file of the proposal changed in the repository after the proposal was generated, nothing is written and you are asked to generate it again.
Opening pull requests needs one extra authorization in GitHub: the WASViking app you already installed to connect your repositories asks for permission to write branches and pull requests. The owner of your GitHub account accepts that request in the settings of the app, in GitHub. Until then nothing changes: Code Security keeps reading your code as before, and a pull request request tells you the permission is missing.
Four different states
| State | What it means |
|---|---|
| Fix proposed | A change is ready to read. Nothing was sent to your repository |
| Pull request open | A draft pull request exists in your repository |
| Pull request merged | Your team merged it |
| Fix confirmed | A scan after the merge no longer reports the finding |
A pull request is not a fix, and a merge is not a confirmation. The finding stays open until a later scan stops reporting it.
Autonomous Remediation
Open AI Remediation and choose Autonomous Remediation. The page has one switch, the repositories and the policy.
Repositories. Select one repository, several, or all the ones listed. Monitoring a repository does not authorize pull requests in it: only the repositories selected here receive them. A repository you connect later is never included by itself, even after you selected all. Check write permission tells you where the permission is missing and links to the page in GitHub where it is accepted.
Policy. Choose the weakness classes and severities that are eligible, the pull requests per day, how many proposals are prepared at once, the files a fix may change, how many failures in a row suspend the automation, and who is notified.
Switching it on shows how many repositories you are authorizing and asks you to confirm. From then on, after each scan, WASViking prepares a fix for the new findings the policy covers and opens a draft pull request when every check passed. A fix with any failed check is left for a person and is not published automatically.
Switching it off stops new runs and cancels the ones being prepared. Pull requests already open are not touched.
If several automatic runs fail in a row, the automation suspends itself and tells you. It resumes when someone chooses Resume automation.
Who can do what
| Permission | Allows |
|---|---|
| View | Read proposals, diffs and the policy |
| Generate | Ask for a fix, regenerate, discard, cancel |
| Open pull requests | Authorize the pull request of a proposal |
| Manage | Change the Autonomous Remediation policy and its repositories |
Administrators hold all four. Assign them to other roles in Team.
Notifications
Add the AI Remediation event to a notification channel to hear when a pull request is opened, when a proposal needs attention, when an automatic proposal fails and when the automation is suspended.
Limits
- GitHub repositories connected through Code Security. Projects sent as a zip have no repository to open a pull request in.
- Access control and authentication findings of the source review.
- One live proposal per finding. Generate again to replace it.
- The fix is a proposal built from the finding and a limited set of files. Run your tests and your pipeline on the branch before merging.
