Skip to content
Expert Cloud & AI
Menu

A security backlog that follows the reporting line

Built in a month with Claude Code, a private AWS tool uses Entra ID reporting lines to turn about 16,000 open Semgrep findings into a backlog for every committer and manager, without storing a Microsoft credential.

Client: An oil and gas company

Project work ·

Starting expertise
Principal engineering across AWS, Entra ID identity federation and application security tooling.
Delivery
6 October – 5 November 2026: one principal engineer, 13 days with commits and 39 reviewed pull requests. Ten of twelve features were live within 18 days of the first commit.
What the AI did
AI-assisted implementation with Claude Code, working from written designs and plans; the engineer set scope, access rules and the identity design.
What a human verified
Semgrep Guardian checks on every agent file edit and command, review of every pull request, more than 270 automated test cases, and an admin “view as” check of managers’ views before managers relied on them.
Controls
Private API Gateway behind an internal load balancer, Entra token validation, server-side slicing of vulnerability data, workload identity federation and an SCP protecting the reporter’s role.
Outcome
A daily inventory and remediation backlog in production, giving each committer and manager their own list ahead of a March 2027 deadline, with a monthly Semgrep impact report and a branch policy whose effect is measured from push records.

Choosing a code security tool is one decision. Getting its findings fixed is another. After an assessment of security tooling, an oil and gas company rolled out Semgrep across its Azure DevOps estate. The scanner produced a long list of open findings. It did not say who should fix each one.

The company had also set a deadline. By 31 March 2027, every pre-existing critical or high code finding, vulnerable dependency and exposed secret had to be fixed, granted an exception or accepted as a risk with an owning sponsor. Semgrep licences and sign-in depended on who was actually writing code. Meeting the deadline needed a list per person and per manager, kept current without anyone maintaining it by hand.

A principal engineer built that list in a month as a private web application on AWS, with Claude Code implementing the engineer’s written designs. It answers three questions each morning: who is committing code, whose backlog each finding belongs to, and what nobody owns. It later answered two more for security leadership: is the scanner working, and is the branch policy holding?

Start from who is actually committing

A scheduled reporter runs at 06:00 each day. It reads commit history from the company’s Azure DevOps organisations and checks every author against Entra ID. Only people with an enabled account count as active committers. The first run covered 365 days of history; later runs add new commits and recheck every account’s status.

On 26 November 2026 the report held 175 active people, 164 of whom had committed in the last 365 days, with 26,128 commits between them in that time.

100%
Active committers page showing 175 active people across all history, 164 who committed in the last 365 days, 26,128 commits in that time, a row of department filter pills and a committer list with names, emails, job titles, departments, last commit dates, repository counts and commit counts.

The security team’s inventory. All screenshots in this case study come from the live tool, with people, emails, departments, job titles and repository paths replaced by fictional values in the browser before capture.

The security team’s inventory. All screenshots in this case study come from the live tool, with people, emails, departments, job titles and repository paths replaced by fictional values in the browser before capture.

The same data drives access. The company was an early adopter of Semgrep’s Entra single sign-on and SCIM provisioning, so Semgrep accounts follow membership of one Entra group. Anyone added to the group can sign in, with no ticket and no separate onboarding step. The tool’s Semgrep group page lists every active committer and direct manager who isn’t in the group yet. The group’s owners add them in one step, using their own Entra permissions. It never needs to remove anyone: when someone leaves the company, their Entra account is removed, which takes them out of the group and, through SCIM, out of Semgrep.

Semgrep licenses by contributor: someone who committed to a scanned private repository in the last 90 days. Managers who review their team’s findings without writing code add no licence cost, so every manager of an active committer can have access. On 26 November the page listed the same 164 committers and 45 of their managers who don’t commit, and all 209 were already in the group. Eleven committers had no manager in Entra, or a disabled one, and the page says so rather than guessing.

100%
Semgrep group page with a 365-day view and department filters, a note that 11 committers have no manager in Entra, and totals of 164 committers in the view, 45 of their managers who aren’t committers, 209 already in the Semgrep users group and none missing. The download and add buttons are disabled because everyone is already in the group.

When everyone active is already in the group, there is nothing to add. The group’s real name is replaced here, as are the departments.

When everyone active is already in the group, there is nothing to add. The group’s real name is replaced here, as are the departments.

