Inspiration

In a marketplace, signing in as a seller should never give someone control over another seller’s business.

My existing multi-vendor application contained a concrete example: an authenticated seller could delete another seller’s coupon by submitting its ID. The endpoint checked authentication but did not enforce ownership.

For this hackathon, I wanted to explore what happens after finding that defect: can GitLab Duo investigate the actual code, prepare a focused repair, and produce evidence that the repair preserves both security and legitimate functionality?

What it does

Marketplace Guardian adds an agent-assisted security repair workflow to an existing multi-vendor e-commerce application.

The demonstrated workflow connects:

  1. A defect work item with explicit acceptance criteria.
  2. A reproducible failing test in GitLab CI.
  3. GitLab Duo investigation using repository and job-log context.
  4. An agent-produced repair merge request.
  5. Independent acceptance tests and a frontend build.
  6. Human review before merging.

The central scenario protects coupon ownership. Seller A must not delete Seller B’s coupon, while Seller B must retain the ability to delete their own.

The baseline executed seven tests: six passed, while the cross-seller deletion check failed because the endpoint returned HTTP 201. The repair received a passing CI result.

How we built it

I brought an existing React/Vite, Node.js/Express, and MongoDB Atlas marketplace into the assigned GitLab hackathon workspace while preserving its Git history.

The original marketplace is the starting application. The hackathon work adds reproducible configuration, fictional test fixtures, authorization acceptance tests, GitLab CI, and Duo-driven investigation and repair.

The tests exercise real HTTP routes and seller authentication. Each execution creates uniquely named fixtures and cleans up only the document IDs it created.

GitLab Duo retrieved the relevant code, acceptance tests, work item, and failed CI job. The repair changes coupon deletion from an ID-only operation to an atomic query scoped by both coupon ID and the authenticated seller’s ID.

Independent acceptance checks cover unauthorized deletion, document preservation, legitimate owner deletion, anonymous access, and controlled handling of invalid or missing IDs.

Challenges we ran into

The first challenge was distinguishing general contributor access from the hackathon’s Agent Platform workspace. Ordinary Duo Chat could answer questions, but the assigned workspace supplied the development capabilities needed for the repair workflow.

A second challenge was CI variable availability. The Atlas connection worked on main but was unavailable to a repair-branch pipeline because of variable protection settings. We treated that result as a setup blocker rather than pretending it validated the repair.

There were also competing repair executions. Keeping their sessions, branches, and merge requests separate was necessary for accurately recording which execution produced the final change.

Accomplishments that we're proud of

  • Reproducing a real authorization defect with an executable test.
  • Obtaining a focused agent-produced repair.
  • Preserving the acceptance checks rather than weakening them.
  • Testing legitimate behavior alongside unauthorized behavior.
  • Maintaining the original application's Git history.
  • Recording infrastructure failures separately from code failures.

What we learned

Authentication establishes who a caller is; authorization determines which resources that caller may change.

We also learned that an agent’s statement that a repair is correct is not sufficient evidence. Repository changes, unchanged tests, execution logs, and pipeline results must support that claim.

Effective agent instructions define scope, acceptance criteria, retry limits, prohibited changes, and honest escalation behavior.

What's next for Marketplace Guardian

The next milestone is to connect validated repairs to a separate staging deployment, run marketplace smoke checks, and present the result for final human approval.

Further work will extend the approach to private order access and add a clearly measured, repeatable release workflow.

The current demonstration focuses on coupon ownership repair. Automated production promotion and broader marketplace security coverage are not claimed as completed capabilities.

Built With

Share this project:

Updates

Submission history