Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Automating Misconfigured Bucket Detection

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

Your question is Automating Misconfigured Bucket Detection. 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

Write a robust script or service in Python or Go to automate the detection of misconfigured cloud storage buckets. Implement find_misconfigured_buckets(buckets), where each bucket contains unique name, public_read, public_write, encryption_enabled, and logging_enabled fields. Return a list containing only misconfigured buckets, preserving input order, with each result shaped as {"name": string, "issues": list[string]}. Report issues in this order: public_read, public_write, encryption_disabled, logging_disabled. Return an empty list when all buckets comply or when the input is empty.

Constraints

  • 0 <= len(buckets) <= 5000
  • Each bucket is a dictionary with all five required fields
  • Bucket names are unique non-empty strings
  • Each configuration flag is a boolean
  • The output preserves input bucket order and issue order

Function Signature

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