Reporting lines decide who sees what

The reporter asks Microsoft Graph for each committer’s manager and stores the manager’s Entra object ID with the person’s record. From there, each person’s backlog is calculated rather than assigned:

  • A committer sees every repository they committed to in the last 90 days, counting their own commits and excluding merges.
  • A manager also sees every repository any of their direct reports committed to in that window. A shared repository appears under each manager whose team works in it.
  • Each finding gets a suggested owner: the active person who last changed that file, or the repository’s most recent active committer. If that person reports to someone else, the finding is marked “outside your team”.
  • Unowned is every scanned repository that appears in nobody’s view. It is the exact complement of the personal views, so a repository with findings always lands somewhere. Every signed-in employee can see this list, so anyone can pick up an orphaned repository. Personal and manager backlogs stay limited to their own slice.
100%
Daily inputs from Azure DevOps commits, Entra ID and Semgrep feed one manager’s view: a manager and three direct reports linked to the repositories each committed to. Each finding gets a suggested owner and an outside-your-team flag, and repositories nobody active committed to go to the unowned backlog.

Commit authors are matched to Entra accounts by email address, and reporting lines by Entra object ID, never by name.

Commit authors are matched to Entra accounts by email address, and reporting lines by Entra object ID, never by name.

Nobody maintains a team list. When someone changes teams in Entra, their repositories follow them to their new manager the next morning.

A committer lands on their own backlog: the repositories they worked in, the findings in them and who is best placed to fix each one.

100%
My backlog for an individual, with minimum-commit filters, severity pills, totals of 5 critical, 28 high, 151 medium and 27 low, and a list of the repositories they committed to with severity counts and their own commit counts.

An individual’s backlog. The minimum-commits filter hides repositories someone only touched once.

An individual’s backlog. The minimum-commits filter hides repositories someone only touched once.

A manager’s backlog adds every repository their direct reports worked in.

100%
My backlog viewed as a manager, showing 115 critical, 1,493 high, 1,412 medium and 191 low findings, a sentence naming the manager’s 11 direct reports, and repositories listed with severity counts and each committer’s commits.

A manager’s backlog names the direct reports it was built from and shows each person’s own commits beside each repository. Findings that Semgrep’s AI rated as likely false positives are counted and hidden.

A manager’s backlog names the direct reports it was built from and shows each person’s own commits beside each repository. Findings that Semgrep’s AI rated as likely false positives are counted and hidden.

Expanding a repository shows its findings with the suggested owner, Semgrep’s fix status and its AI review. Automatic fix pull requests had not yet succeeded in this Azure DevOps estate, so a fix is shown as available, raised or failed. It is never presented as a promise.

100%
Expanded repository showing critical SQL injection findings with the rule name and CWE-89, links to Semgrep and the code, first-seen dates, a suggested owner marked as outside the team, a failed fix pull request and an AI review of likely real. The location column is blurred.

Suggested owners come from file history, not from the repository’s team. File locations are blurred here.

Suggested owners come from file history, not from the repository’s team. File locations are blurred here.

The security team sees every manager’s totals in one table and can open any manager’s view exactly as that manager sees it. That check was used before managers were pointed at the tool.

100%
Backlog by manager table listing managers with their direct reports and how many are active, repository counts, critical, high, medium and low findings, totals and how many have a fix, above a note of 5,166 distinct findings in 61 owned repositories and 10,945 in 171 repositories with no active owner.

Shared repositories count under every manager, so rows add up to more than the distinct total.

Shared repositories count under every manager, so rows add up to more than the distinct total.

Of about 16,100 open findings on 26 November, 5,166 sat in 61 repositories that someone active owned. The other 10,945, about two-thirds, sat in 171 repositories nobody active had touched in 90 days. Unowned is no longer a gap between lists. It is a defined list the security team can work through, sorted by severity or last commit.

100%
Unowned backlog showing 386 critical, 3,549 high, 5,542 medium and 1,468 low findings across 171 repositories, sortable by total, severity, last commit or name, with each repository’s last commit date and author.

The unowned backlog keeps the last commit and its author, which is often enough to find a successor.

The unowned backlog keeps the last commit and its author, which is often enough to find a successor.

One application, four views

The same site serves four kinds of viewer, and it reorganises around each one. The browser never decides what someone may see. The API builds each view from the caller’s validated Entra token, and the sidebar only lists pages the API will serve. Findings are vulnerability details, so calling the API directly returns the same slice as the page.

