|
1
|
|
// SPDX-License-Identifier: Apache-2.0 |
|
2
|
|
// Copyright 2026 Egothor |
|
3
|
|
// Copyright 2026 Accenture |
|
4
|
|
package org.egothor.methodatlas.evidence; |
|
5
|
|
|
|
6
|
|
import java.io.Console; |
|
7
|
|
import java.io.IOException; |
|
8
|
|
import java.nio.charset.StandardCharsets; |
|
9
|
|
import java.nio.file.Files; |
|
10
|
|
import java.nio.file.Path; |
|
11
|
|
import java.nio.file.attribute.PosixFileAttributeView; |
|
12
|
|
import java.nio.file.attribute.PosixFilePermission; |
|
13
|
|
import java.util.Arrays; |
|
14
|
|
import java.util.Optional; |
|
15
|
|
import java.util.Set; |
|
16
|
|
import java.util.function.Function; |
|
17
|
|
import java.util.function.UnaryOperator; |
|
18
|
|
import java.util.logging.Level; |
|
19
|
|
import java.util.logging.Logger; |
|
20
|
|
|
|
21
|
|
import zeroecho.core.storage.KeyringPassword; |
|
22
|
|
|
|
23
|
|
/** |
|
24
|
|
* Resolves the password that unlocks an encrypted ZeroEcho keyring. |
|
25
|
|
* |
|
26
|
|
* <p> |
|
27
|
|
* ZeroEcho 1.2 keyrings are encrypted (PBKDF2-HMAC-SHA-256 + AES-256-GCM), so |
|
28
|
|
* every keyring operation needs a password. A password is never accepted as a |
|
29
|
|
* command-line value, because argument vectors are visible to other local users |
|
30
|
|
* and end up in shell history and CI logs. The sources are consulted in this |
|
31
|
|
* order, and the first one configured wins: |
|
32
|
|
* </p> |
|
33
|
|
* <ol> |
|
34
|
|
* <li>a password file named on the command line (first line, trailing line |
|
35
|
|
* break removed) — suits container and CI secret files;</li> |
|
36
|
|
* <li>an environment variable named on the command line — it must be set;</li> |
|
37
|
|
* <li>the {@value #DEFAULT_ENV} environment variable, when set;</li> |
|
38
|
|
* <li>an interactive, non-echoing prompt when an interactive terminal is attached.</li> |
|
39
|
|
* </ol> |
|
40
|
|
* |
|
41
|
|
* <p> |
|
42
|
|
* When creating a new keyring the password must be at least |
|
43
|
|
* {@value #MIN_NEW_PASSWORD_LENGTH} characters long, and an interactive prompt |
|
44
|
|
* asks for it twice. Instances are immutable and safe to reuse; every |
|
45
|
|
* {@link #resolve(boolean)} call returns a fresh {@link KeyringPassword} that |
|
46
|
|
* the caller must close. |
|
47
|
|
* </p> |
|
48
|
|
* |
|
49
|
|
* @since 6.2.0 |
|
50
|
|
*/ |
|
51
|
|
final class KeyringPasswordSource { |
|
52
|
|
|
|
53
|
|
private static final Logger LOG = Logger.getLogger(KeyringPasswordSource.class.getName()); |
|
54
|
|
|
|
55
|
|
/** Environment variable consulted when no explicit source is configured. */ |
|
56
|
|
/* default */ static final String DEFAULT_ENV = "METHODATLAS_KEYRING_PASSWORD"; |
|
57
|
|
|
|
58
|
|
/** Minimum length enforced for the password of a newly created keyring. */ |
|
59
|
|
/* default */ static final int MIN_NEW_PASSWORD_LENGTH = 12; |
|
60
|
|
|
|
61
|
|
private final Path passwordFile; |
|
62
|
|
private final String passwordEnv; |
|
63
|
|
private final UnaryOperator<String> environment; |
|
64
|
|
/** Non-echoing prompt: maps prompt text to the entered characters (empty or {@code null} = no input). */ |
|
65
|
|
private final Function<String, char[]> prompt; |
|
66
|
|
|
|
67
|
|
/** Signals that no password source is configured and no console is attached. */ |
|
68
|
|
/* default */ static final class MissingPasswordException extends IOException { |
|
69
|
|
private static final long serialVersionUID = 1L; |
|
70
|
|
|
|
71
|
|
/** Creates the exception with a fixed message. */ |
|
72
|
|
/* default */ MissingPasswordException() { |
|
73
|
|
super("No keyring password available"); |
|
74
|
|
} |
|
75
|
|
} |
|
76
|
|
|
|
77
|
|
/** |
|
78
|
|
* Creates a source backed by the process environment and the system console. |
|
79
|
|
* |
|
80
|
|
* @param passwordFile file holding the password, or {@code null} |
|
81
|
|
* @param passwordEnv name of an environment variable holding the password, |
|
82
|
|
* or {@code null} |
|
83
|
|
*/ |
|
84
|
|
/* default */ KeyringPasswordSource(Path passwordFile, String passwordEnv) { |
|
85
|
|
this(passwordFile, passwordEnv, System::getenv, KeyringPasswordSource::readFromConsole); |
|
86
|
|
} |
|
87
|
|
|
|
88
|
|
/** |
|
89
|
|
* Creates a source with injectable environment and prompt, for tests. |
|
90
|
|
* |
|
91
|
|
* @param passwordFile file holding the password, or {@code null} |
|
92
|
|
* @param passwordEnv name of an environment variable holding the password, |
|
93
|
|
* or {@code null} |
|
94
|
|
* @param environment environment lookup; must not be {@code null} |
|
95
|
|
* @param prompt interactive prompt, or {@code null} when none is available; |
|
96
|
|
* a prompt returning {@code null} or an empty array means no input |
|
97
|
|
*/ |
|
98
|
|
/* default */ KeyringPasswordSource(Path passwordFile, String passwordEnv, UnaryOperator<String> environment, |
|
99
|
|
Function<String, char[]> prompt) { |
|
100
|
|
this.passwordFile = passwordFile; |
|
101
|
|
this.passwordEnv = passwordEnv; |
|
102
|
|
this.environment = environment; |
|
103
|
|
this.prompt = prompt; |
|
104
|
|
} |
|
105
|
|
|
|
106
|
|
/** |
|
107
|
|
* Resolves the keyring password from the first configured source. |
|
108
|
|
* |
|
109
|
|
* @param newKeyring {@code true} when the password protects a keyring that |
|
110
|
|
* is about to be created (length check and confirmation) |
|
111
|
|
* @return the password; the caller must close it |
|
112
|
|
* @throws MissingPasswordException if no source is configured and no |
|
113
|
|
* interactive console is available |
|
114
|
|
* @throws IOException if a configured source is empty or unreadable, the confirmation does not match, or |
|
115
|
|
* a new password is too short |
|
116
|
|
*/ |
|
117
|
|
/* default */ KeyringPassword resolve(boolean newKeyring) throws IOException { |
|
118
|
|
char[] chars = resolveChars(newKeyring); |
|
119
|
|
try { |
|
120
|
5
1. resolve : changed conditional boundary → SURVIVED
2. resolve : removed conditional - replaced equality check with true → KILLED
3. resolve : removed conditional - replaced comparison check with true → KILLED
4. resolve : removed conditional - replaced comparison check with false → KILLED
5. resolve : removed conditional - replaced equality check with false → KILLED
|
if (newKeyring && chars.length < MIN_NEW_PASSWORD_LENGTH) { |
|
121
|
|
throw new IOException("The keyring password must be at least " + MIN_NEW_PASSWORD_LENGTH |
|
122
|
|
+ " characters long"); |
|
123
|
|
} |
|
124
|
1
1. resolve : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolve → KILLED
|
return new KeyringPassword(chars); |
|
125
|
|
} finally { |
|
126
|
|
Arrays.fill(chars, '\0'); |
|
127
|
|
} |
|
128
|
|
} |
|
129
|
|
|
|
130
|
|
/** |
|
131
|
|
* Returns a human-readable list of the accepted password sources, used in |
|
132
|
|
* error messages. |
|
133
|
|
* |
|
134
|
|
* @param fileFlag flag that names a password file |
|
135
|
|
* @param envFlag flag that names a password environment variable |
|
136
|
|
* @return guidance text; never {@code null} |
|
137
|
|
*/ |
|
138
|
|
/* default */ static String howToSupply(String fileFlag, String envFlag) { |
|
139
|
1
1. howToSupply : replaced return value with "" for org/egothor/methodatlas/evidence/KeyringPasswordSource::howToSupply → KILLED
|
return "supply the keyring password with " + fileFlag + " <file>, " + envFlag + " <VAR>, the " |
|
140
|
|
+ DEFAULT_ENV + " environment variable, or run interactively in a terminal"; |
|
141
|
|
} |
|
142
|
|
|
|
143
|
|
private char[] resolveChars(boolean newKeyring) throws IOException { |
|
144
|
2
1. resolveChars : removed conditional - replaced equality check with false → KILLED
2. resolveChars : removed conditional - replaced equality check with true → KILLED
|
if (passwordFile != null) { |
|
145
|
1
1. resolveChars : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
return fromFile(); |
|
146
|
|
} |
|
147
|
2
1. resolveChars : removed conditional - replaced equality check with true → KILLED
2. resolveChars : removed conditional - replaced equality check with false → KILLED
|
if (passwordEnv != null) { |
|
148
|
|
String value = environment.apply(passwordEnv); |
|
149
|
4
1. resolveChars : removed conditional - replaced equality check with false → SURVIVED
2. resolveChars : removed conditional - replaced equality check with false → KILLED
3. resolveChars : removed conditional - replaced equality check with true → KILLED
4. resolveChars : removed conditional - replaced equality check with true → KILLED
|
if (value == null || value.isEmpty()) { |
|
150
|
|
throw new IOException("Keyring password environment variable " + passwordEnv + " is unset or empty"); |
|
151
|
|
} |
|
152
|
1
1. resolveChars : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
return value.toCharArray(); |
|
153
|
|
} |
|
154
|
|
String fallback = environment.apply(DEFAULT_ENV); |
|
155
|
4
1. resolveChars : removed conditional - replaced equality check with true → SURVIVED
2. resolveChars : removed conditional - replaced equality check with true → KILLED
3. resolveChars : removed conditional - replaced equality check with false → KILLED
4. resolveChars : removed conditional - replaced equality check with false → KILLED
|
if (fallback != null && !fallback.isEmpty()) { |
|
156
|
1
1. resolveChars : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
return fallback.toCharArray(); |
|
157
|
|
} |
|
158
|
1
1. resolveChars : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
return fromPrompt(newKeyring); |
|
159
|
|
} |
|
160
|
|
|
|
161
|
|
private char[] fromFile() throws IOException { |
|
162
|
|
warnIfShared(passwordFile); |
|
163
|
|
String content = Files.readString(passwordFile, StandardCharsets.UTF_8); |
|
164
|
|
int end = content.indexOf('\n'); |
|
165
|
3
1. fromFile : removed conditional - replaced comparison check with false → SURVIVED
2. fromFile : changed conditional boundary → KILLED
3. fromFile : removed conditional - replaced comparison check with true → KILLED
|
String line = end < 0 ? content : content.substring(0, end); |
|
166
|
2
1. fromFile : removed conditional - replaced equality check with true → KILLED
2. fromFile : removed conditional - replaced equality check with false → KILLED
|
if (line.endsWith("\r")) { |
|
167
|
1
1. fromFile : Replaced integer subtraction with addition → KILLED
|
line = line.substring(0, line.length() - 1); |
|
168
|
|
} |
|
169
|
2
1. fromFile : removed conditional - replaced equality check with true → KILLED
2. fromFile : removed conditional - replaced equality check with false → KILLED
|
if (line.isEmpty()) { |
|
170
|
|
throw new IOException("Keyring password file " + passwordFile + " is empty"); |
|
171
|
|
} |
|
172
|
1
1. fromFile : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::fromFile → KILLED
|
return line.toCharArray(); |
|
173
|
|
} |
|
174
|
|
|
|
175
|
|
/** |
|
176
|
|
* Warns when a password file is readable by other users on POSIX systems. |
|
177
|
|
* |
|
178
|
|
* @param file password file |
|
179
|
|
*/ |
|
180
|
|
private static void warnIfShared(Path file) { |
|
181
|
|
try { |
|
182
|
|
PosixFileAttributeView view = Files.getFileAttributeView(file, PosixFileAttributeView.class); |
|
183
|
2
1. warnIfShared : removed conditional - replaced equality check with false → SURVIVED
2. warnIfShared : removed conditional - replaced equality check with true → SURVIVED
|
if (view == null) { |
|
184
|
|
return; |
|
185
|
|
} |
|
186
|
|
Set<PosixFilePermission> perms = view.readAttributes().permissions(); |
|
187
|
4
1. warnIfShared : removed conditional - replaced equality check with true → NO_COVERAGE
2. warnIfShared : removed conditional - replaced equality check with true → SURVIVED
3. warnIfShared : removed conditional - replaced equality check with false → NO_COVERAGE
4. warnIfShared : removed conditional - replaced equality check with false → SURVIVED
|
if ((perms.contains(PosixFilePermission.GROUP_READ) || perms.contains(PosixFilePermission.OTHERS_READ)) |
|
188
|
|
&& LOG.isLoggable(Level.WARNING)) { |
|
189
|
|
LOG.log(Level.WARNING, "Keyring password file {0} is readable by other users; restrict it with " |
|
190
|
|
+ "''chmod 600 {0}''", file); |
|
191
|
|
} |
|
192
|
|
} catch (IOException e) { |
|
193
|
|
if (LOG.isLoggable(Level.FINE)) { |
|
194
|
|
LOG.log(Level.FINE, "Cannot inspect permissions of " + file, e); |
|
195
|
|
} |
|
196
|
|
} |
|
197
|
|
} |
|
198
|
|
|
|
199
|
|
private char[] fromPrompt(boolean newKeyring) throws IOException { |
|
200
|
2
1. fromPrompt : removed conditional - replaced equality check with false → SURVIVED
2. fromPrompt : removed conditional - replaced equality check with true → KILLED
|
char[] first = prompt == null ? new char[0] |
|
201
|
2
1. fromPrompt : removed conditional - replaced equality check with false → SURVIVED
2. fromPrompt : removed conditional - replaced equality check with true → SURVIVED
|
: prompt.apply(newKeyring ? "New keyring password: " : "Keyring password: "); |
|
202
|
4
1. fromPrompt : removed conditional - replaced equality check with false → SURVIVED
2. fromPrompt : removed conditional - replaced equality check with false → KILLED
3. fromPrompt : removed conditional - replaced equality check with true → KILLED
4. fromPrompt : removed conditional - replaced equality check with true → KILLED
|
if (first == null || first.length == 0) { |
|
203
|
|
throw new MissingPasswordException(); |
|
204
|
|
} |
|
205
|
2
1. fromPrompt : removed conditional - replaced equality check with true → SURVIVED
2. fromPrompt : removed conditional - replaced equality check with false → KILLED
|
if (newKeyring) { |
|
206
|
|
char[] confirm = prompt.apply("Repeat keyring password: "); |
|
207
|
4
1. fromPrompt : removed conditional - replaced equality check with true → SURVIVED
2. fromPrompt : removed conditional - replaced equality check with false → KILLED
3. fromPrompt : removed conditional - replaced equality check with false → KILLED
4. fromPrompt : removed conditional - replaced equality check with true → KILLED
|
boolean matches = confirm != null && Arrays.equals(first, confirm); |
|
208
|
2
1. fromPrompt : removed conditional - replaced equality check with false → SURVIVED
2. fromPrompt : removed conditional - replaced equality check with true → SURVIVED
|
if (confirm != null) { |
|
209
|
|
Arrays.fill(confirm, '\0'); |
|
210
|
|
} |
|
211
|
2
1. fromPrompt : removed conditional - replaced equality check with true → KILLED
2. fromPrompt : removed conditional - replaced equality check with false → KILLED
|
if (!matches) { |
|
212
|
|
Arrays.fill(first, '\0'); |
|
213
|
|
throw new IOException("The keyring passwords do not match"); |
|
214
|
|
} |
|
215
|
|
} |
|
216
|
1
1. fromPrompt : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::fromPrompt → KILLED
|
return first; |
|
217
|
|
} |
|
218
|
|
|
|
219
|
|
private static char[] readFromConsole(String text) { |
|
220
|
|
// Since JDK 22 System.console() returns a Console even without a terminal |
|
221
|
|
// (redirected stdin, CI); only an interactive terminal may be prompted. |
|
222
|
|
char[] entered = Optional.ofNullable(System.console()) |
|
223
|
|
.filter(Console::isTerminal) |
|
224
|
1
1. lambda$readFromConsole$0 : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::lambda$readFromConsole$0 → NO_COVERAGE
|
.map(console -> console.readPassword("%s", text)) |
|
225
|
|
.orElse(null); |
|
226
|
3
1. readFromConsole : replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::readFromConsole → NO_COVERAGE
2. readFromConsole : removed conditional - replaced equality check with false → NO_COVERAGE
3. readFromConsole : removed conditional - replaced equality check with true → NO_COVERAGE
|
return entered == null ? new char[0] : entered; |
|
227
|
|
} |
|
228
|
|
} |
| | Mutations |
| 120 |
|
1.1 Location : resolve Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:shortPasswordIsAcceptedForExistingButNotForNewKeyrings()] removed conditional - replaced equality check with true → KILLED
2.2 Location : resolve Killed by : none changed conditional boundary → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:shortPasswordIsAcceptedForExistingButNotForNewKeyrings()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()]
3.3 Location : resolve Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()] removed conditional - replaced comparison check with true → KILLED
4.4 Location : resolve Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:shortPasswordIsAcceptedForExistingButNotForNewKeyrings()] removed conditional - replaced comparison check with false → KILLED
5.5 Location : resolve Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:shortPasswordIsAcceptedForExistingButNotForNewKeyrings()] removed conditional - replaced equality check with false → KILLED
|
| 124 |
|
1.1 Location : resolve Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableIsUsed()] replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolve → KILLED
|
| 139 |
|
1.1 Location : howToSupply Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:guidanceNamesEverySource()] replaced return value with "" for org/egothor/methodatlas/evidence/KeyringPasswordSource::howToSupply → KILLED
|
| 144 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()] removed conditional - replaced equality check with false → KILLED
2.2 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableMustBeSet()] removed conditional - replaced equality check with true → KILLED
|
| 145 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()] replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
| 147 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:missingSourceRaisesDedicatedException()] removed conditional - replaced equality check with true → KILLED
2.2 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableMustBeSet()] removed conditional - replaced equality check with false → KILLED
|
| 149 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableIsUsed()] removed conditional - replaced equality check with false → KILLED
2.2 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableMustBeSet()] removed conditional - replaced equality check with true → KILLED
3.3 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableIsUsed()] removed conditional - replaced equality check with true → KILLED
4.4 Location : resolveChars Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableIsUsed()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:shortPasswordIsAcceptedForExistingButNotForNewKeyrings()]
|
| 152 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:namedEnvironmentVariableIsUsed()] replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
| 155 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:missingSourceRaisesDedicatedException()] removed conditional - replaced equality check with true → KILLED
2.2 Location : resolveChars Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:defaultEnvironmentVariableIsTheFallback()]
3.3 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:defaultEnvironmentVariableIsTheFallback()] removed conditional - replaced equality check with false → KILLED
4.4 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:defaultEnvironmentVariableIsTheFallback()] removed conditional - replaced equality check with false → KILLED
|
| 156 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:defaultEnvironmentVariableIsTheFallback()] replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
| 158 |
|
1.1 Location : resolveChars Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()] replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::resolveChars → KILLED
|
| 165 |
|
1.1 Location : fromFile Killed by : none removed conditional - replaced comparison check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()]
2.2 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()] changed conditional boundary → KILLED
3.3 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()] removed conditional - replaced comparison check with true → KILLED
|
| 166 |
|
1.1 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()] removed conditional - replaced equality check with true → KILLED
2.2 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()] removed conditional - replaced equality check with false → KILLED
|
| 167 |
|
1.1 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()] Replaced integer subtraction with addition → KILLED
|
| 169 |
|
1.1 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()] removed conditional - replaced equality check with true → KILLED
2.2 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()] removed conditional - replaced equality check with false → KILLED
|
| 172 |
|
1.1 Location : fromFile Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()] replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::fromFile → KILLED
|
| 183 |
|
1.1 Location : warnIfShared Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()]
2.2 Location : warnIfShared Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()]
|
| 187 |
|
1.1 Location : warnIfShared Killed by : none removed conditional - replaced equality check with true → NO_COVERAGE
2.2 Location : warnIfShared Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()]
3.3 Location : warnIfShared Killed by : none removed conditional - replaced equality check with false → NO_COVERAGE
4.4 Location : warnIfShared Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:emptyPasswordFileIsAnError()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:passwordFileWinsAndDropsTrailingLineBreak()]
|
| 200 |
|
1.1 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()] removed conditional - replaced equality check with true → KILLED
2.2 Location : fromPrompt Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:missingSourceRaisesDedicatedException()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
|
| 201 |
|
1.1 Location : fromPrompt Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:missingSourceRaisesDedicatedException()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
2.2 Location : fromPrompt Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:missingSourceRaisesDedicatedException()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
|
| 202 |
|
1.1 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()] removed conditional - replaced equality check with false → KILLED
2.2 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()] removed conditional - replaced equality check with true → KILLED
3.3 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:missingSourceRaisesDedicatedException()] removed conditional - replaced equality check with true → KILLED
4.4 Location : fromPrompt Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
|
| 205 |
|
1.1 Location : fromPrompt Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
2.2 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()] removed conditional - replaced equality check with false → KILLED
|
| 207 |
|
1.1 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()] removed conditional - replaced equality check with false → KILLED
2.2 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()] removed conditional - replaced equality check with false → KILLED
3.3 Location : fromPrompt Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
4.4 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()] removed conditional - replaced equality check with true → KILLED
|
| 208 |
|
1.1 Location : fromPrompt Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
2.2 Location : fromPrompt Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
Covered by tests:
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()]
- org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()]
|
| 211 |
|
1.1 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()] removed conditional - replaced equality check with true → KILLED
2.2 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:mismatchedConfirmationIsRejected()] removed conditional - replaced equality check with false → KILLED
|
| 216 |
|
1.1 Location : fromPrompt Killed by : org.egothor.methodatlas.evidence.KeyringPasswordSourceTest.[engine:junit-jupiter]/[class:org.egothor.methodatlas.evidence.KeyringPasswordSourceTest]/[method:promptIsUsedLastAndConfirmedForNewKeyrings()] replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::fromPrompt → KILLED
|
| 224 |
|
1.1 Location : lambda$readFromConsole$0 Killed by : none replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::lambda$readFromConsole$0 → NO_COVERAGE
|
| 226 |
|
1.1 Location : readFromConsole Killed by : none replaced return value with null for org/egothor/methodatlas/evidence/KeyringPasswordSource::readFromConsole → NO_COVERAGE
2.2 Location : readFromConsole Killed by : none removed conditional - replaced equality check with false → NO_COVERAGE
3.3 Location : readFromConsole Killed by : none removed conditional - replaced equality check with true → NO_COVERAGE
|