Repository navigation
fix(runners): build Azure Pipelines run link from the collection URI - #3847
Conversation
Use SYSTEM_TEAMFOUNDATIONCOLLECTIONURI, falling back to SYSTEM_TEAMFOUNDATIONSERVERURI, so the run link also works on Azure DevOps Server, where the server URI has no collection segment. Return an empty link when the base URI, project or build ID is missing, and only add the job logs deep link when SYSTEM_JOBID is set. Fixes #3845 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 349d093c-9e39-4126-b6b2-b2b6e878ba09
PR validation — ✅ 3 passing
AI Session Checks — 🟢 89% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | pkg/attestation/crafter/runners/azurepipeline_test.go |
+100 / -4 |
| modified | ai | pkg/attestation/crafter/runners/azurepipeline.go |
+37 / -15 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-349d09 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-349d09 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-349d09 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-349d09 |
- |
Security Checks — ✅ 6 passing
✅ AI Security Analysis
Nothing this change touches re-opens a recorded security fix.
View in Chainloop ↗ · How this works ↗
✅ secret-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ sast-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
Scans not applied (3)
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
iac-scan |
no IaC files changed |
Powered by Chainloop and Chainloop Trace
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="pkg/attestation/crafter/runners/azurepipeline.go">
<violation number="1" location="pkg/attestation/crafter/runners/azurepipeline.go:103">
P2: `JoinPath` requires escaped path elements, but this passes the raw project name. A project containing `%` can make `JoinPath` silently retain the base path and produce a link without the project or results route; pass `url.PathEscape(project)` here.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
URL.JoinPath expects escaped elements and silently keeps the base path when an element does not unescape, so a project name with a percent sign dropped the project and results route from the run link. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 349d093c-9e39-4126-b6b2-b2b6e878ba09
The Azure Pipelines runner now builds the run link from
SYSTEM_TEAMFOUNDATIONCOLLECTIONURIand falls back toSYSTEM_TEAMFOUNDATIONSERVERURI. On Azure DevOps Server (self-hosted), the server URI has no collection segment, so the run link we recorded did not open the run. On Azure DevOps Services both variables have the same value, so links there do not change.The runner now also:
view=logs&j=...) only whenSYSTEM_JOBIDis setThe control plane records this link as the job and runner URL of the workflow run.
Fixes #3845
AI disclosure: this change was written with the help of Claude Code.
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri