mask secrets

Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
This commit is contained in:
Lee Briggs 2025-10-15 13:54:50 -04:00
parent ac425ca194
commit 0edb496506
No known key found for this signature in database
GPG key ID: A4D09B96FDFEB505
2 changed files with 28 additions and 4 deletions

15
dist/index.js vendored
View file

@ -41254,13 +41254,24 @@ async function pingHost(host) {
async function getInputs() {
let ping = core.getInput("ping");
let pingHosts = ping?.length > 0 ? ping.split(",") : [];
const authKey = core.getInput("authkey") || "";
const oauthSecret = core.getInput("oauth-secret") || "";
// Mask sensitive values in logs unless debug mode is enabled
if (!core.isDebug()) {
if (authKey) {
core.setSecret(authKey);
}
if (oauthSecret) {
core.setSecret(oauthSecret);
}
}
return {
version: core.getInput("version") || "1.88.3",
resolvedVersion: "",
arch: "",
authKey: core.getInput("authkey") || "",
authKey: authKey,
oauthClientId: core.getInput("oauth-client-id") || "",
oauthSecret: core.getInput("oauth-secret") || "",
oauthSecret: oauthSecret,
tags: core.getInput("tags") || "",
hostname: core.getInput("hostname") || "",
args: core.getInput("args") || "",

View file

@ -203,13 +203,26 @@ async function getInputs(): Promise<TailscaleConfig> {
let ping = core.getInput("ping");
let pingHosts = ping?.length > 0 ? ping.split(",") : [];
const authKey = core.getInput("authkey") || "";
const oauthSecret = core.getInput("oauth-secret") || "";
// Mask sensitive values in logs unless debug mode is enabled
if (!core.isDebug()) {
if (authKey) {
core.setSecret(authKey);
}
if (oauthSecret) {
core.setSecret(oauthSecret);
}
}
return {
version: core.getInput("version") || "1.88.3",
resolvedVersion: "",
arch: "",
authKey: core.getInput("authkey") || "",
authKey: authKey,
oauthClientId: core.getInput("oauth-client-id") || "",
oauthSecret: core.getInput("oauth-secret") || "",
oauthSecret: oauthSecret,
tags: core.getInput("tags") || "",
hostname: core.getInput("hostname") || "",
args: core.getInput("args") || "",