Skip to content

Replace secrets: inherit with explicit secret passing in dependabot-automerge.yml and telegram-release-notify.yml #75

Description

@ineedjet

Summary

Two caller workflows in this repo use secrets: inherit when calling rubykatzen/releaser reusable workflows:

  • .github/workflows/dependabot-automerge.yml -> rubykatzen/releaser/.../dependabot-automerge-shared.yml@v0.5
  • .github/workflows/telegram-release-notify.yml -> rubykatzen/releaser/.../telegram-release-notify-shared.yml@v0.5

Why change

secrets: inherit passes every secret available in this repo's Actions context to the called reusable workflow, not just what it actually needs — notably dependabot-automerge.yml also runs on pull_request_target, a trigger that already warrants extra caution around what it has access to. Explicit, least-privilege secret passing is safer and makes the caller file an accurate source of truth for what it actually uses.

Proposed change

Replace secrets: inherit in both files with an explicit mapping matching whatever secrets: each corresponding -shared.yml declares under on: workflow_call, e.g. for the telegram one:

secrets:
  TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
  TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}

Scope

Same pattern found across the org — companion issues filed in rubykatzen/releaser, rubykatzen/homebrew-tap, and rubykatzen/baseline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions