Skip to content

[Sync] Update project files from source repository (70b250f) - #370

Merged
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20261008-141925-70b250f
Oct 8, 2026
Merged

mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20261008-141925-70b250f

Conversation

@mrz1836

@mrz1836 mrz1836 commented Oct 8, 2026

Copy link
Copy Markdown
Member

What Changed

  • Added DEPENDABOT_AUTO_MERGE_PATCH_SAME_OWNER = true (.github/env/20-workflows.env)

  • Added OWNER_LC = ${REPO_OWNER,,} (.github/env/20-workflows.env)

  • Added COUNT = 0 (.github/env/20-workflows.env)

  • Added IFS = ',' read -ra NAMES <<< "$DEPENDENCY" (.github/env/20-workflows.env)

  • Added SAME_OWNER = $SAME_OWNER_IN (.github/env/20-workflows.env)

  • Added APPROVAL_MSG = ✅ Auto-approving patch update (same-owner production dependency) (.github/env/20-workflows.env)

  • Added DEPENDABOT_AUTO_MERGE_PATCH_SAME_OWNER = true (.github/env/20-workflows.env)

  • Added OWNER_LC = ${REPO_OWNER,,} (.github/env/20-workflows.env)

  • Added COUNT = 0 (.github/env/20-workflows.env)

  • Added IFS = ',' read -ra NAMES <<< "$DEPENDENCY" (.github/env/20-workflows.env)

  • Added SAME_OWNER = $SAME_OWNER_IN (.github/env/20-workflows.env)

  • Added APPROVAL_MSG = ✅ Auto-approving patch update (same-owner production dependency) (.github/env/20-workflows.env)

  • Introduced same-owner dependency detection logic that verifies whether all dependencies in a Dependabot PR are hosted under the repository's own GitHub owner (org/user)

  • Modified Dependabot auto-merge workflow to allow automatic merging of patch updates for first-party production dependencies when all updated packages are verified to be owned by the same GitHub owner as the repository

  • Updated workflow documentation to clarify that third-party production patch updates still require manual review while first-party patches can auto-merge when the feature is enabled

  • Added new "auto-merge-patch-same-owner" action type with corresponding approval messages and reporting throughout the workflow

Why It Was Necessary

  • Production patch updates from third-party dependencies pose supply-chain security risks and require manual review, but first-party dependencies (owned by the same organization) are lower risk and can be safely auto-merged
  • The same-owner detection works generically across any GitHub organization or user account by reading from github.repository_owner at runtime, ensuring the workflow doesn't need modification when synced to different repositories
  • This change reduces manual review burden for teams maintaining multiple related repositories while maintaining strict security controls for external dependencies

Testing Performed

  • The same-owner detection logic includes comprehensive validation: dependency name format checking, ecosystem-specific parsing (go_modules and github_actions), and GitHub API verification to detect transferred repositories
  • Fail-closed design ensures any unparseable dependencies, unsupported ecosystems, or API errors result in manual review rather than unintended auto-merge
  • Decision tree logic validates all three configuration flags (AUTO_MERGE_PATCH, AUTO_MERGE_PATCH_SAME_OWNER, and same-owner verification) must pass before triggering the new auto-merge action

Impact / Risk

  • Low risk - Feature is opt-in via configuration flag and only applies when all dependencies in a PR are verified as same-owner; third-party dependencies continue requiring manual review
  • Security preserved - GitHub API verification prevents spoofing via vanity import paths or repository transfers; only ecosystems that encode GitHub owner in package names are supported
  • No breaking changes - Existing auto-merge behavior unchanged when DEPENDABOT_AUTO_MERGE_PATCH_SAME_OWNER is disabled or when dependencies don't meet same-owner criteria

Copilot AI balanced review requested due to automatic review settings October 8, 2026 14:19
@mrz1836 mrz1836 self-assigned this Oct 8, 2026
@mrz1836 mrz1836 added automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps labels Oct 8, 2026
@github-actions github-actions Bot added update General updates size/M Medium change (51-200 lines) labels Oct 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Expanding automatic approval of production dependencies warrants human security review, especially with the unresolved security-setting bypass.

1 open finding
What changed in this PR

Adds same-owner dependency verification to the existing Dependabot workflow, allowing first-party production patch updates to auto-merge.

Changes:

  • Enables a configurable same-owner production patch exception.
  • Verifies dependency ownership through package names and the GitHub API.
  • Updates approval messages, reporting, and workflow comments.
File Description
.github/​workflows/​dependabot-auto-merge.yml Adds ownership checks, decision logic, and reporting.
.github/​env/​20-workflows.env Enables the same-owner patch auto-merge setting.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@mrz1836
mrz1836 merged commit 4a26f15 into master Oct 8, 2026
25 checks passed
@github-actions
github-actions Bot deleted the chore/sync-files-go-bitcoin-20261008-141925-70b250f branch October 8, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps size/M Medium change (51-200 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants