Skip to content

fix(authn): run credential helper from the workspace root#896

Open
ashi009 wants to merge 1 commit into
bazel-contrib:mainfrom
ashi009:authn-workspace-root-cwd
Open

fix(authn): run credential helper from the workspace root#896
ashi009 wants to merge 1 commit into
bazel-contrib:mainfrom
ashi009:authn-workspace-root-cwd

Conversation

@ashi009

@ashi009 ashi009 commented May 13, 2026

Copy link
Copy Markdown
Contributor

The credential helper subprocess invoked by oci_pull currently inherits whatever working directory Bazel picks (typically an internal output-base path), so helpers that read workspace-relative config (.aws/config, project-local credential files, custom helpers that resolve paths off the workspace root) fail to find them.

This passes working_directory = str(rctx.workspace_root) to rctx.execute so the helper runs from the workspace root.

Fixes #895.

Without `working_directory`, the credential helper subprocess
inherits whatever CWD Bazel picks (typically an internal
output-base path). Any helper that reads workspace-relative
config — `.aws/config`, project-local credential files, custom
helpers that resolve paths off the workspace root — currently
fails to find them.

Fixes bazel-contrib#895.
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.

oci_pull credential helper runs in arbitrary working directory

1 participant