Skip to content

fix(ci): persist credentials in dependabot-tidy so push succeeds#5685

Merged
moul merged 2 commits into
gnolang:masterfrom
thehowl:dev/morgan/fix-dependabot-tidy-push
May 19, 2026
Merged

fix(ci): persist credentials in dependabot-tidy so push succeeds#5685
moul merged 2 commits into
gnolang:masterfrom
thehowl:dev/morgan/fix-dependabot-tidy-push

Conversation

@thehowl
Copy link
Copy Markdown
Member

@thehowl thehowl commented May 18, 2026

Summary

The tidy_go_mods job in .github/workflows/meta-dependabot-tidy.yml runs make tidy on dependabot PRs that touch go.mod/go.sum, then uses stefanzweifel/git-auto-commit-action to commit and push the result back to the PR branch.

Since #5452 added persist-credentials: false to the actions/checkout step, every run of this job that produces changes fails at the push step:

fatal: could not read Username for 'https://github.com': No such device or address
Error: Invalid status code: 128

The auto-commit action does a plain git push and relies on the credentials persisted into .git/config by actions/checkout. With persist-credentials: false, no credentials are available and the push fails with exit code 128. The GITHUB_TOKEN env var passed to the step is not consumed by recent versions of the action for HTTPS auth.

Example failure: https://github.com/gnolang/gno/actions/runs/25812055587/job/76559999785 (PR #5292).

This fix flips persist-credentials back to true (the default) and adds a comment explaining why. The job already requests contents: write, so persisting the token is the intended behavior here.

zizmor passes on the default persona (the one CI runs). The auditor persona flags this as artipacked (low confidence), but that persona is not enabled in CI.

Test plan

The `tidy_go_mods` job runs `make tidy`, commits the result, and pushes
it back to the dependabot PR's branch. After gnolang#5452 added
`persist-credentials: false` to the checkout step, the push step fails
with "could not read Username for 'https://github.com'" because the
`git-auto-commit-action` does a plain `git push` and relies on
credentials configured in the local repo by `actions/checkout`.

The job already requests `contents: write`; persisting credentials is
the intended behavior here.
@Gno2D2
Copy link
Copy Markdown
Collaborator

Gno2D2 commented May 18, 2026

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: thehowl/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

The checkout step intentionally persists credentials so the
git-auto-commit-action below can push back to the dependabot PR. Mark
the artipacked finding as ignored so stricter zizmor personas don't
report it.
@thehowl
Copy link
Copy Markdown
Member Author

thehowl commented May 18, 2026

verified on #5292 (merged in this pr, workflow works again)

@lbrown2007 lbrown2007 requested a review from jefft0 May 18, 2026 20:18
@lbrown2007 lbrown2007 moved this from Triage to In Review in 🧙‍♂️Gno.land development May 18, 2026
@lbrown2007 lbrown2007 added the a/gnops DevOps, Valopers, NetOps, Infra, Monitoring, Coordination team label May 18, 2026
@lbrown2007 lbrown2007 requested a review from aeddi May 18, 2026 20:19
Copy link
Copy Markdown
Contributor

@jefft0 jefft0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test passed on #5292. Waiting to merge this PR and recreate other dependabot PRs for confirmation.

@moul moul merged commit 626ff03 into gnolang:master May 19, 2026
23 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in 💪 Bounties & Worx May 19, 2026
@thehowl thehowl deleted the dev/morgan/fix-dependabot-tidy-push branch May 19, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a/gnops DevOps, Valopers, NetOps, Infra, Monitoring, Coordination team 🚀 ci

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants