- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to pass Splunk Cloud verification for my Python script using the HTTP requests module?

guarisma
Contributor
01-14-2020
01:56 PM
My script works great On-Premise, but Splunk Cloud rejects it
I use the requests module to do HTTPS requests like this one
response = requests.post(url, auth=(user, pwd), headers=headers ,data=data)
In Splunk Cloud it gets rejected because it thinks it might be insecure, when passing parameters to the requests module, I must do parameter=
Possible insecure HTTP Connection. Match: requests.post Positional arguments, ["?"]; Keyword arguments, {"auth": "?", "headers": "?", "data": "?"} File: bin/alert_event.py Line Number: 46
I don't know how to fix this.
Anyone knows how to pass this test?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
lpuentes
New Member
11-11-2021
01:21 PM
Hello,
were you able to solve the problem? The same is happening to me.
Thanks.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

livehybrid
Champion
06-10-2020
03:16 PM
Before calling requests.post, add something like:
if not url.startswith("https"):
logger.critical("URL must be HTTPS")
exit(1)
This way when they vet your app they can see that a non-https url couldnt be used.
