[Bug]: `x509_v2.certificate_managed` deletes symlinks in test mode when `follow_symlinks` is false
Open
Nobody has claimed this yet.
bug
needs-triage
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
What happened?
x509_v2.certificate_managed deletes symlinks in test mode when follow_symlinks is explicitly set to false and name is an existing symlink.
See reproduction in PR.
The same is valid for x509_v2.crl_managed, x509_v2.csr_managed and x509_v2.private_key_managed.
Type of salt install
Official deb
Major version
3006.x
What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)
ubuntu-24.04
salt --versions-report output
Current HEAD of 3006.x
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 at the x509_v2.certificate_managed entry point and reproduce the issue with an existing symlink, test mode, and follow_symlinks=false. Check the corresponding x509_v2.crl_managed, x509_v2.csr_managed, and x509_v2.private_key_managed entry points; done means none deletes the symlink in this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100