Skip to content

scm: add urlCredentials for authenticated url SCM access - #704

Open
mahaase wants to merge 1 commit into
BobBuildTool:masterfrom
mahaase:feature/url-scm-credentials
Open

scm: add urlCredentials for authenticated url SCM access#704
mahaase wants to merge 1 commit into
BobBuildTool:masterfrom
mahaase:feature/url-scm-credentials

Conversation

@mahaase

@mahaase mahaase commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Add a host-scoped urlCredentials configuration that injects an HTTP Authorization header (token or HTTP basic) into matching url SCMs. The credential is resolved while parsing the recipes and baked into the SCM's headers, so it travels with the serialized step and works inside the build sandbox.

The header does not influence the build- or variant-id, so adding or changing credentials never triggers rebuilds. An explicitly configured Authorization header takes precedence, and the credential is only ever sent to its matching host.

  • input: parse urlCredentials and inject headers for url SCMs
  • scm/url: send the configured headers on upload
  • doc: document the urlCredentials setting
  • test: cover credential injection

@mahaase
mahaase force-pushed the feature/url-scm-credentials branch from 3c20b19 to a652b60 Compare July 30, 2026 15:36
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.27%. Comparing base (7b00892) to head (d6c21cc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #704      +/-   ##
==========================================
+ Coverage   89.23%   89.27%   +0.04%     
==========================================
  Files          50       50              
  Lines       16450    16484      +34     
==========================================
+ Hits        14679    14716      +37     
+ Misses       1771     1768       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add a host-scoped `urlCredentials` configuration that injects an HTTP
`Authorization` header (token or HTTP basic) into matching url SCMs. The
credential is resolved while parsing the recipes and baked into the SCM's
`headers`, so it travels with the serialized step and works inside the
build sandbox.

The header does not influence the build- or variant-id, so adding or
changing credentials never triggers rebuilds. An explicitly configured
`Authorization` header takes precedence, and the credential is only ever
sent to its matching host.

- input: parse `urlCredentials` and inject headers for url SCMs
- scm/url: send the configured headers on upload
- doc: document the `urlCredentials` setting
- test: cover credential injection, including the error paths

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mahaase
mahaase force-pushed the feature/url-scm-credentials branch from 2140c86 to d6c21cc Compare July 31, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant