Skip to content

Commit afbcde6

Browse files
Scope App Store signing to the release target
1 parent e6cb0e9 commit afbcde6

5 files changed

Lines changed: 51 additions & 22 deletions

File tree

fearless.xcodeproj/project.pbxproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19545,7 +19545,8 @@
1954519545
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(ICON_SUFFIX)";
1954619546
CLONED_SOURCE_PACKAGES_DIR_PATH = "$(SRCROOT)/SourcePackages";
1954719547
CODE_SIGN_ENTITLEMENTS = fearless/WalletConnect.entitlements;
19548-
CODE_SIGN_STYLE = Automatic;
19548+
CODE_SIGN_IDENTITY = "Apple Distribution: Soramitsu Co., Ltd. (YLWWUD25VZ)";
19549+
CODE_SIGN_STYLE = Manual;
1954919550
CURRENT_PROJECT_VERSION = 2026.7.26;
1955019551
DEVELOPMENT_TEAM = YLWWUD25VZ;
1955119552
ENABLE_BITCODE = NO;
@@ -19560,7 +19561,7 @@
1956019561
MARKETING_VERSION = 4.2.0;
1956119562
PRODUCT_BUNDLE_IDENTIFIER = jp.co.soramitsu.fearlesswallet;
1956219563
PRODUCT_NAME = "$(TARGET_NAME)";
19563-
PROVISIONING_PROFILE_SPECIFIER = "";
19564+
PROVISIONING_PROFILE_SPECIFIER = "Fearless App Store 2026.7.26";
1956419565
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
1956519566
SWIFT_OBJC_BRIDGING_HEADER = "fearless/fearless-Bridging-Header.h";
1956619567
SWIFT_VERSION = 5.0;

scripts/ci/audit-ios-release-identity.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
55
readonly REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
66

77
readonly EXPECTED_DEVELOPMENT_TEAM="YLWWUD25VZ"
8+
readonly EXPECTED_SIGNING_IDENTITY="Apple Distribution: Soramitsu Co., Ltd. (YLWWUD25VZ)"
9+
readonly EXPECTED_PROFILE_NAME="Fearless App Store 2026.7.26"
810
readonly AUDIT_TEST_HARNESS="${IOS_RELEASE_AUDIT_TEST_HARNESS:-0}"
911

1012
fail() {
@@ -205,8 +207,10 @@ require_setting PRODUCT_BUNDLE_IDENTIFIER "$EXPECTED_BUNDLE_ID"
205207
require_setting MARKETING_VERSION "$EXPECTED_VERSION"
206208
require_setting CURRENT_PROJECT_VERSION "$EXPECTED_BUILD"
207209
require_setting CODE_SIGN_ENTITLEMENTS "fearless/WalletConnect.entitlements"
208-
require_setting CODE_SIGN_STYLE "Automatic"
210+
require_setting CODE_SIGN_STYLE "Manual"
211+
require_setting CODE_SIGN_IDENTITY "$EXPECTED_SIGNING_IDENTITY"
209212
require_setting DEVELOPMENT_TEAM "$EXPECTED_DEVELOPMENT_TEAM"
213+
require_setting PROVISIONING_PROFILE_SPECIFIER "$EXPECTED_PROFILE_NAME"
210214
require_setting SWIFT_OPTIMIZATION_LEVEL "-O"
211215
require_setting ENABLE_TESTABILITY "NO"
212216

scripts/ci/build-audited-ios-release-archive.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ set -euo pipefail
77
umask 077
88

99
readonly LOG_PREFIX="[ios-release-archive]"
10-
readonly EXPECTED_TEAM="YLWWUD25VZ"
1110
readonly EXPECTED_BUNDLE="jp.co.soramitsu.fearlesswallet"
1211
readonly EXPECTED_VERSION="4.2.0"
1312
readonly EXPECTED_SIGNING_IDENTITY="Apple Distribution: Soramitsu Co., Ltd. (YLWWUD25VZ)"
@@ -129,14 +128,11 @@ xcodebuild_arguments+=(
129128
"CURRENT_PROJECT_VERSION=$EXPECTED_BUILD"
130129
"MARKETING_VERSION=$EXPECTED_VERSION"
131130
"FEARLESS_GIT_COMMIT=$source_commit"
132-
"DEVELOPMENT_TEAM=$EXPECTED_TEAM"
133-
# Keep the application target's reviewed Automatic signing style. A
134-
# PROVISIONING_PROFILE_SPECIFIER passed on the xcodebuild command line is a
135-
# workspace-wide override: Xcode applies it to Pods and Swift-package
136-
# resource bundles too, and those targets correctly reject provisioning
137-
# profiles. The post-build audit below still fails closed unless Xcode chose
138-
# the exact reviewed App Store profile and distribution certificate.
139-
"CODE_SIGN_IDENTITY=$EXPECTED_SIGNING_IDENTITY"
131+
# Signing is intentionally target-scoped in the application's Release build
132+
# configuration. Any signing setting passed here would apply to every Pod,
133+
# Swift package, and resource bundle in the workspace. The source identity
134+
# audit above and signed-artifact audit below fail closed on the exact team,
135+
# distribution identity, App Store profile, and production entitlements.
140136
clean
141137
archive
142138
)

scripts/test-ios-release-archive-signing-contract.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fail() {
1414

1515
contains_workspace_signing_override() {
1616
grep -Eq \
17-
'^[[:space:]]*"?(CODE_SIGN_STYLE|PROVISIONING_PROFILE(_SPECIFIER)?)=' \
17+
'^[[:space:]]*"?(CODE_SIGN_IDENTITY|CODE_SIGN_STYLE|DEVELOPMENT_TEAM|PROVISIONING_PROFILE(_SPECIFIER)?)=' \
1818
"$1"
1919
}
2020

@@ -44,14 +44,16 @@ while IFS= read -r override; do
4444
done <<'OVERRIDES'
4545
CODE_SIGN_STYLE=Manual
4646
"CODE_SIGN_STYLE=Automatic"
47+
CODE_SIGN_IDENTITY=Apple Distribution
48+
"CODE_SIGN_IDENTITY=Apple Distribution"
49+
DEVELOPMENT_TEAM=YLWWUD25VZ
50+
"DEVELOPMENT_TEAM=YLWWUD25VZ"
4751
PROVISIONING_PROFILE=01234567-89AB-CDEF-0123-456789ABCDEF
4852
"PROVISIONING_PROFILE=01234567-89AB-CDEF-0123-456789ABCDEF"
4953
PROVISIONING_PROFILE_SPECIFIER=Fearless App Store
5054
"PROVISIONING_PROFILE_SPECIFIER=Fearless App Store"
5155
OVERRIDES
5256

53-
grep -Fq '"CODE_SIGN_IDENTITY=$EXPECTED_SIGNING_IDENTITY"' "$BUILD_SCRIPT" ||
54-
fail "archive script does not bind the reviewed distribution identity"
5557
grep -Fq \
5658
'bash "$SCRIPT_DIR/audit-ios-signed-release-artifact.sh"' \
5759
"$BUILD_SCRIPT" ||
@@ -68,8 +70,16 @@ grep -Fq -- \
6870
'--expected-profile-name "$EXPECTED_PROFILE_NAME"' \
6971
"$BUILD_SCRIPT" ||
7072
fail "signed-artifact audit is not bound to the reviewed profile name"
71-
grep -Fq 'require_setting CODE_SIGN_STYLE "Automatic"' "$IDENTITY_AUDIT" ||
72-
fail "release identity no longer requires target-scoped Automatic signing"
73+
grep -Fq 'require_setting CODE_SIGN_STYLE "Manual"' "$IDENTITY_AUDIT" ||
74+
fail "release identity no longer requires target-scoped Manual signing"
75+
grep -Fq \
76+
'require_setting CODE_SIGN_IDENTITY "$EXPECTED_SIGNING_IDENTITY"' \
77+
"$IDENTITY_AUDIT" ||
78+
fail "release identity no longer requires the target-scoped distribution identity"
79+
grep -Fq \
80+
'require_setting PROVISIONING_PROFILE_SPECIFIER "$EXPECTED_PROFILE_NAME"' \
81+
"$IDENTITY_AUDIT" ||
82+
fail "release identity no longer requires the target-scoped App Store profile"
7383

7484
printf '%s\n' \
7585
"[ios-release-archive-signing-test] PASS: canonical contract and $override_number workspace-wide override mutations"

scripts/test-ios-release-identity-audit.sh

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jq -n '[
4343
MARKETING_VERSION: "4.2.0",
4444
CURRENT_PROJECT_VERSION: "2026.7.26",
4545
CODE_SIGN_ENTITLEMENTS: "fearless/WalletConnect.entitlements",
46-
CODE_SIGN_STYLE: "Automatic",
46+
CODE_SIGN_IDENTITY: "Apple Distribution: Soramitsu Co., Ltd. (YLWWUD25VZ)",
47+
CODE_SIGN_STYLE: "Manual",
4748
DEVELOPMENT_TEAM: "YLWWUD25VZ",
49+
PROVISIONING_PROFILE_SPECIFIER: "Fearless App Store 2026.7.26",
4850
SWIFT_OPTIMIZATION_LEVEL: "-O",
4951
ENABLE_TESTABILITY: "NO"
5052
}
@@ -149,10 +151,26 @@ mutate_setting ENABLE_TESTABILITY YES "$testable_release"
149151
run_reject testable-release \
150152
run_audit "$testable_release" "$scheme" "$entitlements"
151153

152-
manual_signing="$FIXTURES/manual-signing.json"
153-
mutate_setting CODE_SIGN_STYLE Manual "$manual_signing"
154-
run_reject manual-signing \
155-
run_audit "$manual_signing" "$scheme" "$entitlements"
154+
automatic_signing="$FIXTURES/automatic-signing.json"
155+
mutate_setting CODE_SIGN_STYLE Automatic "$automatic_signing"
156+
run_reject automatic-signing \
157+
run_audit "$automatic_signing" "$scheme" "$entitlements"
158+
159+
wrong_signing_identity="$FIXTURES/wrong-signing-identity.json"
160+
mutate_setting CODE_SIGN_IDENTITY "Apple Development" "$wrong_signing_identity"
161+
run_reject wrong-signing-identity \
162+
run_audit "$wrong_signing_identity" "$scheme" "$entitlements"
163+
164+
wrong_profile="$FIXTURES/wrong-profile.json"
165+
mutate_setting PROVISIONING_PROFILE_SPECIFIER \
166+
"Another App Store Profile" "$wrong_profile"
167+
run_reject wrong-profile \
168+
run_audit "$wrong_profile" "$scheme" "$entitlements"
169+
170+
empty_profile="$FIXTURES/empty-profile.json"
171+
mutate_setting PROVISIONING_PROFILE_SPECIFIER "" "$empty_profile"
172+
run_reject empty-profile \
173+
run_audit "$empty_profile" "$scheme" "$entitlements"
156174

157175
wrong_team="$FIXTURES/wrong-team.json"
158176
mutate_setting DEVELOPMENT_TEAM AAAAAAAAAA "$wrong_team"

0 commit comments

Comments
 (0)