Serverless Function Scanning: No Vulnerabilities or Package details of GCP Cloud Function.

Serverless Function Scanning: No Vulnerabilities or Package details of GCP Cloud Function.

1763
Created On 12/05/24 02:24 AM - Last Modified 03/04/25 16:47 PM


Symptom


This article is regarding the Serverless Function Scanning for the GCP Cloud Function.

The user enabled the Serverless Function Scanning for the onboarded GCP cloud account and the permission status looks fine. After performing the scan, the cloud function is listed on the following page but the "Vulnerabilities" and "Package info" tab show “there is no data to show”.

  1. Monitor > Vulnerabilities > Functions > Scanned Function

result.png 

  1. Monitor > Vulnerabilities > Functions > Scanned Function > Function details 
    nodata-1.png 
  2. Monitor > Vulnerabilities > Functions > Scanned Function > Function details > Package Info
    nodata-2.png 

    The scanned cloud function on the GCP side is below.
    sampleCode-1.png 
    sampleCode-2.png 


Environment


  • Prisma Cloud Runtime Security
  • GCP Cloud Function


Cause


With the current design, the Serverless Function Scanning will not scan the code itself, it will examine the dependencies listed in the function's package configuration files, such as(for Python) requirements.txt, PKG-INFO files, etc. These dependencies are matched against known vulnerability databases.

 
That means if a cloud function as a zip file includes vulnerable contents(e.g. vulnerable library package), it will work as expected, but if it contains only code it won’t trigger any vulnerability.



Resolution


In case you would like to test the vulnerability detection for your cloud function, you could package(e.g. as a ZIP file) your source code and the vulnerable library, then upload it to create a cloud function and perform the scan.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000PQvkCAG&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language