[Secondary research] Aura - Secrets Detection and Management
# Background
As AI developer tooling expands, and the design team at GitLab builds out future concepts for AI-driven workflows targeting the builder persona, we how security tooling like secrets management and detection might fit into those workflows. This issue is a place to collect secondary research and concepts to refer to when creating design concepts for Aura Secrets Detection and Management.
# Secondary research
<table>
<tr>
<th>Source</th>
<th>Key takeaways</th>
</tr>
<tr>
<td>
[Accelerating the Adoption of Software and AI Agent Identity and Authorization (NIST)](https://www.nccoe.nist.gov/sites/default/files/2026-02/accelerating-the-adoption-of-software-and-ai-agent-identity-and-authorization-concept-paper.pdf)
</td>
<td>
* Proposes that AI agents should be treated as identifiable entities within enterprise identity systems rather than as anonymous automation running under shared credentials
* Open questions:
* Should authorization policies for AI agents be able to adapt in real time as an agent’s operational context changes?
* How to establish least privilege for an agent, especially when its required actions might not be fully predictable when deployed?
* How authorization policies can be dynamically updated when an agent's context changes — for example, if an agent gains access to new tools and the sensitivity of aggregated data changes?
* How to handle "on behalf of" delegation and binding agent identity to human identity for human-in-the-loop scenarios?
</td>
</tr>
<tr>
<td>
[Securing the Model Context Protocol (MCP): Risks, controls, and governance](https://arxiv.org/html/2511.20920v1)
</td>
<td>
* Proposes a gateway architecture as the primary control, but doesn't resolve who deploys and governs the gateway.
* The controls proposed assume an enterprise security function exists.
* Every place in the interface where a Builder connects a tool, installs an MCP server, or grants an agent permission to a system is a design moment is impacted by this problem.
</td>
</tr>
<tr>
<td>
[A First Look at the Security Issues in the MCP Ecosystem](https://arxiv.org/html/2510.16558)
</td>
<td>
* Analysis of 67,057 real MCP servers across six public registries
* MCP registries and hosts create a 2-stage attack surface that allows malicious servers to enter user environments and execute attacker-intended operations without verification
* No one owns the trust problem for the MCP registry ecosystem as it was designed for openness and speed, not accountability
</td>
</tr>
<tr>
<td>
[AI Agent Disasters: What the 1.9 Million Row Database Wipe Teaches Us About Agent Safety](https://www.mindstudio.ai/blog/ai-agent-database-wipe-disaster-lessons)
\
https://owasp.org/www-project-mcp-top-10/2025/MCP01-2025-Token-Mismanagement-and-Secret-Exposure
</td>
<td>
* AI agent caused production disaster without technically making any errors. Points to failure in system design, and proposes that least-privilege controls and evaluations as preventative measures.
* The agent did not have enough controls or human-in-the-loop (HITL) confirmation gates.
* Unsafe agent configurations should be harder to create than safe ones
### **Remediation:**
* Implement Secret Hygiene Controls
* Store secrets in secure vaults (e.g., HashiCorp Vault, AWS Secrets Manager).
* Use environment variable injection only at runtime, never at build time.
* Limit Token Lifetime and Scope
* Issue short-lived, scoped tokens aligned with least privilege principles.
* Require token renewal for every new MCP session.
* Bind tokens to the specific agent, tool, or session context.
* Enforce Context Isolation
* Prevent sensitive data persistence in model memory or context windows.
* Redact or sanitize inputs and outputs before logging.
* Use ephemeral contexts for operations involving credentials.
* Secure Context & Log Management
* Redact or mask secrets before writing to logs or telemetry.
* Store diagnostic traces in protected locations with strict access control.
* Rotate and invalidate all tokens immediately upon suspected exposure.
* Enforce Governance Controls
* Define organizational policies for credential lifecycle management.
* Regularly audit MCP configurations, server endpoints, and stored contexts.
* Use Hardware Security Modules (HSMs) or Secrets Managers (AWS Secrets Manager, HashiCorp Vault, etc.) for runtime injection.
</td>
</tr>
<tr>
<td>
[Agentic IAM in practice](https://www.ibm.com/campaign/identity/agentic-iam)
https://www.ibm.com/solutions/agentic-ai-identity-management
</td>
<td>
Best practices for enforcing least privilege for AI agents/runtime security.
Who in the org owns security of non-human agents? Currently responsibility spread between developers and security teams.
Autonomous agents introduce risk of scale, sprawl and compliance
Four critical risks:
1. Over-privilege without visibility - lack of governance on agentic behavior
2. Invisible delegation - user impersonation breaks audit trails (who did what on behalf of who?). Can't answer "who authorized this?"
3. No real-time enforcement - last mile unguarded when agents invoke tools/APIs. End-to-end security breaks.
4. Shadow models and access - new models released without proper access and compliance controls
5 Enterprise imperatives:
1. Register every agent
2. Strip standing privileges
3. Tie actions to intent
4. Enforce point of use
5. Produce proof of control
{width="853" height="497"}
Dynamic JIT tokens used for on-demand access for specific use cases with least privilege.
Priviledged agents with elevated access-
* User context required
* User consent and delegation required
* Oauth 2.0 flow - CIBA (Client initiate backchannel authentication)
\--Optionally using RAR for task-specific, fine grained permissions --
\- when sensitive operation is detected by agent code, auth check is run and notification is sent to human agent (similar to 2FA) who has to Y/N operation. If Y, then JWT is assigned to agent and operations continue, policy checks are run throughout process.
{width="852" height="505"}
HITL w/ Privileged Agents:
* Human user needs to interact with agent so agent can make external connections (MCP, tools, other agents, downstream systems, databases)
Responsibility segregation:
{width="856" height="484"}
{width="858" height="487"}
How do we know when agents are going rogue?
* Provide a way to see any problems up-front by adding identity observability - who has access to what, when, and how? (access path)
* Finding shadow key, secrets, and certificates managers
* Secrets sprawl is still an issue for non-human identities due to blind spots, managing secrets in too many areas
* Can orgs find the blind spots?
* How can you tell if secrets are being managed in too many places?
* Risks of ITDR bypasses / automating everything and making policy driven time-limited(dynamic) secret generation for agents that go through a vault (HC) - what if vault is bypassed?
* Orgs must have patterns for auditing, attestation, and policy enforcement at last mile, which are visible by manually looking at source code (yikes) or having software that looks at the ecosystem through network logs, traffic flow logs, cloud logs, access logs, and authentication logs \[observability platform\]
{width="856" height="492"}
{width="858" height="482"}
IBM VIP identity protection + HC Vault Radar
* VIP - builds understanding of shadow directories, IAM agents
* HC Vault Radar- finds secrets embedded in source code or shared in communications tools (Teams)
* Data tells how big risk issue there is and can identify what is most important to fix first
</td>
</tr>
<tr>
<td>
[Enforce secure coding with AI and secret management using IBM Bob, Vault, and MCP Gateway](https://developer.ibm.com/tutorials/secure-coding-bob-vault-mcp-gateway/)
</td>
<td>
* **IBM Bob**: AI coding partner operating in a secure custom mode
* **MCP Gateway**: Governance layer controlling which tools Bob can access
* **HashiCorp Vault**: Secret management system issuing dynamic, least-privilege credentials
{width="900" height="321"}
The architecture flow is:
1. Developer interacts with IBM Bob.
2. Bob runs in a secure custom mode enforcing enterprise policies.
3. Bob invokes approved tools exposed through MCP Gateway.
4. MCP Gateway enforces fine-grained tool access and authentication.
5. Vault issues just-in-time secrets and logs all access.
This layered architecture ensures:
* No hardcoded secrets
* No uncontrolled AI tool access
* Full auditability
* Least-privilege enforcement
\
**Enterprise deployment**
* Security team configures secrets engines and access policies in HC Vault, and defines use-case-scoped Virtual MCP Servers in MCP Gateway
* Virtual MCP Servers expose only the approved Vault tools required for specific development scenarios, ensuring least-privilege and preventing risky operations.
* Security team creates a custom "Secure Coding" mode in IBM Bob, which embeds enterprise security rules, secret-handling standards, and approved integration patterns. The mode is then published to an internal marketplace or source control repository (for example, GitHub Enterprise), which keeps it centrally managed and version-controlled
* Developers pull this Secure Coding mode from the internal repository and install it in their Bob IDE. Once installed, Bob operates within enterprise-defined guardrails, accessing Vault only through the governed MCP Gateway layer.
{width="900" height="328"}
This enterprise architecture ensures:
* No direct developer access to Vault
* No exposure to unapproved MCP tools
* Enforced secret management best practices
* Centralized governance with full auditability
The architecture creates a controlled yet developer-friendly workflow where security policies are embedded directly into AI-assisted development, rather than enforced after the fact.
**Setup:**
Step 1. Deploy and configure Vault MCP Server
Step 2. Create a governed Virtual MCP Server
Step 3. Integrate the Virtual MCP Server with Bob\
Step 4. Create a Secure Coding custom mode in IBM Bob
Step 5. Scan and remediate hardcoded secrets
{width="900" height="54"}
{width="900" height="518"}
{width="900" height="248"}
{width="400" height="600"}
</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
# Primary research
<table>
<tr>
<th>Source</th>
<th>Key Takeaways</th>
</tr>
<tr>
<td>
[GitLab DAP Hackathon Survey Results](https://docs.google.com/document/d/1UB5m6-vIxGjCoK15V3aNLuUgkt23QfwNAqzKJuwgqTw/edit?tab=t.iq8jut8ka955#heading=h.q0rihuc82k42)
</td>
<td>
* What drives purchase decisions: **Security and governance** - especially important for enterprise/financial clients (_Note: 60% of participants said security, even though only 3% of them were security engineers! Almost 80% were engineering roles so this is coming mostly from our Builder persona.)_
* Also mentioned: **Competitive pricing** (value relative to cost, time, and effort), **ease of use** (low friction to get started and maintain), **customization freedom** (ability to adapt tools to specific needs)
* Users want the tool to be **proactive** but **non-intrusive**; communicating a need for **contextual intelligence**:
* **When something is wrong or could be better** → be proactive (flag errors, suggest optimizations, catch bottlenecks, alert on security practices)
* **Engineers want GitLab to be "the senior engineer"**—competent, transparent, proactive when something is wrong, invisible when things are running smoothly.
* **Human oversight is non-negotiable.** All interviewed participants insisted on approval gates for AI actions, especially for security-sensitive operations.
* Aspects that drive repeated use vs abandonment: **Security and destructive behavior are trust-breakers** - participants will abandon tools that pose risks.
* **Trust is built on reputation (66%) and data transparency (63%)**; broken by harmful changes (66%) and data access violations (59%). When things go wrong, 61% expect shared accountability across the builder, approver, runner, and team.
</td>
</tr>
</table>
#
issue
GitLab AI Context
Project: gitlab-org/gitlab-design
Instance: https://gitlab.com
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://gitlab.com/gitlab-org/gitlab-design/-/raw/master/CONTRIBUTING.md — contribution guidelines
- https://gitlab.com/gitlab-org/gitlab-design/-/raw/master/README.md — project overview and setup
Repository: https://gitlab.com/gitlab-org/gitlab-design
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD