[BUG] 2 infinite recursion bugs in salt master branch
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
Hello,
While analyzing salt on SonarCloud I saw what look like two infinite recursion bugs in salt/sdb/couchdb.py and in salt/utils/openstack/neutron.py. In both case the method/function are called with unchanged parameters and no condition preventing an infinite recursion. You can see the issues in SonarCloud here and here.
Setup
There is no setup. This issue was detected by using the SonarCloud online service.
You can run the same analysis in a few clicks. I used this configuration file to separate properly main code from test code.
Screenshots

Versions Report
This issue was found directly on the master branch of salt. I didn't check if it was present in any released version.
Additional context
In case you have any question, suggestion or if you see a False Positive on SonarCloud you can reach out on SonarSource community forum.
A few notes in case you want to use SonarCloud:
- SonarCloud can easily import Pylint and Flake8 issues in case you want to use a rule SonarCloud does not already provide. Note however that if you select a rule already covered by SonarCloud you might see different issues than what Pylint/Flake8 report. We design our code analyzers to avoid False Positives as much as possible and to detect complex bugs.
- SonarCloud is free for open-source projects.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading salt/sdb/couchdb.py at line 115 and salt/utils/openstack/neutron.py at line 308, then review the two linked SonarCloud findings. Trace whether each call can recurse with unchanged parameters and whether a terminating condition is missing. Done means both findings are resolved or confirmed as false positives with the reasoning recorded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100