Skip to content

[#225] 테스트플라이트 자동 배포가 실패하는 현상을 해결한다#229

Merged
opficdev merged 8 commits intodevelopfrom
fix/#225-fastlane
Mar 9, 2026
Merged

[#225] 테스트플라이트 자동 배포가 실패하는 현상을 해결한다#229
opficdev merged 8 commits intodevelopfrom
fix/#225-fastlane

Conversation

@opficdev
Copy link
Owner

@opficdev opficdev commented Mar 9, 2026

@opficdev opficdev self-assigned this Mar 9, 2026
@opficdev opficdev merged commit 000184c into develop Mar 9, 2026
1 check passed
@opficdev opficdev deleted the fix/#225-fastlane branch March 9, 2026 18:04
@opficdev opficdev changed the title [#225] [#225] 테스트플라이트 자동 배포가 실패하는 현상을 해결한다 Mar 9, 2026
opficdev added a commit that referenced this pull request Mar 9, 2026
This reverts commit 000184c.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 Fastlane을 사용한 TestFlight 자동 배포가 실패하는 문제를 해결합니다. Fastfile 내 build_app 액션에 코드 서명 관련 xcargs를 명시적으로 설정하고, 프로비저닝 프로파일 정보를 동적으로 가져와 적용함으로써 배포 프로세스의 안정성을 높였습니다.

Highlights

  • Fastlane Fastfile 업데이트: Fastfile에 'shellwords' 모듈을 추가하여 'xcargs'에 사용되는 문자열을 안전하게 이스케이프 처리했습니다.
  • build_app 코드 서명 설정 명시: build_app 액션에 'xcargs'를 사용하여 'CODE_SIGN_STYLE', 'DEVELOPMENT_TEAM', 'CODE_SIGN_IDENTITY', 'PROVISIONING_PROFILE_SPECIFIER'를 명시적으로 설정하여 자동 배포 실패 문제를 해결했습니다.
  • 프로비저닝 프로파일 매핑 처리: lane_context에서 'MATCH_PROVISIONING_PROFILE_MAPPING'을 통해 프로비저닝 프로파일 지정자를 가져오고, 누락 시 오류를 발생시키도록 처리했습니다.
Changelog
  • fastlane/Fastfile
    • shellwords 모듈을 추가했습니다.
    • build_app 액션의 xcargs를 확장하여 코드 서명 관련 설정을 명시적으로 지정했습니다.
    • MATCH_PROVISIONING_PROFILE_MAPPING에서 프로비저닝 프로파일 지정자를 가져오는 로직을 추가했습니다.
    • 프로비저닝 프로파일 지정자가 없을 경우 오류를 발생시키는 유효성 검사를 추가했습니다.
Activity
  • 이 PR에 대한 활동 내역은 제공되지 않았습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses TestFlight automatic deployment failures by improving the Fastlane build process, specifically handling Xcode build settings and manual code signing. While the changes are generally valid and improve deployment stability, a potential command injection vulnerability was identified in fastlane/Fastfile where an environment variable is used in a shell command context without proper escaping. It's good that build_app now explicitly includes manual code signing arguments to resolve CI code signing issues. Please also review the suggestion for improving Fastfile maintainability.

buildAppXcargs = [
"-skipPackagePluginValidation",
"CODE_SIGN_STYLE=Manual",
"DEVELOPMENT_TEAM=#{ENV["APP_STORE_TEAM_ID"]}",
Copy link
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The environment variable ENV["APP_STORE_TEAM_ID"] is interpolated directly into the buildAppXcargs array without proper shell escaping. If an attacker can influence the value of this environment variable (e.g., through a compromised CI environment or a malicious configuration file), they could potentially inject arbitrary shell commands or manipulate the xcodebuild arguments.

While other variables like provisioningProfileSpecifier and even the hardcoded string "Apple Distribution" are correctly escaped using Shellwords.escape, this one is missed.

To remediate this, wrap the environment variable in Shellwords.escape() to ensure it is safely handled when the array is joined and executed as part of a shell command.

      "DEVELOPMENT_TEAM=#{Shellwords.escape(ENV["APP_STORE_TEAM_ID"])}",

Comment on lines +42 to +44
provisioningProfileSpecifier = matchProvisioningProfileMapping["opfic.DevLog"].to_s.strip

UI.user_error!("Missing provisioning profile mapping for opfic.DevLog") if provisioningProfileSpecifier.empty?
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

번들 식별자 opfic.DevLog가 하드코딩되어 있습니다. 이 값은 Matchfile에도 정의되어 있는데, 이렇게 중복으로 하드코딩하면 나중에 번들 ID가 변경될 때 실수가 발생할 수 있습니다. match 액션 실행 후 lane_context에 저장되는 MATCH_PROVISIONING_PROFILE_MAPPING에서 번들 ID를 동적으로 가져오도록 수정하면 유지보수성이 향상됩니다. 이 방법은 매핑에 키가 하나만 존재한다고 가정하고 첫 번째 키를 사용하는 방식입니다.

    bundle_identifier = matchProvisioningProfileMapping.keys.first
    provisioningProfileSpecifier = matchProvisioningProfileMapping[bundle_identifier].to_s.strip

    UI.user_error!("'#{bundle_identifier}'에 대한 프로비저닝 프로파일 매핑을 찾을 수 없습니다.") if provisioningProfileSpecifier.empty?

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.

1 participant