PyCQA / PyCQA/bandit

Support AI powered suggestion of fixes

Open
#1,214 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
8.3k
Forks
836
Avg merge
5d 3h
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.
Another SAST for Golang named Gosec has a feature to suggest code fixes using an AI/LLM. It would be nice to have the same for Bandit.

Describe the solution you'd like
We could take a similar approach to Gosec by working with an external API or something different. Needs more investigation on what would be best for Bandit.

Describe alternatives you've considered
The alternative is for the code fix suggestions be provided based on the analysis. This can be done without any dependency on an AI, but may suggest incorrect code or even results that break code.

See:
https://github.com/PyCQA/bandit/issues/439

Additional context
https://github.com/securego/gosec?tab=readme-ov-file#auto-fixing-vulnerabilities

Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked Gosec auto-fixing approach and Bandit issue #439 first. Compare an external API approach with analysis-based fixes, then define the scope and acceptance criteria before implementation; the issue currently names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.