saltstack / saltstack/salt

Static analyzer detected a potential bad copy paste

Open Beginner friendly
#68,967 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

1.In /salt/modules/win_dacl.py on line 1328 in the condition, the permission variable is checked, despite the fact that the acetype variable is actually used and it is advisable to replace it with "acetype = acetype.upper() if acetype else None". I suspect bad copy paste.

Image
  1. In /salt/modules/schedule.py potentially outputs an incorrect error log, since parsing is performed for the current_time variable and the error exception is associated with this variable. In my opinion, it should be changed to "log.error("Date string could not be parsed: %s, %s", current_time, time_fmt)"
Image

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

Start by reading the referenced conditions in salt/modules/win_dacl.py and the date-parsing error handling in salt/modules/schedule.py. Confirm which variables are actually used at each location, make the two messages or assignments consistent with the issue, and verify that both modules retain their existing behavior apart from the reported corrections.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.