Skip to content

fix: refine workflow#176

Open
michael-chang-appier wants to merge 3 commits intomasterfrom
github-action-enhancement
Open

fix: refine workflow#176
michael-chang-appier wants to merge 3 commits intomasterfrom
github-action-enhancement

Conversation

@michael-chang-appier
Copy link
Copy Markdown
Contributor

  • Refactor release workflow shell steps to use environment variables for GitHub context values.
  • Replace reusable workflow secrets inheritance with explicit secret mapping.
  • Pin checkout action to an immutable commit SHA.
  • Add version comments beside pinned SHAs for traceability.

@michael-chang-appier michael-chang-appier self-assigned this Apr 14, 2026
@michael-chang-appier michael-chang-appier force-pushed the github-action-enhancement branch from 015d335 to 2a3720f Compare April 14, 2026 08:44
@michael-chang-appier michael-chang-appier changed the title fix: refubce workflow fix: refine workflow Apr 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refines GitHub Actions release workflows by improving security posture (least-privilege permissions, pinned action SHAs), making shell steps more maintainable via env vars, and tightening reusable-workflow secret passing.

Changes:

  • Refactored shell steps to use environment variables for GitHub context values.
  • Pinned actions/checkout and slackapi/slack-github-action to immutable commit SHAs (with version comments).
  • Replaced secrets: inherit with explicit secret mapping for the Slack reusable workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/release_framework.yml Adds minimal permissions, pins checkout, refactors context usage, and explicitly maps Slack secret to reusable workflow.
.github/workflows/Send_message_to_slack.yml Declares required secret for workflow_call, refactors message/payload construction to use env vars + jq, pins Slack action SHA.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/Send_message_to_slack.yml Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/Send_message_to_slack.yml Outdated
Comment thread .github/workflows/Send_message_to_slack.yml Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


echo WORKFLOW="$WORKFLOW_NAME" >> $GITHUB_OUTPUT

echo PR="$PR_TITLE" >> $GITHUB_OUTPUT
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

PR_TITLE comes from the PR metadata and can contain newlines or other characters that can break the $GITHUB_OUTPUT file format (output injection), potentially corrupting subsequent outputs and the Slack payload. Write this output using the multiline <<EOF syntax (or otherwise escape/encode the value) rather than echo PR="$PR_TITLE" >> $GITHUB_OUTPUT.

Suggested change
echo PR="$PR_TITLE" >> $GITHUB_OUTPUT
{
echo "PR<<EOF"
echo "$PR_TITLE"
echo "EOF"
} >> "$GITHUB_OUTPUT"

Copilot uses AI. Check for mistakes.
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Setup gem
uses: appier/appier-ios-framework/.github/actions/install_gem_dependencies@master
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

This workflow pins actions/checkout to a commit SHA, but appier/appier-ios-framework/.github/actions/install_gem_dependencies@master is still a mutable ref. For supply-chain safety and reproducibility, consider pinning this action to an immutable commit SHA (and optionally add a version comment as done for other pinned actions).

Suggested change
uses: appier/appier-ios-framework/.github/actions/install_gem_dependencies@master
uses: ./.github/actions/install_gem_dependencies

Copilot uses AI. Check for mistakes.
Comment on lines 97 to 101
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Setup gem
uses: appier/appier-ios-framework/.github/actions/install_gem_dependencies@master
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

install_gem_dependencies is referenced via @master, which is a mutable ref. To keep workflows reproducible and reduce supply-chain risk (especially now that other actions are pinned), consider pinning this to a commit SHA.

Copilot uses AI. Check for mistakes.
Comment on lines 115 to 119
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Setup gem
uses: appier/appier-ios-framework/.github/actions/install_gem_dependencies@master
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

This step still uses install_gem_dependencies@master (mutable ref). If the goal is fully deterministic workflows, pin this action to a commit SHA here as well.

Copilot uses AI. Check for mistakes.
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