Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Cross-reference Asset Data from CMDB and Vulnerability Scanner

EasyPython00:00
Practice interviewer
In session
5 left
00:00

Your question is Cross-reference Asset Data from CMDB and Vulnerability Scanner. Start with the requirements on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

You are tasked with implementing a function that retrieves asset data from a Configuration Management Database (CMDB) API and cross-references it with a list of vulnerabilities from a vulnerability scanner. The function should return a list of assets that are vulnerable based on the provided vulnerability data.

Formal Specification

  • Input: A list of assets (dictionaries) from the CMDB and a list of vulnerabilities (dictionaries).
  • Output: A list of asset IDs that are vulnerable.

Constraints

  • 1 <= len(assets) <= 10^4
  • 1 <= len(vulnerabilities) <= 10^4
  • Unique asset and vulnerability IDs

Function Signature

def find_vulnerable_assets(assets, vulnerabilities):
Your solutionPython 3
You need to log in / sign up to run or submit.
Run your code to see test output