In attempting to deploy and use the pshtt scanner to lambda, I encountered what I believe to be a bug.
The default "domain-scan" env package has the "public-suffic-list.txt" file in the root of the zip, and so the deployed pshtt zip file does as well.
However the pshtt scanner does not expect the file to be in the location, it expects it to be at "./cache/public-suffix-list.txt" as seen from the section of scanners/pshtt.py
. . .
# In Lambda, we package a snapshot of the PSL with the environment.
lambda_support = True
lambda_suffix_path = "./cache/public-suffix-list.txt"
. . .
As such when I deployed the scanner, and tried to use it, it failed, and the following failure was logged in CloudWatch:
[Errno 2] No such file or directory: './cache/public-suffix-list.txt': FileNotFoundError
Traceback (most recent call last):
File "/var/task/lambda_handler.py", line 29, in handler
data = scanner.scan(domain, environment, options)
File "/var/task/scanners/pshtt.py", line 79, in scan
suffix_list = codecs.open(lambda_suffix_path, encoding='utf-8')
File "/var/lang/lib/python3.6/codecs.py", line 895, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: './cache/public-suffix-list.txt'
Hello,
In attempting to deploy and use the pshtt scanner to lambda, I encountered what I believe to be a bug.
The default "domain-scan" env package has the "public-suffic-list.txt" file in the root of the zip, and so the deployed pshtt zip file does as well.
However the pshtt scanner does not expect the file to be in the location, it expects it to be at "./cache/public-suffix-list.txt" as seen from the section of
scanners/pshtt.py
As such when I deployed the scanner, and tried to use it, it failed, and the following failure was logged in CloudWatch: