Skip to content

Commit 71b82dc

Browse files
committed
mask secrets
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
1 parent ac425ca commit 71b82dc

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/main.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,26 @@ async function getInputs(): Promise<TailscaleConfig> {
203203
let ping = core.getInput("ping");
204204
let pingHosts = ping?.length > 0 ? ping.split(",") : [];
205205

206+
const authKey = core.getInput("authkey") || "";
207+
const oauthSecret = core.getInput("oauth-secret") || "";
208+
209+
// Mask sensitive values in logs unless debug mode is enabled
210+
if (!core.isDebug()) {
211+
if (authKey) {
212+
core.setSecret(authKey);
213+
}
214+
if (oauthSecret) {
215+
core.setSecret(oauthSecret);
216+
}
217+
}
218+
206219
return {
207220
version: core.getInput("version") || "1.88.3",
208221
resolvedVersion: "",
209222
arch: "",
210-
authKey: core.getInput("authkey") || "",
223+
authKey: authKey,
211224
oauthClientId: core.getInput("oauth-client-id") || "",
212-
oauthSecret: core.getInput("oauth-secret") || "",
225+
oauthSecret: oauthSecret,
213226
tags: core.getInput("tags") || "",
214227
hostname: core.getInput("hostname") || "",
215228
args: core.getInput("args") || "",

0 commit comments

Comments
 (0)