Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide sensitive information in match output #21603

Merged
merged 4 commits into from Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,6 +12,7 @@
1257253924B7992C00E04FA3 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1257253824B7992B00E04FA3 /* main.swift */; };
1267C3F42773A43E004DE48A /* Atomic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1267C3F32773A43E004DE48A /* Atomic.swift */; };
12D2EB8D2620D83C00844013 /* OptionalConfigValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D2EB8C2620D83B00844013 /* OptionalConfigValue.swift */; };
5F5D0ED98E02119343C05257 /* FastlaneRunner in FastlaneRunnerCopySigned */ = {isa = PBXBuildFile; fileRef = D556D6A91F6A08F5003108E3 /* FastlaneRunner */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this file was changed when I ran unit tests. Should I revert the changes to this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in d995a7a

B302067B1F5E3E9000DE6EBD /* SnapshotfileProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30206741F5E3E9000DE6EBD /* SnapshotfileProtocol.swift */; };
B302067C1F5E3E9000DE6EBD /* GymfileProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30206751F5E3E9000DE6EBD /* GymfileProtocol.swift */; };
B302067D1F5E3E9000DE6EBD /* MatchfileProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B30206761F5E3E9000DE6EBD /* MatchfileProtocol.swift */; };
Expand Down Expand Up @@ -43,10 +44,21 @@
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
26C0646DA1B172817F711D70 /* FastlaneRunnerCopySigned */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$SRCROOT/../..";
dstSubfolderSpec = 0;
files = (
5F5D0ED98E02119343C05257 /* FastlaneRunner in FastlaneRunnerCopySigned */,
);
name = FastlaneRunnerCopySigned;
runOnlyForDeploymentPostprocessing = 0;
};
C0459CAB27261886002CDFB9 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = $SRCROOT/../..;
dstPath = "$SRCROOT/../..";
dstSubfolderSpec = 0;
files = (
C0459CAC27261897002CDFB9 /* FastlaneRunner in CopyFiles */,
Expand Down Expand Up @@ -199,6 +211,7 @@
B33BAF531F51F8D90001A751 /* Sources */,
B33BAF541F51F8D90001A751 /* Frameworks */,
C0459CAB27261886002CDFB9 /* CopyFiles */,
26C0646DA1B172817F711D70 /* FastlaneRunnerCopySigned */,
);
buildRules = (
);
Expand Down Expand Up @@ -404,6 +417,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "-";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
Expand All @@ -416,6 +430,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "-";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
};
Expand Down
2 changes: 1 addition & 1 deletion fastlane_core/lib/fastlane_core/cert_checker.rb
Expand Up @@ -116,7 +116,7 @@ def self.installed_wwdr_certificates

# Find all installed WWDRCA certificates
installed_certs = []
Helper.backticks("security find-certificate -a -c '#{certificate_name}' -p #{wwdr_keychain.shellescape}")
Helper.backticks("security find-certificate -a -c '#{certificate_name}' -p #{wwdr_keychain.shellescape}", print: false)
.lines
.each do |line|
if line.start_with?('-----BEGIN CERTIFICATE-----')
Expand Down
6 changes: 3 additions & 3 deletions fastlane_core/spec/cert_checker_spec.rb
Expand Up @@ -40,7 +40,7 @@ class ProcessStatusMock
it "should return installed certificate's alias" do
expect(FastlaneCore::CertChecker).to receive(:wwdr_keychain).and_return('login.keychain')

allow(FastlaneCore::Helper).to receive(:backticks).with(/security find-certificate/).and_return("-----BEGIN CERTIFICATE-----\nG6\n-----END CERTIFICATE-----\n")
allow(FastlaneCore::Helper).to receive(:backticks).with(/security find-certificate/, { print: false }).and_return("-----BEGIN CERTIFICATE-----\nG6\n-----END CERTIFICATE-----\n")

allow(Digest::SHA256).to receive(:hexdigest).with(cert.to_der).and_return('bdd4ed6e74691f0c2bfd01be0296197af1379e0418e2d300efa9c3bef642ca30')
allow(OpenSSL::X509::Certificate).to receive(:new).and_return(cert)
Expand All @@ -51,7 +51,7 @@ class ProcessStatusMock
it "should return an empty array if unknown WWDR certificates are found" do
expect(FastlaneCore::CertChecker).to receive(:wwdr_keychain).and_return('login.keychain')

allow(FastlaneCore::Helper).to receive(:backticks).with(/security find-certificate/).and_return("-----BEGIN CERTIFICATE-----\nG6\n-----END CERTIFICATE-----\n")
allow(FastlaneCore::Helper).to receive(:backticks).with(/security find-certificate/, { print: false }).and_return("-----BEGIN CERTIFICATE-----\nG6\n-----END CERTIFICATE-----\n")

allow(OpenSSL::X509::Certificate).to receive(:new).and_return(cert)

Expand Down Expand Up @@ -103,7 +103,7 @@ class ProcessStatusMock

it 'should shell escape keychain names when checking for installation' do
expect(FastlaneCore::CertChecker).to receive(:wwdr_keychain).and_return(keychain_name)
expect(FastlaneCore::Helper).to receive(:backticks).with(name_regex).and_return("")
expect(FastlaneCore::Helper).to receive(:backticks).with(name_regex, { print: false }).and_return("")

FastlaneCore::CertChecker.installed_wwdr_certificates
end
Expand Down