HariSekhon / Nagios-Plugins

450+ AWS, Hadoop, Cloud, Kafka, Docker, Elasticsearch, RabbitMQ, Redis, HBase, Solr, Cassandra, ZooKeeper, HDFS, Yarn, Hive, Presto, Drill, Impala, Consul, Spark, Jenkins, Travis CI, Git, MySQL, Linux, DNS, Whois, SSL Certs, Yum Security Updates, Kubernetes, Cloudera etc...
https://www.linkedin.com/in/HariSekhon
Other
1.13k stars 502 forks source link

Update check_sftp.py #375

Open maxwbot opened 2 years ago

maxwbot commented 2 years ago

Update for support Password and fix some bugs. Added option to find text in file.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

lgtm-com[bot] commented 2 years ago

This pull request introduces 2 alerts when merging 9029c29c6b0f47883b7b20cf289c77246f6cb27a into b577b20b298bd1497b9684309a80c1973866ff3b - view on LGTM.com

new alerts:

HariSekhon commented 2 years ago

What is the use case for using a password instead of SSH Key? Is this less secure?

Also, I generally don't change the date and author headers as that is the origin time of the code, which is an important reference point because it gives a clue as to the code's style based on that time frame, I would write this very differently today.

Tbh if I was still using this code and going to be checking for more things like you're going I'd probably just write a new version of this code with paramiko - there is even a long-standing todo about this at the top of the code.