-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dates are empty in the json file if run in AWS Lambda #2512
Comments
|
So the docker image is built using public.ecr.aws/lambda/python:3.12-x86_64 |
It's hard to tell remotely what's wrong here. Can you debug E.g. by editing the program and add there |
I will try, thanks. But by the looks it can determine the dates as it calculates how many days are left until the cert is expired. My guess is it's just a date output issue not reading the certificate data. And one more thing, when I save the output to the file I can see the script start and end date but not cert dates. |
During testing, I replaced enddate in the determine_dates_certificate() function with a random string dates, and tied it running like that on AWS and the cert dates remained empty. So I can come to concluding it has nothing to do with dates, it is just an output. Can it be safe_echo() function? |
This is what I get on AWS: INFO:root:STDERR: b'|8884> \tset +x\n/opt/testssl.sh/testssl.sh: line 9556: /dev/fd/62: No such file or directory\n/opt/testssl.sh/testssl.sh: line 9903: /dev/fd/62: No such file or directory\n' It looks like this line: IFS=',' read -r startdate enddate diffseconds days2expire yearstart < <(determine_dates_certificate "${intermediate_certs_txt[i]}") Can it be because in the lambda there is only one writeable directory and it's /tmp ? |
I am using version 3.2.
I've built a container-based AWS lambda to be able to run the scan via AWS SQS.
I use Python lambda to run the command.
When I run testssl.sh inside a container on my server it's all good, but when I ran tests on AWS the JSON file doesn't have any dates in it:
This how a normal file looks like:
This is how it looks when run via AWS lambda:
Can you help me in finding the solution?
The text was updated successfully, but these errors were encountered: