//Azure DevOps - Security Testing Guide (Ado-STG)/"Artificial Intelligence" (AI)
| ID: | AdoSTG-AI-01 |
This section describes how a tester can check if it's possible to abuse "AI" functionality to extract sensitive Tokens using an agent by providing untrusted input via a PR trigger.
The issue here is that if a user is able to provide input to an agent, they can prompt the agent to disclose sensitive information like tokens without the user having specific access to these secrets (they might be set as "secret" preventing direct access).
For this to be an issue, the following criteria have to be met:
1majorProviders = ["claude", "gemini", "copilot", "openai", "codex", "deepseek"] 2aiAssistants = ["cursor", "coderabbit", "qodo", "pr-agent", "devin"] 3additionalAiProviders = ["sourcery", "ai-pr-review", "ai-code-review", "cline", "mistral", "llama", "anthropic", "cohere"] 4selfhostedRuntimes = ["chatgpt", "gpt-4", "gpt-3", "bing-chat", "bard", "phind", "perplexity", "you-ai", "jasper", "tabnine", "ollama"] 5mcp = ["mcp", "model-context-protocol"]
1"Build.SourceVersionMessage", # Commit message (user-controlled) 2"Build.SourceBranchName", # Short branch name (user-controlled via PR) 3"Build.SourceBranch", # Full branch ref e.g. refs/heads/feature/foo 4"Build.RequestedFor", # Display name of person who triggered build 5"Build.RequestedForEmail", # Email of person who triggered build 6"System.PullRequest.SourceBranch", # PR source branch name 7"System.PullRequest.TargetBranch", # PR target branch name
User-controlled inputs can be used for code injection and thus used to exfiltrate tokens and other secrets.
Avoid passing untrusted input (Build.SourceVersionMessage, etc.) to AI tasks with token access.
Use separate trusted pipelines or remove token access from AI tasks.