100%
Four columns of pages: signed out sees a home page with the deadline and supply-chain totals; a committer sees My backlog of their own repositories, the unowned backlog, Semgrep impact and any shared backlog; a manager’s My backlog also covers direct reports; a security admin adds active committers, email lists, backlog by manager with view-as, direct pushes, the Semgrep group page for group owners, and access management.

Security admins, the security team, come from an Entra app role or the tool’s own access list. An admin can share a manager’s backlog with a named person, who gains that backlog and nothing else.

Security admins, the security team, come from an Entra app role or the tool’s own access list. An admin can share a manager’s backlog with a named person, who gains that backlog and nothing else.

Signed out, the home page explains the deadline and shows organisation-wide supply-chain totals, with no names, repositories or findings.

100%
Signed-out home page headed “Your Semgrep backlog, in one place” with a sign-in button, a counter of 126 days until 31 March 2027 and the deadline rules.

The only view available without signing in.

The only view available without signing in.

Is the scanner working? A monthly answer

A rollout raises a second question from leadership: is the scanner working? Semgrep’s own dashboard compares the backlog and fixes between periods. Security leadership already had a one-off report, written by hand during the rollout, that it wanted to take to the CIO every month. The Semgrep impact page rebuilds that report every morning.

The monthly summary sets calendar months side by side, each compared with the month before, and compares the current month with the same days of the previous one. A finding copied onto several branches counts once, matched by Semgrep’s own match ID. Every figure has a written definition, so no number changes meaning between months: new code and dependency findings, how many are likely real, how many were caught in a pull request or fixed before merge, how many were fixed, the open critical and high backlog at month end, and live credentials found.

New dependency findings needed the most care, because they arrive in two ways. A developer can introduce one by adding a package or changing a version. Or nothing in the repository changes at all, and a security advisory is published saying that a package version already in use is vulnerable. Semgrep reports both as new findings on the day it first sees them. The reporter tells them apart using each lockfile’s history in Azure DevOps. A finding that arrived in a pull request, or within seven days of a change to its lockfile, counts as introduced by a code change. One whose lockfile had been unchanged for longer counts as a new advisory on existing code. When the lockfile history can’t be read, the finding is counted separately rather than guessed.

The split shows which kind is growing. New advisories on existing code ran at 51 a day in August, dipped to 21 in September, then rose to 67 in October and 134 in the first 25 days of November: 3,348 in those days, against 1,401 in the same days of October. Findings introduced by code changes stayed far smaller, though they rose too, from 51 in August to 464 in the first 25 days of November. Those are what pull request checks exist to catch. Without the split, November would have read as developers adding thousands of vulnerable packages.

100%
Column chart of new vulnerable-dependency findings per day, by cause. New advisories on existing code ran at 51.1 a day in August, 21.4 in September, 67.5 in October and 133.9 from 1 to 25 November. Findings introduced by a code change ran at 1.6, 1.5, 7.9 and 18.6 a day over the same periods.

Daily averages, so the part month of November compares fairly. Totals sit under the chart.

Daily averages, so the part month of November compares fairly. Totals sit under the chart.

The open-source world is seeing the same trend. In March the Linux Foundation announced $12.5 million in grants from seven AI and cloud companies, citing the speed and scale at which AI is now finding vulnerabilities and the flood of findings reaching maintainers. In October, Anthropic reported that language models had gone from finding under 20% of the vulnerabilities in one academic benchmark to over 85%, and that its own scanning had already sent nearly 5,000 reports to open-source maintainers.

Pull request checks can stop the first kind. They can’t stop the second, because nobody changed anything. As AI models are used to find vulnerabilities in open-source code, the security team expects new advisories to keep accelerating. Remediation effort has to grow with them, planned as regular upgrade work instead of waiting for the next team to touch each repository.

100%
Semgrep impact page with a note that scanning began with a June 2026 pilot and has commented on every pull request since 7 August 2026, severity filters, a switch to include the organisation’s own policy rules, and a monthly summary from June to November 2026. New code issues fall from 250 in September to 211 in October and 141 so far in November. New dependency issues reach 3,812 in November, split into 464 from a code change and 3,348 new advisories on existing code.

