ableev / ableev/Zabbix-in-Telegram
World writable tmp dir missing sticky bit CIS L1 v2.2.0 1.1.21
- Dominant language
- Python
- Stars
- 815
- Forks
- 236
- PR merge metrics
- No merged PRs in 30d
Description
After integrating telegram in Zabbix, our CIS L1 benchmarks shows that de directory zbxtg created by the zbxtg.py script is world writable and has no sticky bit. This is solvable by making a change in the main() function of zbxtg.py:
#os.chmod(tmp_dir, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
os.chmod(tmp_dir, stat.S_ISVTX | stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
So, the change is adding the sticky bit mask stat.S_ISVTX to the list of other bits. I purposely prepended the list because the sticky bit has a higher number (512) compared to the other ones where the highest one is stat.S_IRWXU (448).
Keep up the good work! Hopefully you can add this fix. We tested sending out messages and everything still works okay after applying this fix.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.