Repository navigation
Conversation
`chainloop artifact download` can use a CAS credential that the client obtained before. Set it with the CHAINLOOP_ARTIFACT_CAS_TOKEN environment variable or with the --artifact-cas-token flag. The command then connects to the CAS API with this credential, and it needs no API token and no control plane call. The CAS credential has precedence over the API token. Without a CAS credential, the command gets one from the control plane as before. When the CAS does not accept the credential, the command now reports that, instead of "artifact not found". Signed-off-by: Javier Rodriguez <javier@chainloop.dev> Assisted-by: Claude Code Chainloop-Trace-Sessions: 5aac1986-3c81-429d-a6e2-ba72c55819b9
PR validation —
|
| Status | Policy | Material | Messages |
|---|---|---|---|
pr-min-approvals |
pr-info |
PR/MR #3848 has 0 approving reviews, 1 required. | |
| ✅ Passed | pr-description-required |
pr-info |
- |
pr-user-story-linked |
pr-info |
PR/MR #3848 does not reference a user story or issue in title, description, or branch 'feat(cli): download an artifact with a ready CAS credential'. Expected patterns: ["(?i)[A-Z]+-[0-9]+", "#[0-9]+", "(?i)gh-[0-9]+", "(?i)\\[[A-Z]+-[0-9]+\\]"] |
AI Session Checks — 🟡 85% · ⚠️ 2 failing
| Avg score | Sessions | Failing policies | Attribution | Files | Lines | Total Duration |
|---|---|---|---|---|---|---|
| 🟡 85% | 1 | 98% AI / 2% Human | 6 | +417 / -27 | 315h48m53s |
🟡 85% — 98% AI — ⚠️ 2 policies failing
-
Nov 10, 2026 08:24 UTC · 315h48m53s · $1800.52 · 29.4k in / 15.1M out · claude-code 2.1.321 (claude-opus-5-5)
Change Summary
-
Adds artifact downloads using a previously obtained CAS credential from an environment variable or flag. Preserves the API-token fallback and reports credential rejection explicitly, with CLI tests and updated reference documentation.
AI Session Overall Score
-
🟡 85% — Focused CLI implementation and meaningful tests, with captured execution evidence still missing.
AI Session Analysis Breakdown
-
🟢 95% · context-and-planning
-
🟢 The CLI brief specified precedence, fallback, command isolation, documentation, and expected tests before implementation. · High Impact
🟢 94% · scope-discipline
-
No notes.
🟢 92% · alignment
-
No notes.
🟢 91% · solution-quality
-
🟢 The command defers control-plane initialization and restores it only for the fallback, addressing the actual connection dependency. · High Impact
🟡 The AI added an unexplained lint suppression to an environment-variable name; its scope is limited to that constant. · Low Severity
🟡 78% · user-trust-signal
-
🟡 The user firmly clarified that public repositories must not disclose security considerations or bugs. · Low Severity
🟡 68% · verification
-
🟢 Tests execute the real command, check downloaded bytes, credential precedence, fallback requests, malformed input, and rejection. · High Impact
🟠 The captured CLI phase contains no test-run output or user confirmation of the new download behavior. · Medium Severity
💡 Capture the CLI test command and its result before publishing the change.
-
File Attribution
███████████████████░98% AI / 2% HumanStatus Attribution File Lines created ai app/cli/cmd/artifact_download_test.go+327 / -0 modified ai app/cli/cmd/artifact_download.go+54 / -12 modified ai app/cli/cmd/artifact.go+24 / -10 modified ai app/cli/documentation/cli-reference.md+5 / -4 modified ai app/cli/pkg/action/artifact_download.go+6 / -0 modified ai app/cli/cmd/artifact_upload.go+1 / -1
Policies (4, 2 failing)
Status Policy Material Messages ✅ Passed ai-config-ai-agents-allowedai-coding-session-5aac19- ⚠️ Failedai-config-no-dangerous-commandsai-coding-session-5aac19Forbidden bash pattern /curl[^|\n]\|\s(?:bash|sh)\b/ matched command: cd /home/javi/orca/workspaces/platform/ai-assisted-manual-evidence/e2e && export TMPDIR=$HOME/.cache/pfm-7910-build/tmp && (yarn install --immutable 2>&1 | tail... ⚠️ Failedai-config-no-secretsai-coding-session-5aac19- Secret (generic-password) detected in session content [turn=101, source=tool_result, line=4]: license_key: "[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:jwt]"
- Secret (generic-password) detected in session content [turn=12318, source=tool_result, line=2]: |
⚠️ Failed |ai-config-no-secrets| [ai-coding-session-5aac19](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf... - Secret (generic-password) detected in session content [turn=15820, source=tool_result, line=8]: INF commit record saved sha=[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:generic-api-key]
- Secret (generic-password) detected in session content [turn=16428, source=tool_result, line=1]: {"headRefName":"javirln/pfm-7910-reconcile-system-tokens","headRefOid":"[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:generic-api-key]","isDraft":false,"reviewDecision":"CHANGES_REQUEST...
- Secret (generic-password) detected in session content [turn=16584, source=tool_result, line=45]: Reviews (5) · Last reviewed commit: ["docs(apitokens): say that a system produ..."](https://github.com/chainloop-dev/platform/commit/[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:g...
- Secret (generic-password) detected in session content [turn=16902, source=tool_result, line=4]: |
⚠️ Failed |ai-config-no-secrets| [ai-coding-session-5aac19](https://app.chainloop.dev/u/chainloop/projects/chainloop-platf... - Secret (generic-password) detected in session content [turn=16941, source=assistant-text, line=4]: -
ai-config-no-secrets(#7252, #7254) checks the record of this AI coding session, not the code. It flagged lines where the tracer had already replaced the values with[CHAINLOOP_TRACE_REDACTED...</li><li>Secret (generic-password) detected in session content [turn=175, source=tool_result, line=32]: license_key: "[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:jwt]"</li><li>Secret (generic-password) detected in session content [turn=18992, source=tool_result, line=1]: git -C ~/.cache/pfm-7910-build/split/b1 push --force-with-lease=javirln/pfm-7910-reconcile-system-tokens:[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:generic-api-key] origin javirln/pf...</li><li>Secret (generic-password) detected in session content [turn=18996, source=assistant-text, line=12]: git -C ~/.cache/pfm-7910-build/split/b1 push --force-with-lease=javirln/pfm-7910-reconcile-system-tokens:[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:generic-api-key] origin javirln/pf...</li><li>Secret (generic-password) detected in session content [turn=19104, source=assistant-tool_use:Bash, line=1]: cd ~/.cache/pfm-7910-build/split && git -C b1 push --force-with-lease=javirln/pfm-7910-reconcile-system-tokens:[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:generic-api-key] origin javi...</li><li>Secret (generic-password) detected in session content [turn=31966, source=tool_result, line=19]: (More exist: passpage_token"[CHAINLOOP_TRACE_[CHAINLOOP_TRACE_REDACTED:generic-password]:generic-api-key]" with the samescope` to list the next ones.) - Secret (generic-password) detected in session content [turn=482, source=tool_result, line=11]: 65 api_key: "[CHAINLOOP_TRACE_REDACTED:generic-password]"
- Secret (generic-password) detected in session content [turn=482, source=tool_result, line=19]: 73 token: "[CHAINLOOP_TRACE_REDACTED:generic-password]"
- Secret (generic-password) detected in session content [turn=6888, source=tool_result, line=7]: # user: [CHAINLOOP_TRACE_REDACTED:generic-password]
- Secret (generic-password) detected in session content [turn=6888, source=tool_result, line=8]: # password: [CHAINLOOP_TRACE_REDACTED:generic-password]
✅ Passed ai-config-mcp-servers-allowedai-coding-session-5aac19- -
Security Checks — ✅ 6 passing
✅ AI Security Analysis
Reviewed this change against the project's security context (4 concerns hunted) — no introduced risk found.
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
chainloop artifact downloadcan now use a CAS credential that the client got before.CHAINLOOP_ARTIFACT_CAS_TOKENenvironment variable (preferred) or the--artifact-cas-tokenflag.An AI assistant (Claude Code) helped write this change.