Closed marinpurgar closed 3 years ago
Hi @marinpurgar ,
Thanks for reporting this. This is indeed a bug.
In terms of expected behavior, I suppose you not only care license error, right? How about we throw the error when scanner_status !=0
? Would it better suit your needs?
Yes. Throwing an exception on scanner_status != 0
would be the proper excepted behavior. I have just documented the observed behavior with the "invalid license status".
Hi @marinpurgar I figured it's better not to throw an exception but only print with some meaningful logs. Please see the detail in the PR ☝️ . Let me know if that's not addressing your need.
LGTM, approved.
post-scan-actions/aws-python-promote-or-quarantine
Describe the bug
In case where the licence is invalid (or expired?) the S3 object is promoted to the Promoted S3 Bucket anyway. This is potential threat situation since the S3 Object with possible malware payload is promoted into the Promoted S3 Bucket and propagated into the secure system.
To reproduce
Expected behavior
S3 Object stays in the Input S3 Bucket and Promote or Quarantine Lambda throws an exception.
In case when the
scanner_status == -1
in the SQS Message Payload the S3 Object shouldn't be promoted.Additional context
The SNS Message Payload sent to the ScanResultTopic: