Skip to the stories
Microsoft 365 & SharePoint

UK Public Code Review Finds Exposed Microsoft 365 Credentials and Security Flaws

  • Nicole Kobie
  • 882 views

ControlPlane found flaws in two-thirds of 349 public codebases, including an Entra ID credential that exposed Microsoft 365 data.

UK Public Code Review Finds Exposed Microsoft 365 Credentials and Security Flaws

Publicly available code from UK public sector organisations contained security weaknesses in two-thirds of the repositories examined by ControlPlane. The findings include an exposed Microsoft Entra ID credential with broad access to Microsoft 365 resources, making identity controls and automated code checks immediate concerns for IT teams.

ControlPlane scanned 349 codebases across 33 organisations. Security researcher Chris Nesbitt-Smith used Claude Opus and Sonnet to identify potential flaws in the published code. The research shows how AI tools can speed up the discovery of mistakes that are already present in software repositories; it doesn’t mean AI created those weaknesses.

An exposed credential reached across Microsoft 365

The Planning Inspectorate had published Microsoft Entra ID credentials to GitHub. They remained visible for 18 months. ControlPlane reported that a request using the credential confirmed it was active and could access SharePoint site collections across the tenant, along with private employee OneDrive accounts. The access extended well beyond what the original integration needed.

ControlPlane described the credential as granting tenant-wide read and write access across the organisation’s Microsoft 365 environment. That scope turns a repository secret into an identity security problem: anyone who obtained the credential could potentially reach data and services far beyond the code project where it appeared. For administrators, the incident highlights why secrets in public code need to be treated as live credentials until proven otherwise.

The Inspectorate said its monitoring and alerting tools detected the researcher’s activity, and that it was already handling the matter as a cyber incident when Nesbitt-Smith made contact. A spokesperson said the organisation fixed the vulnerability within 20 minutes of receiving the report and verified that no data breach had occurred. The Inspectorate also said it reviewed and strengthened its systems and processes.

That response time addresses the reported exposure after contact, while the 18-month period describes how long the credential was visible in the repository. Those are distinct parts of the incident. Teams reviewing their own environments should establish whether exposed credentials were revoked, what access they allowed, and whether monitoring identified use during the exposure period.

Findings across public codebases

The Planning Inspectorate case was one example in a wider set of weaknesses. ControlPlane also reported an access-control gap in a Department for Education procurement service and a leaked API token on the Scottish Government’s open data portal. The research points to recurring problems with access boundaries and secret handling across separate services.

UK public sector bodies have generally been required since 2017 to publish code they develop under an open source licence. The policy is intended to reduce costs, encourage collaboration and let external users improve the code. That model can support scrutiny, but it also means repository contents are visible to anyone who can access them. Credentials and configuration details therefore need controls that work before code is published.

Nesbitt-Smith told WIRED the flaws were straightforward rather than highly sophisticated. That matters operationally: the reported weaknesses did not depend on an advanced attack technique. ControlPlane used AI to help find them, but the underlying issues were credentials and access controls that could have been caught through established review and publishing safeguards.

AI changes the cost of finding mistakes

Huntress principal security operations analyst Olly Maxwell said the researcher identified more than 100 serious flaws across dozens of public bodies using consumer-grade AI on a laptop. He argued that AI has lowered the effort needed to discover vulnerabilities, even though it did not introduce them. Public repositories are also routinely scanned for mistakes, so a flaw found by an independent researcher may be visible to other parties as well.

Maxwell cautioned that someone who obtains valid access may not use it immediately. An exposed credential can remain useful to an intruder until they choose to act, which makes revocation and access review important even when monitoring has not shown obvious misuse. The Planning Inspectorate said it found no data breach in this case; that finding applies to its response and should not be read as a general assurance about other exposures.

Keep publication, strengthen the controls

Maxwell’s recommendation was not to withdraw from open source or hide public code. He characterised the exposed Entra ID credential as a failure of supply-chain governance and DevSecOps practice, rather than an unavoidable result of publishing code. He called for strict, automated security checks across the software supply chain and stronger operational discipline around identity.

For teams that publish code, the practical checks are clear: prevent secrets from entering repositories, limit credentials to the permissions an integration needs, and ensure exposed credentials can be revoked quickly. Automated checks can help catch accidental inclusions before publication, while monitoring can help identify suspicious use. The central lesson is that public code can support collaboration, but credentials must remain controlled throughout development, publication and incident response.

Source: Nicole Kobie · www.itpro.com

Neighbouring cells