Skip to content

Conversation

5ouma
Copy link
Contributor

@5ouma 5ouma commented May 16, 2025

  1. Use the executed composite action ref

    Follow the refs referenced from workflows.
    Users may use branch, tag, or hash.

    jobs:
      job:
        runs-on: Ubuntu-Latest
        steps:
          - uses: Songmu/tagpr@<ref>
  2. Use environment variables for the input

    GitHub Actions will replace the context with plain text. If users or contributors enter the malformed text, secrets might be exposed.

    # prevent this
    jobs:
      job:
        runs-on: Ubuntu-Latest
        steps:
          - uses: Songmu/tagpr@<ref>
            with:
              version: \" || rm -rf / \"

5ouma added 2 commits May 16, 2025 20:42
Git tag may be malformed and should not be hard coded.
It prevents malformed injections since GitHub replace the text.
@Songmu
Copy link
Owner

Songmu commented May 21, 2025

Using ACTION_REF is a good idea. I didn't know about this feature, so I learned something new.

@Songmu Songmu merged commit e59de1b into Songmu:main May 21, 2025
3 checks passed
@5ouma 5ouma deleted the refactor-action-env branch May 21, 2025 22:12
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.

2 participants