The page says up front that the first months are mostly existing code being scanned for the first time. Each month shows its change from the month before.

The page says up front that the first months are mostly existing code being scanned for the first time. Each month shows its change from the month before.

Below the summary, the page lists the last 30 days in detail: the top new findings with who introduced them, rule-based remediations led by rotating any live credential, and fixes made through pull requests with who made them. In the 30 days to 26 November, 83 findings were fixed that way, 75 of them critical or high. A security team supporting dozens of independent development teams can’t follow up on a percentage. A list of who fixed what, and in which pull request, shows which teams already act on findings during review.

Measuring whether the branch policy works

A scan only helps if a failing result stops the change. Semgrep was failing pull requests, but nothing in Azure DevOps required the check to pass, so some were completed anyway. The engineer’s earlier audit of commit history had found the wider gap: work pushed straight to a default branch skipped review and scanning, and its history rarely said why it was made. The audit’s first recommendation was to require pull requests.

On 22 October the engineer used Claude Code to script a required “Semgrep scan” status policy against the Azure DevOps REST API. It went to one project first. A passing pull request was approved, and a deliberately failing one was blocked. The same day it went to every project in the two organisations that hold code, 91 in all, and each policy was read back afterwards to confirm it was enabled and blocking.

The policy is set per project and covers every repository in it, so a new repository is protected without a ticket. The first version targeted each repository’s default branch. That also caught the hidden repository behind every project wiki and blocked wiki edits, so it was re-scoped the same day to main and master, with the few repositories that use another default branch named one by one.

The Direct pushes page measures whether it worked, from Azure DevOps’ own push records. Each push to a default branch is classed as a pull request completion, a person, a pipeline, or a new repository’s first commit, which can’t go through a pull request and so doesn’t count as a bypass. Comparing the 13 weeks before the policy with the weeks since, changes that skipped a pull request fell from 38.3% to 3.3%. Direct pushes by people fell from 51.5 a week to 3, and by pipelines from 15.4 to 1.2. Two people have since used their rights to bypass the policy, and the last, partial week rose to 9.2%, mostly from one person’s bypasses on a single day. The page lists every bypass and builds email lists of the people involved and their managers.

100%
Direct pushes summary since the branch policy: changes to default branches that skipped a pull request fell from 38.3% to 3.3%, direct pushes by people from 51.5 to 3 a week, direct pushes by pipelines from 15.4 to 1.2 a week, and 2 people have bypassed the policy since. A weekly line chart shows the share of changes that skipped a pull request between 18% and 62% from July to mid-October, then near zero after the policy went live, with a partial final week at 9.2%.

Measured from push records, not from the policy settings. The page’s “every default branch” means main, master and the named exceptions. The partial final week is drawn faded.

Measured from push records, not from the policy settings. The page’s “every default branch” means main, master and the named exceptions. The partial final week is drawn faded.

A policy protects only what it covers. It evaluates only when Semgrep posts a result, so a repository Semgrep isn’t scanning isn’t protected either. The reporter already connects new projects to Semgrep with diff-aware scanning once its read-only identity can see them, but the branch policy doesn’t follow them yet: new projects, and repositories whose default branch isn’t main or master, need adding by hand. Checking which repositories are actually being scanned is part of the job, alongside the policy itself.

No Microsoft credentials to store

The reporter needs to read Azure DevOps and Microsoft Graph. The usual answer is a personal access token or an app secret in a vault, rotated on a schedule and valid wherever it leaks. This tool uses neither.

The reporter’s IAM role asks AWS STS for a web identity token, using the GetWebIdentityToken call that outbound identity federation enables. STS returns a signed JWT that lasts five minutes, names the role as its subject and is addressed to Entra’s token exchange audience. The reporter presents that token to Entra as a client assertion. Entra checks it against a federated credential on the workload app, matching the account’s issuer, the role ARN and the audience, and only then issues access tokens for Azure DevOps and Graph.

100%
The reporter Lambda requests a token from AWS STS, receives a five-minute signed JWT naming its role, presents it to the Entra ID token endpoint, and receives access tokens for read-only Azure DevOps REST calls and Microsoft Graph after Entra checks the issuer, subject and audience against a federated credential. A note says no personal access token, client secret or certificate is stored, and Semgrep’s API token is the one secret the running tool holds, in an SSM SecureString.

