//Azure DevOps - Security Testing Guide (Ado-STG)/"Artificial Intelligence" (AI)
| ID: | AdoSTG-AI-02 |
This section describes how a tester can check if its possible to abuse "AI" functionality to inject untrusted code into a pipelines execution.
This can happen when the pipeline uses untrusted input from a user in a step, thsi can both be used for prompt and code injection.
Notably this will need additional privileges to execute since this will not start a reguler trigger for a pipeline.
For this to be an issue the following criteria has 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
Avoid passing user-controlled input directly to AI tasks. Validate and sanitize input before use.