Illustrative only - not an engagement finding
Build Materials Contain a Long-Lived Service Secret
Critical
See where this finding applies on the diagrams: delivery zone [planned] · CP7 workload identity federation
Illustrative only - not an engagement finding
Build Materials Contain a Long-Lived Service Secret
- Business Summary
- A service key committed to deployment source or copied into build output remains recoverable from history and artifacts even after the latest file is cleaned up.
- Possible Weakness
- Infrastructure code, setup scripts or documentation contain a reusable cloud credential that is also preserved in repository history.
- Potential Impact
- Anyone with a repository clone or retained artifact could use the service outside the application until the credential is revoked.
- What an Assessment Verifies
- Use secret scanning across the current tree, repository history and build artifacts, then determine whether an Entra ID managed identity can replace the credential without attempting to use it.
- Expected Fix
- Revoke and rotate the credential, purge stored copies, move the workload to an Entra ID managed identity and gate every merge and release in Azure DevOps with secret scanning.
- How to Check the Fix
- The old value must be rejected, scans that include repository history must find no copy, the workload must operate without a stored key and a planted test secret must fail the pipeline.
Cross-Reference Evidence (Illustrative). This is cross-reference evidence demonstrating how one secret concern is supported by multiple independent evidence types. In a real engagement each item below is a live pointer: a file-and-line link into the source repository, a reproducible read-only query against the deployed Azure environment, or replayable tool output. Here they lead to newly authored public demonstrations.
-
Example source-code and history references
This is cross-reference evidence. A real assessment links the reviewed commit and exact lines across the route, service and data boundary so another reader can follow the complete control path.
if actor.tenant_id != record.tenant_id: raise Forbidden() -
Example Gitleaks-style scan output
This is cross-reference evidence. A real report retains the tool version, safe test case, expected result and output needed to reproduce the conclusion.
security-regression --case "<illustrative-case>" --format json Illustrative output: {"result":"blocked as expected"} -
Example managed-identity configuration record
This is cross-reference evidence. A real assessment records a dated read-only identity or configuration query and explains what that result does and does not prove.
az resource show --ids "<illustrative-resource-id>" \ --query "identity.type" Illustrative output: "SystemAssigned"