Entra trusts two named IAM roles in one AWS account, the reporter’s and the directory function’s, and every token it accepts expires within minutes.

Entra trusts two named IAM roles in one AWS account, the reporter’s and the directory function’s, and every token it accepts expires within minutes.

In simplified form, the reporter’s two calls are:

assertion = sts.get_web_identity_token(
    Audience=["api://AzureADTokenExchange"],
    SigningAlgorithm="RS256",
    DurationSeconds=300,
)
token = httpx.post(f"https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token", data={
    "client_id": workload_app_id,
    "scope": "https://app.vssps.visualstudio.com/.default",
    "grant_type": "client_credentials",
    "client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
    "client_assertion": assertion["WebIdentityToken"],
})

People search and admin-group checks run in a separate directory function. It has its own IAM role and its own federated credential on the same workload app, with the same read-only Graph permission.

Two controls make the trust hold. A service control policy lets only the CDK deployment’s CloudFormation execution role create or change the reporter’s role and function. Each role can request its STS token only from inside its own function, so nobody can attach other code to an identity Entra trusts. One operational rule goes with them: outbound federation must never be switched off and on again, because AWS does not document that the issuer survives, and a new issuer would break the federated credentials.

Semgrep offers no federated option, so its API token is the one secret the running tool holds, kept as an SSM SecureString.

The site itself is private. The site’s two API Gateway APIs and their custom domains accept traffic only through the security VPC’s execute-API endpoint, behind an internal load balancer. An Entra authoriser checks the issuer, tenant, audience, signature and delegated scope of every signed-in request before the report API runs. The only route without one returns the home page’s organisation-wide totals. The site’s files sit in an S3 bucket with public access blocked, and the deployment pipeline routes every npm and PyPI download through Semgrep’s package firewall.

How the AI-assisted delivery worked

The tool went from its first commit to its current feature set in a month, but most of it arrived much faster. Commits landed on 13 of those 31 days, through 39 reviewed pull requests. Ten of its twelve features were live within 18 days of the first commit, and eight of them landed in three days, 21 to 23 October. The last two weeks went on the branch-policy charts, backlog sharing and hardening.

The three largest features each started as a written design: the manager backlog, the Semgrep impact report, and backlog sharing with in-tool admin access. Each design recorded goals, non-goals and anti-goals before any code was written. The manager backlog’s anti-goals included “anyone seeing findings for repositories outside their own slice, including by calling the API directly”. That line became a test case as well as a design rule.

The impact report shows the pace. Its written design was committed on the evening of 21 October, and the code that counts, ranks and recommends from Semgrep’s data followed the same night. The Direct pushes page shipped the next day, as the branch policy went live.

Claude Code implemented the plans, using Superpowers for specifications, plans and review. The engineer made the decisions that needed context: who counts as a manager, what a regular employee may see, and how much to trust a fix pull request. The engineer reviewed every change. The suite grew to more than 270 automated test cases across the Python back end and the React front end.

Semgrep was in the loop while the code was being written, not only after it was pushed. Semgrep Guardian, a Claude Code plugin that scans agent-written code, checked every file edit and shell command the agent made. Across the recorded build sessions from 11 October that came to 4,029 checks, and it never had to stop one. Semgrep’s own scans of the repository tell the same story. Of the 31 scans it holds from 28 October to 25 November, 26 of them on pull requests, none has ever produced a code finding. The only open findings are five medium-severity supply-chain advisories against two packages in its lockfiles: the same kind of finding the impact report tracks.

What the tool does not do

Backlogs cover code and dependency findings. Exposed secrets are worked in Semgrep and on the impact page, where rotating a live credential is always the first remediation. The tool does not raise fix pull requests, open tickets or triage findings. Managers do that in Semgrep, which they reach through the same Entra group. A suggested owner is a starting point drawn from file history, not an assignment. The reporting-line views are only as accurate as the manager field in Entra, which is why the eleven people without a manager are reported rather than hidden.

The numbers here come from the live tool on 25 and 26 November 2026, and the next morning’s run replaces them without anyone updating a spreadsheet. Every open finding now has a place: a named person’s backlog, their manager’s, or a defined unowned list. And the share of changes skipping review has fallen from 38% to 3%.

If your security tooling produces findings faster than anyone can route them, a cloud security engagement can start from your identity data and your deadline. We agree the scope and a fixed fee before work begins.