Attacks and Exploits

A tester finds a developer's access key in a public repository. It still authenticates but can only read one bucket, and its policy is least-privilege. What is the primary misconfiguration to report?

Show the answer

Correct answerB. Hard-coded long-lived credentials exposed in a repository

AWhy not this: The key was found in a repository, not retrieved from a running instance's metadata endpoint.

BWhy this is right: The key is a static secret stored in public source code, so anyone can authenticate with it.

CWhy not this: The stem says the policy is least-privilege, so permissions are not the flaw.

DWhy not this: No role assumption or trust policy is involved; the key authenticates directly.

The weakness is the long-lived key committed to a public repository, which lets anyone authenticate as the developer. The least-privilege policy rules out an over-permissioned identity. The metadata service is irrelevant because the key came from source code, not from an instance.