Skip to content

fix(build): reject persisted checkout credentials - #136

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/build-checkout-credential-guard
Open

Copilot wants to merge 2 commits into
mainfrom
copilot/build-checkout-credential-guard

Conversation

Copilot AI commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

Prototype install and build scripts can read Git metadata in their workspace. The shared action should require a credential-free checkout before running those scripts, rather than relying only on each consuming workflow's configuration.

What changes

Add a checkout check before repository scripts run. It rejects persisted Git authentication settings in root, nested, and submodule metadata without printing their values. Credential-free submodules remain supported. Git configuration includes, symbolic links within Git metadata, and metadata references outside the workspace are rejected to keep the check self-contained.

Set persist-credentials: false in the action's own CI caller and document the requirement for custom workflows. The check does not remove credentials or scan arbitrary source files for secrets. Existing consumers receive it when they upgrade their pinned action version.

Run the new TypeScript check through tsx from the action's locked runtime dependencies. Keep regression coverage focused on normal checkouts and the critical rejection and credential-redaction paths.

The complete local Hub check still reports an existing dependency-audit finding outside this change.

Created from a Slack conversation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI max review requested due to automatic review settings October 27, 2026 16:43
Copilot AI requested review from a team and nshki as code owners October 27, 2026 16:43

This comment was marked as duplicate.

Convert the checkout preflight to TypeScript and retain seven focused regression cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants